src/app-framework-binder.git
7 years agoSimplify functions for calls
José Bollo [Mon, 27 Mar 2017 09:23:51 +0000 (11:23 +0200)]
Simplify functions for calls

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>
7 years agoRefactor of threading and signal monitor
José Bollo [Wed, 22 Mar 2017 15:49:53 +0000 (16:49 +0100)]
Refactor of threading and signal monitor

The goal is to allow use of this facilities for
things that are not 'afb_req'.

Change-Id: I0d99c227934ed45136477bf6235bd1541d5f05cf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoInstanciate the environment variables
José Bollo [Tue, 21 Mar 2017 15:28:00 +0000 (16:28 +0100)]
Instanciate the environment variables

Because it could be of interest to transmit the
port and the token in environment variables,
provision is made here to instanciate environment
variables before exec.

Change-Id: I65cc8e052ca9e2831520a19d2da2a96ada7f672e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoIntegration of socket activation for services
José Bollo [Mon, 13 Mar 2017 15:18:23 +0000 (16:18 +0100)]
Integration of socket activation for services

The services provided using the option --ws-server
can now be linked to socket activation of systemd.

When afb-daemon is launched, the api to be provided
by socket activation is declared by adding the
option

   --ws-server=sd:APINAME

Where APINAME is the name of the provided api.

The binder looks to the prefix "sd:" to automatically
use the "listen fd" of name APINAME for serving
the api APINAME.

In the socket activation unit the connection
to this socket must be named using the
directive FileDescriptorName as below:

[socket]
FileDescriptorName=APINAME
...

Change-Id: I281e1a2b9fed3eac3bd0ee27b7f56df99df7bbd6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoBeginning of integration as systemd service
José Bollo [Mon, 13 Mar 2017 14:49:11 +0000 (15:49 +0100)]
Beginning of integration as systemd service

This allows to receive socket activation by names.

Change-Id: I6896dec785e8d434da452ed2d1341016f6eadb60
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agonotify systemd of being started
José Bollo [Mon, 13 Mar 2017 14:16:26 +0000 (15:16 +0100)]
notify systemd of being started

Change-Id: I10251b0800ac44e59d2a17ebd202c9f55c5c9196
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdd comments about always setting INFER_EXTENSION.
Sebastien Douheret [Mon, 6 Mar 2017 09:50:17 +0000 (10:50 +0100)]
Add comments about always setting INFER_EXTENSION.

INFER_EXTENSION must always be set in order to provide right mimetypes for
some files.
For example mimetype for css files must be 'text/css' and not 'text/plain' as
returned by libmagic. If mimetype is not correct, css files of HTML5 webapps
will be not correctly interpreted resulting in a strange rendering in browser
like Chrome.

Change-Id: I7f0d9f97ede19308c87256f7850f5c51135827f3
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agofix SEGFLT when unhendled request
José Bollo [Mon, 27 Feb 2017 08:31:33 +0000 (09:31 +0100)]
fix SEGFLT when unhendled request

Change-Id: I34c657972111db843d0d9d26a1732b21ac519c57
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoEnable INFER_EXTENSION and add well-known mime types.
Sebastien Douheret [Wed, 22 Feb 2017 10:24:14 +0000 (11:24 +0100)]
Enable INFER_EXTENSION and add well-known mime types.

Change-Id: I7c433eea63c01d2b0813a9cc84c12433839bf125
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoFix issue in initialisation of api by sessions
José Bollo [Tue, 21 Feb 2017 18:22:49 +0000 (19:22 +0100)]
Fix issue in initialisation of api by sessions

Change-Id: I72639196ce7462c34a2037cc825cf819add4a2fc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix issue for C++
José Bollo [Tue, 21 Feb 2017 08:22:10 +0000 (09:22 +0100)]
fix issue for C++

Change-Id: I14b5fb9a0f517d5a784cbbc43ca1401877d0f2fe
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix mimetype by using libmagic
José Bollo [Tue, 21 Feb 2017 08:20:22 +0000 (09:20 +0100)]
fix mimetype by using libmagic

