afm-launch: commits conf file
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 9 Feb 2016 13:35:57 +0000 (14:35 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 9 Feb 2016 13:35:57 +0000 (14:35 +0100)
Change-Id: Ibf1354b444a945b22f90ca53be5b7c7eab1a688a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
conf/afm-launch.conf
src/afm-launch.c

index 771569b..a572c88 100644 (file)
@@ -15,7 +15,7 @@
 # %% %
 
 text/html
-       /usr/bin/afb-daemon --alias=/icons:%I --port=%P --rootdir=%r --token=%S --sessiondir=%D
+       /usr/bin/afb-daemon --alias=/icons:%I --port=%P --rootdir=%r --token=%S --sessiondir=%D/.afb-daemon
        /usr/bin/web-runtime http://localhost:%P/%c?token=%S
 
 application/x-executable
index c55297a..51ae4b9 100644 (file)
@@ -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;