aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-02-09 14:35:57 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-02-09 14:35:57 +0100
commit9eeddada7a5481660ab1547dae89be3b470571e6 (patch)
treecdc43185f916e5dbf90df90723a5c7ce345f7047 /src
parent7632c5fdfb2bced129e46adcfe5329e386eee303 (diff)
afm-launch: commits conf file
Change-Id: Ibf1354b444a945b22f90ca53be5b7c7eab1a688a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/afm-launch.c75
1 files changed, 18 insertions, 57 deletions
diff --git a/src/afm-launch.c b/src/afm-launch.c
index c55297a..51ae4b9 100644
--- a/src/afm-launch.c
+++ b/src/afm-launch.c
@@ -35,23 +35,6 @@ extern char **environ;
#include "afm-launch.h"
#include "secmgr-wrap.h"
-/*
-%I icondir FWK_ICON_DIR
-%P port params->port
-%S secret params->secret
-%D datadir params->datadir
-%r rootdir desc->path
-%h homedir desc->home
-%t tag (smack label) desc->tag
-%a appid desc->appid
-%c content desc->content
-%m mime-type desc->type
-%n name desc->name
-%p plugins desc->plugins
-%W width desc->width
-%H height desc->height
-*/
-
#define DEFAULT_TYPE "text/html"
const char separators[] = " \t\n";
@@ -61,46 +44,6 @@ struct execdesc {
char **execs[2];
};
-#if 0
-static const char *args_for_afb_daemon[] = {
- "/usr/bin/afb-daemon",
- "--alias=/icons:%I",
- "--port=%P",
- "--rootdir=%r",
- "--token=%S",
- NULL
-};
-
-static const char *args_for_qmlviewer[] = {
- "/usr/bin/qt5/qmlscene",
- "-fullscreen",
- "-I",
- "%r",
- "-I",
- "%r/imports",
- "%r/%c",
- NULL
-};
-
-static const char *args_for_web_runtime[] = {
- "/usr/bin/web-runtime",
- "http://localhost:%P/%c?token=%S",
- NULL
-};
-
-static const char *args_for_binary[] = {
- "%r/%c",
- NULL
-};
-
-static struct execdesc known_launchers[] = {
- { "text/html", args_for_afb_daemon, args_for_web_runtime },
- { "application/x-executable", args_for_binary, NULL },
- { "text/vnd.qt.qml", args_for_qmlviewer, NULL },
- { NULL, NULL, NULL }
-};
-#endif
-
struct launchers {
int count;
struct execdesc *descs;
@@ -272,6 +215,24 @@ static int read_configuration_file(const char *filepath)
return rc;
}
+/*
+%I icondir FWK_ICON_DIR
+%P port params->port
+%S secret params->secret
+%D datadir params->datadir
+%r rootdir desc->path
+%h homedir desc->home
+%t tag (smack label) desc->tag
+%a appid desc->appid
+%c content desc->content
+%m mime-type desc->type
+%n name desc->name
+%p plugins desc->plugins
+%W width desc->width
+%H height desc->height
+%% %
+*/
+
static char **instantiate_arguments(const char **args, struct afm_launch_desc *desc, struct launchparam *params)
{
const char **iter, *p, *v;