Change-Id: I418b7f9323d4847dfef0f1f3f6dd90f6538b2ffb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoUpdate documentation of --roothttp option. 93/8493/1
Sebastien Douheret [Thu, 16 Feb 2017 09:34:56 +0000 (10:34 +0100)]
Update documentation of --roothttp option.

By default when roothttp option is not set, no files are served but
note that apis are still available.

Change-Id: I461b6c94d4d16cf873c0f8fb2543576595ed24c1
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoIgnore Visual Studio Code project 91/8491/1
Sebastien Douheret [Thu, 16 Feb 2017 09:34:39 +0000 (10:34 +0100)]
Ignore Visual Studio Code project

Change-Id: Iecbef1a7887496deb849ab807ebf4de644e66343
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoFix html heading and hyperlink order 65/8465/1
Sebastien Douheret [Wed, 15 Feb 2017 13:40:11 +0000 (14:40 +0100)]
Fix html heading and hyperlink order

Change-Id: I4f52c1c68fa357306faf6cd976a69e65de580fdb
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoImproves documentation and directory management
José Bollo [Thu, 12 Jan 2017 16:34:02 +0000 (17:34 +0100)]
Improves documentation and directory management

Change-Id: I21c102f7439343476765c65011664feece2d2c18
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdd option --random-token
José Bollo [Wed, 11 Jan 2017 17:28:23 +0000 (18:28 +0100)]
Add option --random-token

Also fix a bug in use of getopt_long.

Change-Id: Iffc90104665664c8e5a61fbee70f03f3cdb660cb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoFirst step for grouping processes
José Bollo [Thu, 5 Jan 2017 15:02:14 +0000 (16:02 +0100)]
First step for grouping processes

Actually make afb-daemon the process group leader.

Change-Id: I01ca7bb027416e2446cfa322b69684da4db852e2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoImproves logging
José Bollo [Thu, 5 Jan 2017 14:23:35 +0000 (15:23 +0100)]
Improves logging

Adds error message for errors related to HTTP.

Change-Id: I5a3069528f8e9a7fe9a8dae6c201a783948a565a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdds options --no-httpd and --exec
José Bollo [Wed, 4 Jan 2017 17:52:32 +0000 (18:52 +0100)]
Adds options --no-httpd and --exec

The option option --exec use the remaining arguments
of the command line (at the right of --exec) as a
command to launch with its arguments. Arguments can
use @p (for port), @t (for token) or @@ for @.

When the option --exec is given, the command is launched
as soon as afb-daemon is ready. When the command die,
afb-daemon exits and before exiting, afb-daemon kills
the launched command and its childs.

The option --no-http forbids the activation of
the HTTP server.

Change-Id: Icdd91d84c818796b5ac6ea5d33ff3549a2fe3c25
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadds short option for verbosity
José Bollo [Wed, 4 Jan 2017 16:58:17 +0000 (17:58 +0100)]
adds short option for verbosity

Change-Id: I2282057344b2b986520f1a76f5a3c0a827d63075
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoallows to repeat option --ldpaths
José Bollo [Wed, 4 Jan 2017 15:50:13 +0000 (16:50 +0100)]
allows to repeat option --ldpaths

Change-Id: Id07b02eaef35732416de2fb1c6b24f3f75979ed6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoRefactor of file main.c
José Bollo [Wed, 4 Jan 2017 15:14:52 +0000 (16:14 +0100)]
Refactor of file main.c

File main.c is splitted in 2 files, one for scanning
arguments and the other for setting up the process.

Change-Id: I5f2d7fd354392d13cdeac6c2a8fceaaf551dea22
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoImproves naming of session's module
José Bollo [Tue, 3 Jan 2017 16:52:19 +0000 (17:52 +0100)]
Improves naming of session's module

Make names looking like other names

Change-Id: I63ce3d8a3d84193eca9d517cecb1888d630a9b2d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoRemoves uses of readdir_r
José Bollo [Tue, 3 Jan 2017 16:13:47 +0000 (17:13 +0100)]
Removes uses of readdir_r

Since glibc 2.24, readdir_r is deprecated.

Change-Id: Id0e186e67b7e60bd537a8ba85ede446be0c5095e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agocleanup: removes legacy-named file
José Bollo [Tue, 3 Jan 2017 15:21:51 +0000 (16:21 +0100)]
cleanup: removes legacy-named file

