extern const char * const instance_category(const struct inst_info *inst);
extern const char * const instance_cluster(const struct inst_info *inst);
extern const char * const instance_title(const struct inst_info *inst);
-extern const int const instance_auto_launch(const struct inst_info *inst);
+extern const char * const instance_auto_launch(const struct inst_info *inst);
extern const int const instance_priority(const struct inst_info *inst);
extern const struct client_node * const instance_client(const struct inst_info *inst);
extern const double const instance_period(const struct inst_info *inst);
extern const char * const package_pd_path(const struct pkg_info *info);
extern const char * const package_pd_group(const struct pkg_info *info);
extern const int const package_pinup(const struct pkg_info *info);
-extern const int const package_auto_launch(const struct pkg_info *info);
+extern const char * const package_auto_launch(const struct pkg_info *info);
extern const unsigned int const package_size_list(const struct pkg_info *info);
extern const int const package_pd_width(const struct pkg_info *info);
extern const int const package_pd_height(const struct pkg_info *info);
extern int package_set_libexec(struct pkg_info *info, const char *libexec);
extern void package_set_pinup(struct pkg_info *info, int pinup);
-extern void package_set_auto_launch(struct pkg_info *info, int auto_launch);
+extern void package_set_auto_launch(struct pkg_info *info, const char *auto_launch);
extern void package_set_size_list(struct pkg_info *info, unsigned int size_list);
extern void package_set_lb_type(struct pkg_info *info, enum lb_type type);
extern void package_set_pd_type(struct pkg_info *info, enum pd_type type);
extern double parser_period(struct parser *handle);
extern int parser_network(struct parser *handle);
extern int parser_timeout(struct parser *handle);
-extern int parser_auto_launch(struct parser *handle);
+extern const char *parser_auto_launch(struct parser *handle);
extern unsigned int parser_size(struct parser *handle);
extern void parser_get_pdsize(struct parser *handle, unsigned int *width, unsigned int *height);
extern const char *parser_group_str(struct parser *handle);
Name: org.tizen.data-provider-master
Summary: Master data provider
-Version: 0.13.24
+Version: 0.13.25
Release: 1
Group: main/app
License: Flora License
<?xml version="1.0" encoding="utf-8" ?>
<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.nicesj" version="1.0" install-location="auto">
-<livebox appid="org.tizen.nicesj.livebox" primary="true" secured="false" auto_launch="true" network="false" abi="c" timeout="20" period="10.0" libexec="/usr/apps/org.tizen.myapp/libexec/liblive-org.tizen.nicesj.so" pinup="false" script="edje">
+<livebox appid="org.tizen.nicesj.livebox" primary="true" secured="false" network="false" abi="c" timeout="20" period="10.0" libexec="/usr/apps/org.tizen.myapp/libexec/liblive-org.tizen.nicesj.so" pinup="false" script="edje">
<label>My livebox</label>
<icon>/usr/share/icons/small/org.tizen.live-nicesj.png</icon>
<label xml:lang="en_US">Sample</label>
<label xml:lang="ko_KR">Hangul</label>
<content>Content information</content>
+ <launch>org.tizen.nicesj</launch>
+
<setup>org.tizen.nicesj</setup>
<box type="image">
* = box_type = { text | buffer | script | image }
* = pd_type = { text | buffer | script }
* = network = { 1 | 0 }
- * = auto_launch = { 1 | 0 }
* = secured = { 1 | 0 }
*
*
* +-------+------+---------+-------------+---------+---------+-----------+-------+
* | - | - | - | - | - | - | - | - |
* +-------+------+---------+-------------+---------+---------+-----------+-------+
- * CREATE TABLE client ( pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, auto_launch INTEGER, pd_size TEXT, content TEXT DEFAULT "default", nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) )
+ * CREATE TABLE client ( pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, auto_launch TEXT, pd_size TEXT, content TEXT DEFAULT "default", nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) )
*
- * = auto_launch = { 1 | 0 }
+ * = auto_launch = UI-APPID
* = pd_size = WIDTHxHEIGHT
*
*
struct livebox {
xmlChar *pkgid;
int secured;
- int auto_launch;
int network;
+ xmlChar *auto_launch;
xmlChar *abi;
xmlChar *name; /* Default name */
xmlChar *icon; /* Default icon */
ddl = "CREATE TABLE client (" \
"pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, " \
- "auto_launch INTEGER, pd_size TEXT, content TEXT DEFAULT 'default', nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE)";
+ "auto_launch TEXT, pd_size TEXT, content TEXT DEFAULT 'default', nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE)";
if (sqlite3_exec(s_info.handle, ddl, NULL, NULL, &err) != SQLITE_OK) {
ErrPrint("Failed to execute the DDL (%s)\n", err);
return -EIO;
goto out;
}
- ret = sqlite3_bind_int(stmt, 4, livebox->auto_launch);
+ ret = sqlite3_bind_text(stmt, 4, (char *)livebox->auto_launch, -1, NULL);
if (ret != SQLITE_OK) {
DbgPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
ret = -EIO;
struct dlist *il;
struct dlist *in;
+ xmlFree(livebox->auto_launch);
xmlFree(livebox->pkgid);
xmlFree(livebox->abi);
xmlFree(livebox->name);
livebox->i18n_list = dlist_append(livebox->i18n_list, i18n);
}
+static inline void update_launch(struct livebox *livebox, xmlNodePtr node)
+{
+ xmlChar *launch;
+ launch = xmlNodeGetContent(node);
+ if (!launch) {
+ DbgPrint("Has no launch\n");
+ return;
+ }
+
+ livebox->auto_launch = xmlStrdup(launch);
+ if (!livebox->auto_launch) {
+ ErrPrint("Failed to duplicate string: %s\n", (char *)launch);
+ return;
+ }
+}
+
static inline void update_setup(struct livebox *livebox, xmlNodePtr node)
{
xmlChar *setup;
xmlFree(tmp);
}
- if (xmlHasProp(node, (const xmlChar *)"auto_launch")) {
- tmp = xmlGetProp(node, (const xmlChar *)"auto_launch");
- livebox->auto_launch = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
- xmlFree(tmp);
- } else {
- livebox->auto_launch = 1; /* Default value */
- }
-
if (xmlHasProp(node, (const xmlChar *)"network")) {
tmp = xmlGetProp(node, (const xmlChar *)"network");
livebox->network = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
update_setup(livebox, node);
continue;
}
+
+ if (!xmlStrcasecmp(node->name, (const xmlChar *)"launch")) {
+ update_launch(livebox, node);
+ continue;
+ }
}
return db_insert_livebox(livebox, appid);
struct buffer_info *buffer;
} canvas;
- int auto_launch;
+ const char *auto_launch;
} lb;
struct {
else
pd_file = "";
- packet = packet_create_noack("created", "dsssiiiissssidiiiiidsi",
+ packet = packet_create_noack("created", "dsssiiiisssssdiiiiidsi",
inst->timestamp,
package_name(inst->info), inst->id, inst->content,
inst->lb.width, inst->lb.height,
if (!inst->client)
client_browse_list(inst->cluster, inst->category, update_client_list, inst);
- packet = packet_create_noack("created", "dsssiiiissssidiiiiidsi",
+ packet = packet_create_noack("created", "dsssiiiisssssdiiiiidsi",
inst->timestamp,
package_name(inst->info), inst->id, inst->content,
inst->lb.width, inst->lb.height,
if (inst->update_timer)
ecore_timer_del(inst->update_timer);
+ /*!
+ * \note
+ *
+ * inst->lb.auto_launch
+ *
+ * will be released by the package object
+ * it is readonly value for instances
+ */
DbgFree(inst->category);
DbgFree(inst->cluster);
DbgFree(inst->content);
return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, change_group_cb, cbdata, 0);
}
-HAPI const int const instance_auto_launch(const struct inst_info *inst)
+HAPI const char * const instance_auto_launch(const struct inst_info *inst)
{
return inst->lb.auto_launch;
}
return -EIO;
}
- package_set_auto_launch(info, sqlite3_column_int(stmt, 0));
+ package_set_auto_launch(info, (const char *)sqlite3_column_text(stmt, 0));
+
tmp = (const char *)sqlite3_column_text(stmt, 1);
if (tmp && strlen(tmp)) {
if (sscanf(tmp, "%dx%d", &width, &height) != 2) {
} info;
unsigned int size_list;
- int auto_launch;
+ char *auto_launch;
int pinup;
} lb;
DbgFree(info->abi);
DbgFree(info->pkgname);
DbgFree(info->libexec);
+ DbgFree(info->lb.auto_launch);
DbgFree(info);
}
info->period = MINIMUM_PERIOD;
info->lb.size_list = parser_size(parser);
- info->lb.auto_launch = parser_auto_launch(parser);
+
+ str = parser_auto_launch(parser);
+ str = str ? str : "";
+ info->lb.auto_launch = strdup(str);
+ if (!info->lb.auto_launch) {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ DbgFree(info->abi);
+ DbgFree(info->script);
+ if (info->pd.type == PD_TYPE_SCRIPT) {
+ DbgFree(info->pd.info.script.path);
+ DbgFree(info->pd.info.script.group);
+ }
+
+ if (info->lb.type == LB_TYPE_SCRIPT) {
+ DbgFree(info->lb.info.script.path);
+ DbgFree(info->lb.info.script.group);
+ }
+ parser_unload(parser);
+ return -ENOMEM;
+ }
+
info->secured = parser_secured(parser);
info->lb.pinup = parser_pinup(parser);
info->lb.pinup = pinup;
}
-HAPI const int const package_auto_launch(const struct pkg_info *info)
+HAPI const char * const package_auto_launch(const struct pkg_info *info)
{
return info->lb.auto_launch;
}
-HAPI void package_set_auto_launch(struct pkg_info *info, int auto_launch)
+HAPI void package_set_auto_launch(struct pkg_info *info, const char *auto_launch)
{
- info->lb.auto_launch = auto_launch;
+ info->lb.auto_launch = strdup(auto_launch);
+ if (!info->lb.auto_launch) {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ return;
+ }
}
HAPI const unsigned int const package_size_list(const struct pkg_info *info)
double period;
int timeout;
int network;
- int auto_launch;
+ char *auto_launch;
unsigned int size;
unsigned int pd_width;
unsigned int pd_height;
return handle->timeout;
}
-HAPI int parser_auto_launch(struct parser *handle)
+HAPI const char *parser_auto_launch(struct parser *handle)
{
return handle->auto_launch;
}
if (!rtrim(buffer))
return;
- item->auto_launch = !!atoi(buffer);
+ item->auto_launch = strdup(buffer);
+ if (!item->auto_launch) {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ return;
+ }
}
static void size_handler(struct parser *item, char *buffer)
item->lb_group = NULL;
item->pd_width = 0;
item->pd_height = 0;
- item->auto_launch = 1;
+ item->auto_launch = NULL;
item->size = 0x00000001;
item->group = NULL;
item->secured = 0;
{
s_list = eina_list_remove(s_list, item);
+ DbgFree(item->auto_launch);
DbgFree(item->abi);
DbgFree(item->script);
DbgFree(item->group);