From 980b0dbc25e1b423562b87bc402c09329c039212 Mon Sep 17 00:00:00 2001 From: Farshid Monhaseri Date: Tue, 10 Nov 2020 14:20:08 +0330 Subject: Add 'scan' verb for runtime device scan Changes: - Add 'scan' verb so client can pass 'filter'(udev rules in JSON format) and 'mask' (desired data fields mask) arguments. 'filter' & 'mask' can include 'properties' and 'attributes' sub- fields so their key & values act as parameters for device scanning and mask the scanned devices properties & attributes when service report back. The 'filter' argument can contain an additional field with 'tags' key and JSON array value hence the tags will match for device scanning too. Bug-AGL: SPEC-3512 Signed-off-by: Farshid Monhaseri Change-Id: I83e91ec4405a8144e1ee813633c4895214b5b9df --- src/platform-info-apidef.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/platform-info-apidef.h') diff --git a/src/platform-info-apidef.h b/src/platform-info-apidef.h index c09da63..4dba262 100644 --- a/src/platform-info-apidef.h +++ b/src/platform-info-apidef.h @@ -5,6 +5,7 @@ static const struct afb_auth _afb_auths_platform_info[] = { void afv_get(afb_req_t req); void afv_set(afb_req_t req); + void afv_scan(afb_req_t req); void afv_subscribe(afb_req_t req); void afv_unsubscribe(afb_req_t req); @@ -23,6 +24,13 @@ static const struct afb_verb_v3 _afb_verbs_platform_info[] = { .info = "Set a platform data.", .session = AFB_SESSION_NONE }, + { + .verb = "scan", + .callback = afv_scan, + .auth = NULL, + .info = "Scan system devices", + .session = AFB_SESSION_NONE + }, { .verb = "unsubscribe", .callback = afv_unsubscribe, -- cgit 1.2.3-korg