The file include/afb/afb-plugin.h was kept
for compatibility with previous versions.

Change-Id: If144803b5f56e9828ec78de5279520319bbc3342
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoCleanup of the project
José Bollo [Tue, 3 Jan 2017 10:13:47 +0000 (11:13 +0100)]
Cleanup of the project

The bindings "audio", "media" and "radio"
were in the project since its beginning
for historical reasons.

But this bindings msut not be part of the
current tree of sources.

Change-Id: I9d903f094ddc4d2457e63987df0c221d2bd7b4d1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdds 2017 to copyrights
José Bollo [Tue, 3 Jan 2017 10:07:56 +0000 (11:07 +0100)]
Adds 2017 to copyrights

Change-Id: Id85c4eb4e36a05b61346004ba95daa19faf5074f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoUpdate gitreview file for master branch 37/7937/2
Jan-Simon Möller [Wed, 28 Dec 2016 21:28:26 +0000 (22:28 +0100)]
Update gitreview file for master branch

Change-Id: I44fea156e7dc5c5fb16ae16aad7529476b35d485
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
7 years agomain: Removes setting roothttp to . by default
José Bollo [Wed, 14 Dec 2016 15:22:54 +0000 (16:22 +0100)]
main: Removes setting roothttp to . by default

When option --roothttp is not set, the server will
not serve HTTP files.

Change-Id: I16e09f7ad6f735967cde27d5c51758499110fb54
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafb-hsrv: Adds an error when alias dir doesn't exist
José Bollo [Wed, 14 Dec 2016 15:20:50 +0000 (16:20 +0100)]
afb-hsrv: Adds an error when alias dir doesn't exist

Change-Id: Iab0f9b1997f6471ceab8bb43be07d6d00c53fd78
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix html link 51/7551/1
Ronan [Mon, 12 Dec 2016 21:16:42 +0000 (22:16 +0100)]
fix html link

Change-Id: Iafcdcc919352c567bd097ee86aadae02e38c5415
Signed-off-by: Ronan <ronan.lemartret@iot.bzh>
7 years agofix svg path for website 21/7521/1
Ronan [Fri, 9 Dec 2016 16:08:11 +0000 (17:08 +0100)]
fix svg path for website

Change-Id: I059fe29816c0cba1f423d02f5bc7034438843cac
Signed-off-by: Ronan <ronan.lemartret@iot.bzh>
7 years agoFix typo, get diagrams pictures and reordering doc 25/7325/4
Romain Forlot [Mon, 21 Nov 2016 22:25:02 +0000 (23:25 +0100)]
Fix typo, get diagrams pictures and reordering doc

Change-Id: Id8327460cf59b330283a98db8cef3a89ef505d30
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoafb-api-so: adds verbosity on dlopen error
José Bollo [Thu, 17 Nov 2016 16:22:40 +0000 (17:22 +0100)]
afb-api-so: adds verbosity on dlopen error

Change-Id: Ibe42a346c29e71b12d67ebbf43a6fc8152df8202
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoapi-so: cleanup
José Bollo [Mon, 31 Oct 2016 10:16:05 +0000 (11:16 +0100)]
api-so: cleanup

The structure monitoring is not used anymore.

Change-Id: I3b900f7b109b2549f0b4cf17550bb71c4b49d32d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agohook: add few comments
José Bollo [Fri, 28 Oct 2016 12:42:54 +0000 (14:42 +0200)]
hook: add few comments

Change-Id: I453625b70f13a5b01a84b2ac60eb6fb9e0dd0ebd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agohook: adding of hook feature for requests
José Bollo [Wed, 26 Oct 2016 07:23:30 +0000 (09:23 +0200)]
hook: adding of hook feature for requests

The current implementation is for hooking requests.
It allows implementation of command line option for
debugging. Further development is needed to also
handle events and service API. Also a binding for
debugging would be cool.

Change-Id: Ib1ac4711180db7b4097ed92ebbbf1a1a9fd2cc1c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoevent: add ability to get the event name
José Bollo [Fri, 14 Oct 2016 13:13:43 +0000 (15:13 +0200)]
event: add ability to get the event name

