diff options
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rw-r--r-- | conf/afm-launch.conf | 2 | ||||
-rw-r--r-- | src/afm-db.c | 10 | ||||
-rw-r--r-- | src/afm-launch.c | 8 | ||||
-rw-r--r-- | src/afm-launch.h | 2 | ||||
-rw-r--r-- | src/afm-run.c | 4 |
6 files changed, 18 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c2511af..0591847 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,19 +32,18 @@ SET(PROJECT_NAME "AFM Main") SET(PROJECT_PRETTY_NAME "Application Framework Main") SET(PROJECT_DESCRIPTION "Secured Application framework") SET(PROJECT_VERSION "1.0") -SET(PROJECT_URL "https://github.com/iotbzh/afm-main") setc(USE_LIBZIP 1) setc(USE_SIMULATION 1) -setc(afm_name "aglfwk") -setc(afm_confdir "${CMAKE_INSTALL_SYSCONFDIR}/${afm_name}") -setc(afm_datadir "${CMAKE_INSTALL_DATADIR}/${afm_name}") +setc(afm_name "afm") +setc(afm_confdir "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${afm_name}") +setc(afm_datadir "${CMAKE_INSTALL_FULL_DATADIR}/${afm_name}") setc(afm_appdir "${afm_datadir}/applications") setc(afm_icondir "${afm_datadir}/icons") setc(afm_prefix "urn:agl:") setc(afm_prefix_permission "${afm_prefix}perm:") -setc(afm_prefix_plugin "${afm_prefix}plugin:") +setc(afm_prefix_binding "${afm_prefix}binding:") setc(afm_user_appdir "app-data") setc(wgtpkg_trusted_cert_dir "${afm_confdir}/certs") @@ -54,7 +53,7 @@ endmacro(defstr) defstr(FWK_CONFIG_DIR "${afm_confdir}") defstr(FWK_PREFIX_PERMISSION "${afm_prefix_permission}") -defstr(FWK_PREFIX_PLUGIN "${afm_prefix_plugin}") +defstr(FWK_PREFIX_BINDING "${afm_prefix_binding}") defstr(FWK_ICON_DIR "${afm_icondir}") defstr(FWK_APP_DIR "${afm_appdir}") defstr(FWK_USER_APP_DIR "${afm_user_appdir}") diff --git a/conf/afm-launch.conf b/conf/afm-launch.conf index 4dd721b..a012904 100644 --- a/conf/afm-launch.conf +++ b/conf/afm-launch.conf @@ -1,5 +1,6 @@ # %% % # %a appid +# %b bindings # %c content # %D datadir # %H height @@ -7,7 +8,6 @@ # %I icondir # %m mime-type # %n name -# %p plugins # %P port # %R readyfd # %r rootdir diff --git a/src/afm-db.c b/src/afm-db.c index b650d67..034617b 100644 --- a/src/afm-db.c +++ b/src/afm-db.c @@ -39,9 +39,9 @@ * path: STRING, the path of the root directory for the application * content: STRING, the relative path to the entryu point of the application * type: STRING, the mime type describing the type 'content' - * plugins: ARRAY, array of plugins + * bindings: ARRAY, array of bindings * [ - * STRING, path to the plugin + * STRING, path to the binding * ] * public: OBJECT, public content describing the application widget * { @@ -139,7 +139,7 @@ static int addwgt(struct afm_apps *apps, const char *path, if (!pub) goto error; - plugs = j_add_new_array(priv, "plugins"); + plugs = j_add_new_array(priv, "bindings"); if (!plugs) goto error; @@ -157,10 +157,10 @@ static int addwgt(struct afm_apps *apps, const char *path, || !j_add_string(pub, "author", desc->author)) goto error; - /* extract plugins from features */ + /* extract bindings from features */ feat = desc->features; while (feat) { - static const char prefix[] = FWK_PREFIX_PLUGIN; + static const char prefix[] = FWK_PREFIX_BINDING; if (!memcmp(feat->name, prefix, sizeof prefix - 1)) { str = json_object_new_string ( feat->name + sizeof prefix - 1); diff --git a/src/afm-launch.c b/src/afm-launch.c index 87c5b12..88402c9 100644 --- a/src/afm-launch.c +++ b/src/afm-launch.c @@ -487,6 +487,7 @@ static int mkport() /* %% % %a appid desc->appid +%b bindings desc->bindings %c content desc->content %D datadir params->datadir %H height desc->height @@ -494,7 +495,6 @@ static int mkport() %I icondir FWK_ICON_DIR %m mime-type desc->type %n name desc->name -%p plugins desc->plugins %P port params->port %r rootdir desc->path %R readyfd params->readyfd @@ -571,6 +571,9 @@ static union arguments instantiate_arguments( c = *p++; switch (c) { case 'a': v = desc->appid; break; + case 'b': + v = "" /*TODO:desc->bindings*/; + break; case 'c': v = desc->content; break; case 'D': v = params->datadir; break; case 'H': @@ -589,9 +592,6 @@ static union arguments instantiate_arguments( params->port); v = port; break; - case 'p': - v = "" /*TODO:desc->plugins*/; - break; case 'R': if(!data) sprintf(readyfd, "%d", diff --git a/src/afm-launch.h b/src/afm-launch.h index ec5a88a..b6c59f6 100644 --- a/src/afm-launch.h +++ b/src/afm-launch.h @@ -26,7 +26,7 @@ struct afm_launch_desc { const char *type; /* type to launch */ const char *name; /* name of the application */ const char *home; /* home directory of the applications */ - const char **plugins; /* plugins for the application */ + const char **bindings; /* bindings for the application */ int width; /* requested width */ int height; /* requested height */ enum afm_launch_mode mode; /* launch mode */ diff --git a/src/afm-run.c b/src/afm-run.c index 16b20bd..c5d1552 100644 --- a/src/afm-run.c +++ b/src/afm-run.c @@ -388,11 +388,11 @@ static int fill_launch_desc(struct json_object *appli, return -1; } - /* plugins */ + /* bindings */ { /* TODO */ static const char *null = NULL; - desc->plugins = &null; + desc->bindings = &null; } /* finaly */ |