summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2016-03-23http-svc: renamingJosé Bollo1-20/+30
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-23afb-hreq: adds redirect for directoriesJosé Bollo1-31/+40
Change-Id: I6e069506025687b3bb4e61864667358f4f527e62 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-23afb-hreq: creation of hreq classeJosé Bollo4-222/+282
Change-Id: I13bc04fe145a65f5f05a9b75ef470e952f6e191d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-23http-svc: internal renamingJosé Bollo1-21/+21
Changes the names of structures: - struct afb_req becomes struct afb_hreq - struct afb_req_post becomes struct afb_hreq_post This new 'h', meaning HTTP, is insert to avoid mix-up with api requests. Change-Id: Ief08ff2d5494a2a0322cb2fa1903da90ec91f147 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-23http-svc: handle alises more efficientlyjobol1-12/+38
but buggy see later commit Change-Id: I82557a20f646bf3ceb159fc5e664a9a5655d2011 Signed-off-by: jobol <jobol@nonadev.net>
2016-03-23afb-method: creationjobol4-86/+141
also changed the licensing Change-Id: Ib50a6991b066a00363f36688dd485c7772014088 Signed-off-by: jobol <jobol@nonadev.net>
2016-03-18http-svc: work in progress proposalJosé Bollo1-277/+590
This commits is a proposal for rewriting part of the daemon. Change-Id: I2491530bc281c8fd674ee3ce01ac5b904387d7d1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-18http-svc: fix bug of uninitialized responseJosé Bollo1-3/+2
Change-Id: I98dd53d6994e11d674916546173875196732aabc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-17main: split the main in two partsJosé Bollo1-33/+49
Change-Id: I327ad2ad4f94b784685fb7fef972f8d9e85b8f92 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-17main: use valid exit valueJosé Bollo2-16/+16
Change-Id: Id49850dbb1152f4b6cbdbafc42268974e5071897 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-17main: change location of AFB_options definitionJosé Bollo1-2/+9
The definition of AFB_options is not of interest other places than main.c. Change-Id: Id0af73a749554c02d7578db518e41628e2793008 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-17local-def: dispatch some definitionsJosé Bollo2-1/+5
local-def.h contains too many things. This commit is a little step for cleaning it. Change-Id: I487860f9f56adbd40cae12a3b19930bbb31c67bc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-17removed private api and fix some few warningsJosé Bollo1-17/+3
Change-Id: I8d4427c94ca2b88a4f1add70b065d0b6d0865286 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-16Add warning detection and improveJosé Bollo5-55/+37
Change-Id: Id4fc86b86d55aac578d84b4d2357c1a2e600c58b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-03-16http-svc: switch to epoll modelJosé Bollo1-4/+23
This prepares to handle notification. It has the side effect to make the server mono-threaded. This might be temporarily or forever, depending on next studies. Change-Id: I8a8b2b68c78c33b3ca861180bf120cf09a24b05e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-23refactor cookie to add #portJosé Bollo2-2/+4
Change-Id: Ieac2936413a59b80db66e9ba69d586d7fa481ef8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-18main: fix parsing of option aliasJosé Bollo1-4/+8
Change-Id: Ib0eb70e94fabc61ef6ceb22bafa6006d759a7984 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-17Allow Multiple TokenCreate when --token=""Fulup Ar Foll1-1/+1
2016-02-17Merge origin/masterFulup Ar Foll4-63/+89
2016-02-17Allow Multiple TokenCreate when --token=""Fulup Ar Foll2-15/+17
2016-02-15add option for signaling readynessJosé Bollo1-0/+13
Change-Id: I22e64d41f51683c6c15df77b546e3cc98f427eec Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-15rest-api: fix verbosity of upload messageJosé Bollo1-1/+2
Change-Id: Ie9f2e513bf44b46eabf644792cc7ad0d04f10755 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-14adds mode managementJosé Bollo2-5/+5
Change-Id: I73240e346a06924c314961871e789c69e279cb48 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-11session: reset the timestamp on refreshJosé Bollo1-0/+4
Change-Id: Id685bcfa91791427a92aa69eb70cfcd1f8766e46 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-09Adds a new option: modeJosé Bollo1-29/+47
The option mode can have 3 values: local, remote, global. It indicates wether the daemon serves: - loopback (local) - external interface (remote) - both (global) Change-Id: Ibd6c25da692e607b8e0ce793da11cca88db050a2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-08avoid use of keyword "private"José Bollo1-14/+14
Change-Id: I7efe1ce2e6a49b6211298e509ae0b21573d6776a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-02-08removes unused smack fieldJosé Bollo1-11/+0
Change-Id: I3388fa366c44c96d2ebf37ba57ed1b3acce82869 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-01-28rest-api: catch error from pluginRegisterFct()Yannick Gicquel1-2/+4
in case NULL is returned, log an error and do not register the plugin. Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
2016-01-28rest-api: fixup AFB_plugins allocated referencesYannick Gicquel1-5/+4
plugins handles pointer to AFB_plugin structures which are located in each dynamically loaded plugin. Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
2016-01-27Fix Error MessageFulup Ar Foll1-1/+1
2016-01-26Merge branch 'master' of github.com:iotbzh/afb-daemonFulup Ar Foll1-1/+1
2016-01-26fixe getPostPath for afm-mail pluginFulup Ar Foll1-2/+2
2016-01-26Fix getPostFile() upload function, return bare JSON in listManuel Bachmann1-1/+1
getPostFile() does not fail anymore when creating a new folder (return value was incorrect). Media Plugin list API now directly returns JSON, with track list array indexed as "list". Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
2016-01-26Fixed Post File UploadFulup Ar Foll2-28/+31
2016-01-26GetPostPath OngoingFulup Ar Foll1-0/+12
2016-01-25main: minor improvement of daemonizingJosé Bollo1-1/+1
Change-Id: Iba9cb6ae3e18524a99cb82e521b4ca1aeec8d972 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-01-25http-svc: refactor of httpdLoopJosé Bollo2-14/+5
Reading stdin drives to problems when afb-daemon is launched with its input either closed or connected to /dev/null. Conversely, launching afb-daemon with the option --daemon is not always possible because it really daemonizes itself what forbids to control it or its group directly. Change-Id: I182741226762110809e50d68154f5d29d133303b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-01-25indentJosé Bollo1-1/+1
Change-Id: Icea77134a93c643a39bd6fd1d19a7820f56fe230 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-01-25main: frankly removes smack argumentJosé Bollo1-8/+0
Because setting smack requires capabilities, it is better to let the system configure correctly afb-daemon context: smack, capabilities, groups, user. Change-Id: I49edffd38216e735b36b7e2c6c4554fbd8e98f37 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-01-11Audio Plugin: add PulseAudio supportManuel Bachmann1-7/+0
If PulseAudio development libraries are present, Audio plugin will now support it. It may still fall back to ALSA if a PulseAudio server is not found at runtime. PulseAudio backend supports multiple clients using one audio adapter. (+ various fixes and style improvements) Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
2015-12-30Fix Session CookieFulup Ar Foll1-2/+2
2015-12-30Fix Cookie Size [was to small]Fulup Ar Foll1-2/+2
2015-12-30Added EmptyPost handlingFulup Ar Foll1-5/+4
2015-12-29Switch to unique token modelFulup Ar Foll1-1/+1
Token/Session Plugin is now able to issue a globally-valid token (re-useable with all Plugins, so that an application using multiple plugins is not forced to manage multiple tokens anymore). Adapt Audio & Radio Plugins to this model (init functions do not create a token anymore, check for a prior existing one). Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh> Author: Fulup Ar Foll <fulup@iot.bzh> Author: Manuel Bachmann <manuel.bachmann@iot.bzh>
2015-12-28Fix plugin loading logic, radio plugin loadingManuel Bachmann1-18/+19
We should not free() a dlopened pointer. Internal plugin handle was renamed, adapt radio plugin. Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
2015-12-24Fixed Client Session Context by PluginFulup Ar Foll2-8/+8
2015-12-23Implement --ldpaths=dir1:dir2:dir...Fulup Ar Foll3-52/+98
2015-12-23Add plugin handle into request, pass it to free callbackManuel Bachmann2-24/+31
We need the global handle in requests, and in the free function. Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
2015-12-23Restore Previous functionalities with a unique TokenFulup Ar Foll2-6/+8
2015-12-22New Session Model [compile but not tested]Fulup Ar Foll3-73/+66