Change-Id: Iecfeb4ab07c07715093d729710669abecee722de
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoThreads: handles request with threads
José Bollo [Wed, 3 Aug 2016 18:04:08 +0000 (20:04 +0200)]
Threads: handles request with threads

This implementation handles all requests with threads.
Later implementation could add a mechanism to choose
what request will be handled by threads.

Each API receive its requests in serial order without
reentrancy. Here again, this can change in the future
if a choice is possible to allow reentrant calls.

The signal/event are not processed using threads
in this version. It may change in the future.

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoExplicit dependency on gcc 4.9 or higher
José Bollo [Fri, 7 Oct 2016 12:30:00 +0000 (14:30 +0200)]
Explicit dependency on gcc 4.9 or higher

Needed for _Thread_local keyword

Change-Id: Ia68b2d25fd747b87d95a94ac383c0107b276cf2f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoFix a compiler error
José Bollo [Fri, 7 Oct 2016 12:29:07 +0000 (14:29 +0200)]
Fix a compiler error

Change-Id: Id95c612de55fe5606be945ac74c2c157620c8839
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agominor: improves updt.sh script
José Bollo [Mon, 19 Sep 2016 10:33:05 +0000 (12:33 +0200)]
minor: improves updt.sh script

Change-Id: I0acc567bab126c6e8fef10b294eb0e362222ce5c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoDocumentation: improvements
José Bollo [Mon, 19 Sep 2016 08:54:42 +0000 (10:54 +0200)]
Documentation: improvements

- improves formatting of the documentation on events
- add documentations of functions in headers

Change-Id: Ie39d34fca8bd563a099f6b575c72e314ca08a29d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agocleanup of old unuseful data
José Bollo [Mon, 19 Sep 2016 07:21:07 +0000 (09:21 +0200)]
cleanup of old unuseful data

Change-Id: I849c615c4ff8d08ab170ca22c7d9038706099ff6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoImprovement of the documentation
José Bollo [Fri, 16 Sep 2016 16:47:57 +0000 (18:47 +0200)]
Improvement of the documentation

Change-Id: I8f220d7508d939a16eba956ab1fdf975f4048332
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoIgnore the SIGPIPE
José Bollo [Thu, 15 Sep 2016 13:29:44 +0000 (15:29 +0200)]
Ignore the SIGPIPE

The default action is to stop the daemon.
This is not the intended behaviour because the
sriting errors are checked and EPIPE is treated.

Change-Id: I9132b683e443825e4c056301a89bfad752a99e0c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafb-ws: fix of handling EAGAIN for websockets
José Bollo [Thu, 15 Sep 2016 13:19:23 +0000 (15:19 +0200)]
afb-ws: fix of handling EAGAIN for websockets

Change-Id: I5a48bff9b1ce50adb48884ad15a9cfc7bd7a066d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafb-ws: handle EAGAIN return status
José Bollo [Wed, 14 Sep 2016 21:02:39 +0000 (23:02 +0200)]
afb-ws: handle EAGAIN return status

Change-Id: If325537e36a8db1a3f082fa211d619de7ddd478c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdd the option roothttp
José Bollo [Wed, 31 Aug 2016 12:16:07 +0000 (14:16 +0200)]
Add the option roothttp

This option tells to the HTTP part of the binder the location
of the root directory for HTTP.

Change-Id: I080adcaaee952e375128eff3898f29332939c5f5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agobindings: adds ability to use data of applications
José Bollo [Wed, 31 Aug 2016 12:13:54 +0000 (14:13 +0200)]
bindings: adds ability to use data of applications

The two new verbs 'afb_daemon_rootdir_get_fd' and
'afb_daemon_rootdir_open_locale' allow the bindings to retrieve
its installed global data.

Change-Id: I369997d9e59402a413a929aa650c48613f034183
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agolocale-root: improves the API
José Bollo [Wed, 31 Aug 2016 12:07:37 +0000 (14:07 +0200)]
locale-root: improves the API

Change-Id: I470da7df049abab589d2c4044740cd54de0d35b4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafb-hsrv: expose locale root for alias
José Bollo [Mon, 29 Aug 2016 21:31:47 +0000 (23:31 +0200)]
afb-hsrv: expose locale root for alias

