summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2020-11-10Add 'scan' verb for runtime device scanFarshid Monhaseri4-3/+133
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 Monhaseri5-37/+552
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
2019-04-15Git submodule migration to separated librariesRomain Forlot1-5/+0
Replace the afb-helpers submodule usage with the separated library instead. Bug-AGL: SPEC-2139 Change-Id: I1a89a81642a61daee718ab74bff47d93e93a8710 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-04-02Fix: api userdata pointer releasedRomain Forlot1-1/+1
The json_object given to afb_req_success is released so and as it's the userdata or a subpart, we need to increment the json_object reference count. Change-Id: I9ee3fa5f613cd80c1f2374a545dec247c0a52cd8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-03-29Test directory existenceRomain Forlot1-1/+6
Missing testing the readdir returned value. Bug-AGL: SPEC-2288 Change-Id: I38691f2604ed4a13ff90e53dd5303e8ddcba7cf1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-11-28First simple platform-info API implementationguppy_6.99.2guppy/6.99.26.99.2Romain Forlot5-0/+299
Bug-AGL: SPEC-1917 Change-Id: I300155302c9d69c6549ddabc6af53e2ad55eb18d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>