summaryrefslogtreecommitdiffstats
path: root/src/afb-api-dbus.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-02Provide efficient store/unstore for afb_reqJosé Bollo1-1/+1
Change-Id: I231e2506f58227fb8d192df042539b1551a765c5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Add vfail and vsuccess interfacesJosé Bollo1-0/+1
This now factorizes code needed to asprintf the arguments in an allocated string. But the most interesting effect is the ability to handle va_list of arguments. It can be used for library of tools. Change-Id: I4ba74c9984786f07abe0c7e53d7ef79dca863735 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-13Introduce apiset for grouping apisJosé Bollo1-23/+11
This will be used at the end for debugging facilities. Change-Id: I75e3345667e1f58143c77a885e166375680ca194 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-12fix typoJosé Bollo1-2/+2
Change-Id: I83473a69d8af4d39d1ef7eba9c324a6bbb0364fc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-12Optimisation of xreqJosé Bollo1-15/+13
Reduce the count of memory read Change-Id: Ie4dfa4bd30d6485be91961196294c43ffbd3b2a9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-12Add computation of credentialsJosé Bollo1-0/+32
Credentials are computed if possible. Change-Id: I36c7e95a35431b27109c26b51eab690d685862e1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-12Rename destination as originJosé Bollo1-51/+51
Change-Id: I9c76ab3043506778640cb379e8f006674f8a8fcf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-10Refactor of API interfacesJosé Bollo1-3/+6
The new interface has increased functionnality, it allows to set debug flags by API. Change-Id: Ibd35fb02ed645e22cac8e7021b37b96e07e79877 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-07Add hooking of daemon interfaceJosé Bollo1-0/+1
Change-Id: I5840609f4300ade98412e8527ac5ce1f1e8c0c59 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-04Definitive switch to internal's xreqJosé Bollo1-3/+3
This switch allows to work on a common base for the requests. Change-Id: I94e7fdda80c1966af399309334c41c7c8c8259dc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-03Switch API D-Bus to xreqJosé Bollo1-110/+68
Change-Id: I16bfa2594f8de4babcc0d3cc1a62e7d0856d2479 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-27Simplify functions for callsJosé Bollo1-7/+9
For historical reasons, the call to apis was passing the length of the api and the length of the verb. The reason was to avoid a copy of strings. But the copy occured only for HTTP requests. Having this implementation is of small interest and compromise future changes. This patch simplify things. Change-Id: I8157724c6c721b6797cd0eab52b07e1b8d6eb5f8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-01-03Improves naming of session's moduleJosé Bollo1-6/+6
Make names looking like other names Change-Id: I63ce3d8a3d84193eca9d517cecb1888d630a9b2d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-01-03Adds 2017 to copyrightsJosé Bollo1-1/+1
Change-Id: Id85c4eb4e36a05b61346004ba95daa19faf5074f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-08-03api-dbus: improves 'dbus_req_json'José Bollo1-1/+2
Change-Id: I6d63d70d30f02422e5f9904722e89f92358186b9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-07-27fix unexpected ending spacesJosé Bollo1-1/+1
Change-Id: Ie7ebccb02b42e91457df3bdbf2a6f037b248400e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-23vocabulary: moving from 'plugin' to 'binding'José Bollo1-1/+0
Change-Id: Ic9e118df2bede1fefbb591f8ae7887266b7324ca Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-23api-dbus: improves eventsJosé Bollo1-58/+517
Change-Id: I0d58bed66ebc9eaea63c0863351d03cf458e4198 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-23evt: handles broadcasting and trackingJosé Bollo1-2/+8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-13Service instanciationJosé Bollo1-0/+12
Adds the ability for a service to initiate calls to other services and to receive events in its own context. Change-Id: I5ff149a0231e551e9ce8a8de9658cb492a38cae1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-10common code reuseJosé Bollo1-13/+2
Change-Id: I5f400a92165bb380ec5f703dd8ca567e90aebca2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-09Make possible to call a method from a bindingJosé Bollo1-1/+24
The new request call 'afb_req_subcall' allows a binding to call the method of an other binding. Change-Id: I8538185be7a1663153a25db2bc940f9e2bdedb1a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-09Events: refactoringJosé Bollo1-17/+6
This new version allows to subscribe a client for an event. The event should first be created for the API (the API's prefix is added) using 'afb_daemon_make_event'. After that, plugins can subscribe or unsubscribe their clients (identified through requests) to the events that it generates. See 'afb_req_subscribe' and 'afb_req_unsubscribe'. Events created by 'afb_daemon_make_event' can be widely broadcasted using 'afb_event_broadcast' or pushed only to suscribers using 'afb_event_push'. Events can be destroyed using 'afb_event_drop'. Change-Id: I7c0bed5e625c2052dcd81c6bfe960def1fa032f3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-29compact formatting of jsonJosé Bollo1-2/+2
Change-Id: Ieb839f287593240aac4d784483ff4c6e6cb57d84 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-24add log macros for pluginsJosé Bollo1-0/+1
Change-Id: I3de30aeb90a41ed8ee63ec1e19c6032440d65574 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-18adds detection of wrong names for apisJosé Bollo1-0/+4
Change-Id: I5466879bc2d9a60992605bf2514f78d3121f8114 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-17provides developper filesJosé Bollo1-2/+2
Change-Id: I0e41a0db778c69b5f5ce71115d495b2bb8b4cffe Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-13cleaning copyrightsJosé Bollo1-1/+1
Change-Id: I4ff7349b1a87f92a7d9f378c715054061f06df57 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-11dbus service propagate eventsJosé Bollo1-2/+63
Change-Id: I34f2272e2f9e4f9166e55a7c8c17015fb8775d19 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-10explicit use of json-cJosé Bollo1-1/+1
Change-Id: Iebf7309255d1285a5833c5490d32f518a9232ede Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-10Refactoring requests and context handlingJosé Bollo1-0/+511
Also adds a first (untested) implmentation of the afb services over dbus. Change-Id: Id1bdeccf75f3a70d3658bdaf0510d6e7b97f6c32 Signed-off-by: José Bollo <jose.bollo@iot.bzh>