This prepare further use of locale_root
here and ther in the code.

Change-Id: I473e8de79db1cbd69b507f6e0e70733f0f02badc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoMinor
José Bollo [Mon, 29 Aug 2016 21:30:22 +0000 (23:30 +0200)]
Minor

Change-Id: Id2758e83b59d6d8617e7f58635127fc436c9be5a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix bug in reading socket
José Bollo [Mon, 29 Aug 2016 14:19:53 +0000 (16:19 +0200)]
fix bug in reading socket

Change-Id: I2f7daf847f59a450fafa5d7edf5f5984fdc15481
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoenforce locale processing for files
José Bollo [Thu, 25 Aug 2016 21:51:00 +0000 (23:51 +0200)]
enforce locale processing for files

Change-Id: I7de05d2acd02d088a3a2034ad8bccf524b5b6c12
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadd algorithm to seek for locale files
José Bollo [Thu, 25 Aug 2016 17:26:28 +0000 (19:26 +0200)]
add algorithm to seek for locale files

Change-Id: Ie4355db29b157b13c4d93011337b15ca3e5d2571

7 years agoadds accepted lang to global hreq
José Bollo [Thu, 25 Aug 2016 21:19:16 +0000 (23:19 +0200)]
adds accepted lang to global hreq

Change-Id: I6b820e7ab169897259414276eaa0b1f8847d9229
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agomakes a function to ensure trailing slash
José Bollo [Thu, 25 Aug 2016 21:11:17 +0000 (23:11 +0200)]
makes a function to ensure trailing slash

This function is usefull to ensure that links to otherfile
are epanded to directory/otherfile (not directoryotherfile!)

Change-Id: If8ad1c275598b322516c41706b464d5d90067a8e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofactorise code for alias handling
José Bollo [Thu, 25 Aug 2016 18:20:09 +0000 (20:20 +0200)]
factorise code for alias handling

Change-Id: Ia60b50b1e4f859c2ee69919d5f63349af40865b6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix tiny memory leak 2.0.2 blowfish_2.0.2
José Bollo [Tue, 9 Aug 2016 08:12:56 +0000 (10:12 +0200)]
fix tiny memory leak

Change-Id: I7ad19eeb73c613893682824d6becc500277d01d6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix blocking read
José Bollo [Mon, 8 Aug 2016 15:59:58 +0000 (17:59 +0200)]
fix blocking read

Change-Id: I7e39d4ce7c0f83e3398f344ade7e5114cf203efb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix on_event for services
José Bollo [Mon, 8 Aug 2016 12:53:50 +0000 (14:53 +0200)]
fix on_event for services

Change-Id: Id90d53764016abc16db6f4d4fb68b9e16ba492fb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agocleanup of unused variables
José Bollo [Mon, 8 Aug 2016 11:57:52 +0000 (13:57 +0200)]
cleanup of unused variables

Change-Id: I895901fb5af2811d79a96aa0baa7981a5c9f9b3a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadd validity functions
José Bollo [Mon, 8 Aug 2016 11:57:21 +0000 (13:57 +0200)]
add validity functions

Change-Id: I56f4f6aebe673363c8b07c55f68ebbb1362b04fc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoremoving casts to (void*) 2.0.1 blowfish_2.0.1
José Bollo [Thu, 4 Aug 2016 12:33:24 +0000 (14:33 +0200)]
removing casts to (void*)

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix tiny memory leak
José Bollo [Sun, 7 Aug 2016 06:05:07 +0000 (08:05 +0200)]
fix tiny memory leak

Change-Id: I8183da55b6afb0e2d3035ebe8cf371b181ec4257
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoremoving casts to (void*)
José Bollo [Wed, 3 Aug 2016 18:03:13 +0000 (20:03 +0200)]
removing casts to (void*)

Change-Id: I34a4444c1fe8b9fa81c5319f53d154d6fe93916c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agowebsocket transparancy for C/S bindings
José Bollo [Wed, 3 Aug 2016 13:54:48 +0000 (15:54 +0200)]
websocket transparancy for C/S bindings

