aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2018-12-05afb-proto-ws: Add error reportJose Bollo1-1/+1
Change-Id: I58c88f8bcaf4cfb8a53b58eeefd7fa3415bf894a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-11-22globset: Introduce globset for event handlingguppy_6.99.1guppy/6.99.16.99.1Jose Bollo1-0/+1
It optimises the event handling that was slow. It also fix few bugs: - at most one event handler is called now - the handler call has the most specific pattern Change-Id: Ic13a0258b5743579ab15e0e953ec62206d982850 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-02afb-socket: Separate socket creationJosé Bollo1-0/+1
The objective is to have a well identified and possibly reusable internally. Change-Id: Icdb6ce7d85ae26373cfe4f0b492fe97b74ed747c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-25afb-config: Rewrite the config as JSON objectJosé Bollo1-0/+1
Despite its poor performance, this changes is good at the end because: - it allows to put config in files - it removes dirty code to translate to JSON - it removes dirty code to dump the config - it unifies code for scanning hook's flag's names - it improves unity of naming between option's names and JSON's names Change-Id: I2487c8746d78a0cff80505a12b9fa60e40da9951 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-06Simplify build by introducing queuing functionJosé Bollo1-1/+1
It is not valuable at the end to continue to have this fake job implementation. So removing it is good. Change-Id: I930ade3e3a511f0ebfb91292e5725ac3be884d44 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-05supervision: Exclude conditionaly the supervisionJosé Bollo1-1/+4
Exclude from the binder the part related to the supervision when the supervisor is excluded from the build. Change-Id: I41193122d63e47b9f0db7f113f88d2d63b783027 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-15api-v3: First draftJosé Bollo1-7/+21
This commit introduces the bindings v3 API for bindings. The documentation has still to be improved and will come very soon. Change-Id: I8f9007370e29f671fdfd1da87fff7372a17db7af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-13Make DBUS transparency optional (off by default)José Bollo1-1/+5
The implementation of API transparency through DBUS is not used at the moment. To improve independancy to systemd (it relies on systemd library) removing it should be possible. Change-Id: I5750a92527dc3e9cf7dcd27625dce6a020797a3d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-27Update date of copyright noticesJosé Bollo1-1/+1
Change-Id: If9d7e7728df086fbb7214f1de5cbec35cd2f1d9b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-26afs-supervisor: Add systemd service and configJosé Bollo1-7/+9
Change-Id: I64bf8de01dbb8cf9581ed0be358d81fa84106520 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-26supervisor: Make it a HTTP serverJosé Bollo1-1/+1
The supervisor now run as an HTTP server by default. Change-Id: Ia0a654cd97c941f15b212c5364d739e2196662e4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-22fdev: Introduce fdev for file event handlingJosé Bollo1-1/+5
This is an effort to keep cutting dependency to systemd. Change-Id: I9a0c032a1095e297c7f3ac5b67827fda3658b8d9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-21afb-systemd: Integrate sd-fds featuresJosé Bollo1-1/+0
Change-Id: I59d194ba675912a42922f0905933b1cea796c78a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-21afb-systemd: Isolate systemd main entriesJosé Bollo1-0/+1
This change prepares the possibilty to remove the dependency to systemd/libsystemd. Change-Id: Ife4181d6c7195230a11a32e527b8973af6a096e1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-14afs-supervisor: Add discovery mechanicJosé Bollo1-1/+1
Change-Id: Icfcdcc16d0433454c9bb0785d0690f7f173980ae Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13supervision: Add supervision and supervisorJosé Bollo1-0/+12
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-20CMAKE: refactor optionseel_4.99.3eel/4.99.34.99.3José Bollo1-18/+3
The option ALLOW_NO_BINDER is removed and the option ONLY_DEVTOOLS is introduced. Change-Id: Ia19eb977ee25a3871582605028fdef75e552363f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-20Merge "Fix build for native package"José Bollo1-3/+5
2017-11-20Fix build for native packageRonan Le Martret1-3/+5
* If the package is natively compile, the gcc used is the host gcc, and host gcc version must be >4.9. This is unneeded for the mode ALLOW_NO_BINDER (like in native). Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2017-11-17afb-proto-ws: Fix autolock in proto-wsJosé Bollo1-1/+2
Because a systemd event loop can not be reentered while evaluating an event callback, the event loop was removed from the threads. It had the effect to enter in deadlock when calling a synchronous call while in an event callback. Queueing a job solves the issue. But because using queued job has implications on libafbws, a fake job manager is added for libafbws. Change-Id: Id793bea55743790082eaab48cd4cc87f7993772a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-17CMAKE: allow to compile afb-genskel onlyJosé Bollo1-1/+8
When missing components are detected, allows to not compile the binder if ALLOW_NO_BINDER is ON Change-Id: I0fb27844e3f36d4dd643bdf250f05b4f6769bc53 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-11libafbwsc: add function 'afb_ws_client_connect_api'José Bollo1-2/+2
This function allows to connect to an API exported by the binder. The demo program afb-client-demo is modified to integrate on option that direct API connection. Example: server: afb-daemon --ws-server unix:hello client: afb-client-demo -d -H unix:hello Change-Id: Id9f857a453c406df1c4b36eb25fb5e833a938c3d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Allow pure dynamic bindingsJosé Bollo1-0/+1
Activates the new internal interfaces Change-Id: I8f51cd271f66a0216ffdf03626300bb5964a70f9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Allow dynamic creation of APIsJosé Bollo1-0/+1
Change-Id: I825bfa7969c98dd214457d9ff94e2948362286a9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09afb-export: refactor of binder interfaceJosé Bollo1-2/+1
The interfaces of the binder called afb_ditf and afb_svc are merged together to create the afb_export structure. Change-Id: I841ba04d7b2f94bfc19f691ec746d0bd221f164d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-09-12afb-proto-ws: Split afb-stub-ws in twoeel_4.99.1eel/4.99.14.99.1José Bollo1-0/+1
The file afb-stub-ws is split in two parts: - afb-stub-ws: implements the interface between xreq and protocol. - afb-proto-ws: implements the pbinary protocol over wer sockets The intent is to have a clean separation between a kind of generic stub and the protocol implmentation. This will allow soon to provide a library to access directly in C to the websocket of an API exposed through the otpion --ws-server. At the moment, the protocol implementation is on websockets but in the futur it will be cleanly rewritten to use any binary transport. This commit also fixe a double free in subcalls. Change-Id: I831787533db9fe073d060dd8ee9401cbab2894e1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-29Add option --name for naming the processJosé Bollo1-0/+1
This option allows to set the command line and the thread name of the main process. The value can contain spaces that will be replaced by nulls. Change-Id: I895270a24663467b16fb3cd8fc3218b7b003b6bb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-28build config: remove forced AGL_DEVEL from src/CMakelists.txtStephane Desneux1-1/+0
Change-Id: I6fd44469b148732103d4b903f94c355f2bd231ee Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2017-08-10subpath: creation for splitting locale-rootJosé Bollo1-0/+1
Change-Id: Ia339dc1d1291ef52fbec3c928537721ed7410694 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-08afb-trace: Add tracing features to API monitorJosé Bollo1-0/+1
This api allows to receive events when particular actions are reached. At the moment, tracing is bound to the API monitor and can trace anything. In the future, this will not be the case and the API monitor will only allow to trace requests of its session. The tracing of all will be available for supervision only. Change-Id: I880852612c2f77ff5329496b16c75fe602db4090 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-02afb-xreq: integration of subcallsJosé Bollo1-1/+0
The file afb-subcall is now integrated within afb-xreq. It improves memory allocation and performance of synchronous calls. Change-Id: I4190199babbe0559527438b530b19ac9a35ec38b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-27wrap-json: add unpacking tool for jsonJosé Bollo1-0/+1
The functions wrap_json_unpack, wrap_json_vunpack, wrap_json_check, wrap_json_vcheck, wrap_json_match and wrap_json_vmatch can be used to get items in a json object. These functions are likely to be compatible in the format with the unpacking functions of the library jansson [1]. [1] http://jansson.readthedocs.io/en/2.10/apiref.html#parsing-and-validating-values Change-Id: I18ad702498b9a70215d88b2a3c13bd0f6194bb45 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-11debug: Create a file indicating the waiting pointJosé Bollo1-0/+1
When AFB_DEBUG_WAIT is used, the file /tmp/afb-debug-<PID> is created and contains the name of the awaiting point (without tailing new line) Signals other than SIGINT are ignored when waiting for SIGINT. This improves the cleaning up. Example: the signal SIGTERM is delayed until after removal of the debugging indication file. Change-Id: I5c896e4d9a3a098affc18d4282e260d9bb253611 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-05afb-debug: add features for debuggingJosé Bollo1-0/+1
When compiled with -DAGL_DEVEL or -DAFB_INSERT_DEBUG_FEATURES afb-daemon interprets the environment variables AFB_DEBUG_BREAK and AFB_DEBUG_WAIT. The environment variable AFB_DEBUG_BREAK make afb-daemon emit a break (SIGINT) that should be treated by the debugger. The environment variable AFB_DEBUG_WAIT make afb-daemon wait for a break (SIGINT) to continue. This can be used to attach a debugger. The content of the variables AFB_DEBUG_BREAK and AFB_DEBUG_WAIT is a list of key names of the point where the action should occur. The list is separated by spaces or commas ','. Example: AFB_DEBUG_WAIT=main-entry,start-load The defined points are: main-entry, main-args, main-start, start-entry, start-load, start-start, start-http, start-call, start-exec. Here some of their characteristic: - main-entry: at the beginning befaore any other instruction - main-args: after parsing arguments - main-start: after daemonisation before starting - start-entry: at start entry - start-load: before loading bindings after initialisation of afb-daemon - start-start: after loading bindings befaore starting it - start-call: after init before starting HTTP server - start-http: after http server, before calling startup calls - start-exec: before running the --exec command Change-Id: Id405e749c590fb95f32e30a7d37c30b6412cf0a5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Moves library resolution on top (hack)José Bollo1-41/+1
Avoid to tune executable byu executable. Should be redefined later. Change-Id: I02e55e642c1797768b7dbcd8406f59199a56891d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-22Bindings V2: Remove explicit references to daemon/serviceJosé Bollo1-1/+0
Usage shown that managing daemon interface and service interface wasn't obvious. This evolution hides the complexity by setting up an internal hidden variable. Change-Id: I667b1ee4e3a7b5ad29d712ee20ad5dd1878b97f3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-19Fix cmake dependencydab_3.99.1dab/3.99.13.99.1Ronan Le Martret1-7/+8
* update documentation (get libmicrohttpd>=0.9.54 from upstream). Change-Id: I361708fecd3b670dba0f32230fa3bcbd86fa9c55 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2017-05-11Compiles for cynara if presentJosé Bollo1-1/+8
Change-Id: If8ef53f8a0a57bf6d19b0da3d13a7794a8d0eef9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-11implement authorisation checkJosé Bollo1-0/+1
Change-Id: I2ef74b715a115acd11fa13744ba921e875f0bc65 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-04Prepare permission for binding version 2José Bollo1-1/+0
Change-Id: I38c1291b3c11a9b436d00ef6dab4f7efb86e4996 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-25genskel: add tiny skeleton generatorJosé Bollo1-0/+1
This adds a tiny generator of skeleton for bindings version 2. This is a research work. Change-Id: Id72f6addfd18ebb866e3b609bb49e74ee676b83d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-21afb-monitor: draft of monitoringJosé Bollo1-0/+1
this is a draft version to be continued. Change-Id: I1062a6f872a2b36d4e0434fb18d1857961d50aab Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-14Create afb-stub-ws by spliting afb-api-wsJosé Bollo1-1/+2
The file afb-stub-ws only carries the protocol of the internal remote calling conventions. It as the following benefits: - it easies transition to symetric connection (not planned) - it allows to have server stub on client socket and conversely, client stub on server socket (planned for debugging). Change-Id: I57dc8e78d7bd63427421a180abcb844f8313d37b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-13Introduce apiset for grouping apisJosé Bollo1-1/+2
This will be used at the end for debugging facilities. Change-Id: I75e3345667e1f58143c77a885e166375680ca194 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-12Add computation of credentialsJosé Bollo1-0/+1
Credentials are computed if possible. Change-Id: I36c7e95a35431b27109c26b51eab690d685862e1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-05Make daemon interface commonJosé Bollo1-0/+1
For the future, having only one piece of code to handle daemon interface to bindings is an improvement. Change-Id: I806c424eb1a82637d27bc84b921612789907d971 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-05Add permission subsystemJosé Bollo1-0/+3
Change-Id: I0bbbf55832faf6413dd6147174934d0d4dc5277d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-04Definitive switch to internal's xreqJosé Bollo1-1/+0
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-03-31Factorize common code for handling requestsJosé Bollo1-0/+1
The common code for session handling is shared using struct afb_xreq. At the moment only hreq leverages the new feature. The objective is double: make the work of writing new internal requests more easy and prepare to check permissions. Change-Id: If3ca311d68c2d8c427d1125f31a2704b150c2c94 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-30Start to implement the bindings V2José Bollo1-0/+1
More work has to be done for merging common code. Change-Id: I72b01901f978854843967c12bfcb3cc59cc10310 Signed-off-by: José Bollo <jose.bollo@iot.bzh>