summaryrefslogtreecommitdiffstats
path: root/src/platform-info-devices.c
AgeCommit message (Collapse)AuthorFilesLines
2020-11-10Add 'scan' verb for runtime device scanFarshid Monhaseri1-0/+103
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 <monhaseri.f@gmail.com> Change-Id: I83e91ec4405a8144e1ee813633c4895214b5b9df
2020-11-10Add device monitoring feature (hotplug device detection)Farshid Monhaseri1-0/+397
Changes: - Implement libudev 'monitor' interface to detect hotplug devices. - Forward udev rules as AFB 'subscribe' args to udev_monitoring objects. - Filter retrieved property fields through 'mask' argument from 'subscribe' args. - Generate detached threads (event loop) and data context for each client, so every user can subscribe for device events with their own udev rules and receive their desired device parameters. Bug-AGL: SPEC-3512 Signed-off-by: Farshid Monhaseri <monhaseri.f@gmail.com> Change-Id: I0fc007d9707deaf39d21147aa8240fde302f5f9e