Change-Id: Ia78621ca4d3298fd45f3486ee64c3785c8ab6d8d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafb-ws: adds function afb_ws_is_connected
José Bollo [Wed, 3 Aug 2016 13:13:59 +0000 (15:13 +0200)]
afb-ws: adds function afb_ws_is_connected

Change-Id: If7f3a2b9a724f28dbd3e4968347892d837ba875d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoapi-dbus: improves 'dbus_req_json'
José Bollo [Wed, 3 Aug 2016 13:13:21 +0000 (15:13 +0200)]
api-dbus: improves 'dbus_req_json'

Change-Id: I6d63d70d30f02422e5f9904722e89f92358186b9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoupdate bindings to the new naming
José Bollo [Tue, 2 Aug 2016 09:42:20 +0000 (11:42 +0200)]
update bindings to the new naming

Change-Id: I75692e7454ec9a863ef72c2bd35e3a8ff0f4c57d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadds vectored function for text and binary
José Bollo [Tue, 2 Aug 2016 09:32:00 +0000 (11:32 +0200)]
adds vectored function for text and binary

Change-Id: I441624cf07fc783f54d1bc9613fee5f9b842e140
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadds extern to declarations
José Bollo [Tue, 2 Aug 2016 09:31:18 +0000 (11:31 +0200)]
adds extern to declarations

Change-Id: If91c5a49e1141d65b2927df708193c5cd38b3b56
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix unexpected ending spaces
José Bollo [Wed, 27 Jul 2016 15:44:27 +0000 (17:44 +0200)]
fix unexpected ending spaces

Change-Id: Ie7ebccb02b42e91457df3bdbf2a6f037b248400e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoExpose use of the event loop
José Bollo [Wed, 27 Jul 2016 13:51:01 +0000 (15:51 +0200)]
Expose use of the event loop

The use of the event loop where previously hidden
in internal deep places of the websocket modules.

This commits enforce the client of the library to
explicitely tell what event loop must be used.
This has 3 effects:
 - you know that the systemd event loop is used
 - you tell the event loop to use (no confusion)
 - you don't depend on afb-common.c

Change-Id: Id13d8a96f981183c299cde414d9bb0cd77fe3daa
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoorthograph
José Bollo [Wed, 27 Jul 2016 13:16:11 +0000 (15:16 +0200)]
orthograph

Change-Id: I354649f885daf89426f3b1612127045fdf1dedcc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafb-client-demo/afb-ws: remove dependency on afb-common.*
Stephane Desneux [Tue, 12 Jul 2016 14:14:51 +0000 (16:14 +0200)]
afb-client-demo/afb-ws: remove dependency on afb-common.*

afb-common.* files are not public and so not distributed
in any development package. This makes difficult to create
a client with sources out-of-tree.

Change-Id: Ib2edd48f864f55821ab590442efdf6d1e2fdcd58
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
7 years agoFix bug when logging during bindings init
José Bollo [Thu, 7 Jul 2016 15:29:26 +0000 (17:29 +0200)]
Fix bug when logging during bindings init

Change-Id: I1901070c94c3ca7e07b167d7c769d111b02cbd64
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoimproves doc for new usages
José Bollo [Fri, 24 Jun 2016 14:19:36 +0000 (16:19 +0200)]
improves doc for new usages

Change-Id: Idb1ae01484d1181904e91d57abafe7bdb8230179
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoimproves verbose messages
José Bollo [Fri, 24 Jun 2016 11:58:56 +0000 (13:58 +0200)]
improves verbose messages

Change-Id: I176f5647512f50dce50d6db2de6204b5bc6e4d52
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadds a warning about afb/afb-plugin.h for GCC
José Bollo [Fri, 24 Jun 2016 08:53:06 +0000 (10:53 +0200)]
adds a warning about afb/afb-plugin.h for GCC

Change-Id: I72b62751fdbeaea3847312c62779fd0bd0ecb3ea
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agovocabulary: moving from 'plugin' to 'binding'
José Bollo [Thu, 23 Jun 2016 18:34:57 +0000 (20:34 +0200)]
vocabulary: moving from 'plugin' to 'binding'

Change-Id: Ic9e118df2bede1fefbb591f8ae7887266b7324ca
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadd .gitreview 09/5909/2
Stephane Desneux [Thu, 23 Jun 2016 10:32:22 +0000 (12:32 +0200)]
add .gitreview

Change-Id: Ifc281223617eb049e485bcd27233509b459eb3b5
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
7 years agoapi-dbus: improves events 61/5961/1
José Bollo [Thu, 23 Jun 2016 09:04:00 +0000 (11:04 +0200)]
api-dbus: improves events

Change-Id: I0d58bed66ebc9eaea63c0863351d03cf458e4198
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoevt: handles broadcasting and tracking 15/5915/1
José Bollo [Fri, 17 Jun 2016 20:31:33 +0000 (22:31 +0200)]
evt: handles broadcasting and tracking

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoevt: exposes name of events 59/5959/1
José Bollo [Fri, 17 Jun 2016 20:06:41 +0000 (22:06 +0200)]
evt: exposes name of events

Change-Id: I1976848be0e8aeb170da37e1254208035e0e741a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoevt: improves comments 57/5957/1
José Bollo [Fri, 17 Jun 2016 18:35:57 +0000 (20:35 +0200)]
evt: improves comments

Change-Id: I6c3e855030af9064335028e51d10c41db85a3f3c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoevt: minor cleanup 55/5955/1
José Bollo [Fri, 17 Jun 2016 08:40:45 +0000 (10:40 +0200)]
evt: minor cleanup

Change-Id: Ice4620cabc5a8643551439a149e80df255438020
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agosession: add cookies 53/5953/1
José Bollo [Thu, 16 Jun 2016 14:20:47 +0000 (16:20 +0200)]
session: add cookies

Change-Id: I1f286597a8d5d97ab9c9cfcefa1b3a13eccd6d3e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agominor reordering of code 51/5951/1
José Bollo [Mon, 13 Jun 2016 14:46:44 +0000 (16:46 +0200)]
minor reordering of code

Change-Id: I0768fa05de116f621dbb6e630dba3024e0886c6d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoService instanciation 49/5949/1
José Bollo [Mon, 13 Jun 2016 14:36:51 +0000 (16:36 +0200)]
Service instanciation

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>
7 years agosubcall: adds an error function 47/5947/1
José Bollo [Fri, 10 Jun 2016 17:38:32 +0000 (19:38 +0200)]
subcall: adds an error function

Change-Id: I9f766c4b880cc741392e5c33b58a2723b5a6f4ef
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agosession: allows individual timeout 45/5945/1
José Bollo [Fri, 10 Jun 2016 17:10:29 +0000 (19:10 +0200)]
session: allows individual timeout

Change-Id: Ibc3412c5a5dd50c23a7b035941d4aed278b62039
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agosession: tiny refactor of creations 43/5943/1
José Bollo [Fri, 10 Jun 2016 15:35:54 +0000 (17:35 +0200)]
session: tiny refactor of creations

Change-Id: Ie4bc15448203621d0f84c9be6f57c68cc88983b4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoimproves readability 41/5941/1
José Bollo [Fri, 10 Jun 2016 14:56:10 +0000 (16:56 +0200)]
improves readability

Change-Id: I27411163aff0ecedad4019094f4a5c46d5a2c342
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agocommon code reuse 39/5939/1
José Bollo [Fri, 10 Jun 2016 12:29:14 +0000 (14:29 +0200)]
common code reuse

Change-Id: I5f400a92165bb380ec5f703dd8ca567e90aebca2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoImproves documentation 37/5937/1
José Bollo [Fri, 10 Jun 2016 11:49:34 +0000 (13:49 +0200)]
Improves documentation

The script updt.sh is revisited to generate better the
meta data.

The format of events is documented.

Change-Id: I3bb7347f3ac0f660196a25a4c0c0432848fe4168
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoMake possible to call a method from a binding 35/5935/1
José Bollo [Thu, 9 Jun 2016 14:59:19 +0000 (16:59 +0200)]
Make possible to call a method from a binding

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>
7 years agodocumentation: switch to pandoc 33/5933/1
José Bollo [Thu, 9 Jun 2016 12:22:22 +0000 (14:22 +0200)]
documentation: switch to pandoc

Change-Id: I60fcea9d370f5b98efa1e08632f5f9682741b8c1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>