Replace liveinfo with widget-mgr
authorSung-jae Park <nicesj.park@samsung.com>
Wed, 1 Apr 2015 06:41:55 +0000 (15:41 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Wed, 1 Apr 2015 06:41:55 +0000 (15:41 +0900)
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: Ibec857d029cfb5de3905d7ee6f4990b9108e895c

15 files changed:
CMakeLists.txt [changed mode: 0755->0644]
include/liveinfo.h [deleted file]
include/widget-mgr.h [new file with mode: 0644]
packaging/data-provider-master.manifest [changed mode: 0755->0644]
pkgmgr_widget/CMakeLists.txt [changed mode: 0755->0644]
pkgmgr_widget/widget.xml [changed mode: 0755->0644]
pkgmgr_widget/widget.xsd [changed mode: 0755->0644]
src/dead_monitor.c
src/server.c
src/widget-mgr.c [moved from src/liveinfo.c with 78% similarity]
widget-mgr/CMakeLists.txt [moved from util_liveinfo/CMakeLists.txt with 88% similarity, mode: 0644]
widget-mgr/include/node.h [moved from util_liveinfo/include/node.h with 100% similarity]
widget-mgr/include/widget-info.h [moved from util_liveinfo/include/liveinfo.h with 100% similarity]
widget-mgr/src/node.c [moved from util_liveinfo/src/node.c with 100% similarity]
widget-mgr/src/widget-mgr.c [moved from util_liveinfo/src/liveinfo.c with 99% similarity]

old mode 100755 (executable)
new mode 100644 (file)
index 2c0f875..bbca47f
@@ -121,7 +121,7 @@ IF (LIVEBOX)
                src/client_rpc.c
                src/group.c
                src/script_handler.c
-               src/liveinfo.c
+               src/widget-mgr.c
                src/pkgmgr.c
                src/event.c
                src/file_service.c
@@ -217,7 +217,7 @@ ENDIF (LIVEBOX)
 
 IF (X11_SUPPORT)
        IF ("${ENGINEER_BINARY}" STREQUAL "true")
-               ADD_SUBDIRECTORY(util_liveinfo)
+               ADD_SUBDIRECTORY(widget-mgr)
        ENDIF ("${ENGINEER_BINARY}" STREQUAL "true")
 ENDIF (X11_SUPPORT)
 
diff --git a/include/liveinfo.h b/include/liveinfo.h
deleted file mode 100644 (file)
index f951e26..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2013  Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-struct liveinfo;
-
-extern int liveinfo_init(void);
-extern void liveinfo_fini(void);
-extern struct liveinfo *liveinfo_create(pid_t pid, int handle);
-extern void liveinfo_destroy(struct liveinfo *info);
-
-extern struct liveinfo *liveinfo_find_by_pid(pid_t pid);
-extern struct liveinfo *liveinfo_find_by_handle(int handle);
-
-extern const char *liveinfo_filename(struct liveinfo *info);
-extern pid_t liveinfo_pid(struct liveinfo *info);
-extern FILE *liveinfo_fifo(struct liveinfo *info);
-extern int liveinfo_open_fifo(struct liveinfo *info);
-extern void liveinfo_close_fifo(struct liveinfo *info);
-extern void liveinfo_set_data(struct liveinfo *info, void *data);
-extern void *liveinfo_data(struct liveinfo *info);
-
-/* End of a file */
diff --git a/include/widget-mgr.h b/include/widget-mgr.h
new file mode 100644 (file)
index 0000000..7061548
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2013  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+struct widget_mgr;
+
+extern int widget_mgr_init(void);
+extern void widget_mgr_fini(void);
+extern struct widget_mgr *widget_mgr_create(pid_t pid, int handle);
+extern void widget_mgr_destroy(struct widget_mgr *info);
+
+extern struct widget_mgr *widget_mgr_find_by_pid(pid_t pid);
+extern struct widget_mgr *widget_mgr_find_by_handle(int handle);
+
+extern const char *widget_mgr_filename(struct widget_mgr *info);
+extern pid_t widget_mgr_pid(struct widget_mgr *info);
+extern FILE *widget_mgr_fifo(struct widget_mgr *info);
+extern int widget_mgr_open_fifo(struct widget_mgr *info);
+extern void widget_mgr_close_fifo(struct widget_mgr *info);
+extern void widget_mgr_set_data(struct widget_mgr *info, void *data);
+extern void *widget_mgr_data(struct widget_mgr *info);
+
+/* End of a file */
old mode 100755 (executable)
new mode 100644 (file)
index ea58e10..850aa0a
@@ -38,7 +38,7 @@
        <assign>
                <!-- Executable file -->
                <filesystem path="/usr/bin/data-provider-master" label="data-provider-master::bin" exec_label="data-provider-master::bin" />
-               <filesystem path="/opt/usr/devel/usr/bin/liveinfo" label="data-provider-master::bin" exec_label="data-provider-master::bin" />
+               <filesystem path="/opt/usr/devel/usr/bin/widget-mgr" label="data-provider-master::bin" exec_label="data-provider-master::bin" />
                <filesystem path="/opt/usr/devel/usr/bin" label="_" />
 
                <!-- Configuration data -->
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 9755b80..1b80186 100644 (file)
@@ -32,7 +32,7 @@
 #include "fault_manager.h"
 #include "util.h"
 #include "debug.h"
-#include "liveinfo.h"
+#include "widget-mgr.h"
 #include "conf.h"
 
 struct cb_item {
@@ -51,7 +51,7 @@ static int evt_cb(int handle, void *data)
 {
        struct slave_node *slave;
        struct client_node *client;
-       struct liveinfo *liveinfo;
+       struct widget_mgr *widget_mgr;
        struct cb_item *dead_item;
        Eina_List *l;
        Eina_List *n;
@@ -98,9 +98,9 @@ static int evt_cb(int handle, void *data)
                return 0;
        }
 
-       liveinfo = liveinfo_find_by_handle(handle);
-       if (liveinfo) {
-               liveinfo_destroy(liveinfo);
+       widget_mgr = widget_mgr_find_by_handle(handle);
+       if (widget_mgr) {
+               widget_mgr_destroy(widget_mgr);
                return 0;
        }
 
index 6950fd3..c333fab 100644 (file)
@@ -52,7 +52,7 @@
 #include "fault_manager.h"
 #include "group.h"
 #include "xmonitor.h"
-#include "liveinfo.h"
+#include "widget-mgr.h"
 #include "io.h"
 #include "event.h"
 #include "dead_monitor.h"
@@ -8380,9 +8380,9 @@ out:
        return result;
 }
 
-static struct packet *liveinfo_hello(pid_t pid, int handle, const struct packet *packet)
+static struct packet *widget_mgr_hello(pid_t pid, int handle, const struct packet *packet)
 {
-       struct liveinfo *info;
+       struct widget_mgr *info;
        struct packet *result;
        int ret;
        const char *fifo_name;
@@ -8397,16 +8397,16 @@ static struct packet *liveinfo_hello(pid_t pid, int handle, const struct packet
                goto out;
        }
 
-       info = liveinfo_create(pid, handle);
+       info = widget_mgr_create(pid, handle);
        if (!info) {
-               ErrPrint("Failed to create a liveinfo object\n");
+               ErrPrint("Failed to create a widget_mgr object\n");
                fifo_name = "";
                ret = WIDGET_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = 0;
-       fifo_name = liveinfo_filename(info);
+       fifo_name = widget_mgr_filename(info);
        DbgPrint("FIFO Created: %s (Serve for %d)\n", fifo_name, pid);
 
 out:
@@ -8425,10 +8425,10 @@ static Eina_Bool lazy_slave_list_cb(void *info)
        Eina_List *l;
        struct slave_node *slave;
 
-       liveinfo_open_fifo(info);
-       fp = liveinfo_fifo(info);
+       widget_mgr_open_fifo(info);
+       fp = widget_mgr_fifo(info);
        if (!fp) {
-               liveinfo_close_fifo(info);
+               widget_mgr_close_fifo(info);
                return ECORE_CALLBACK_CANCEL;
        }
 
@@ -8450,13 +8450,13 @@ static Eina_Bool lazy_slave_list_cb(void *info)
        }
 
        fprintf(fp, "EOD\n");
-       liveinfo_close_fifo(info);
+       widget_mgr_close_fifo(info);
        return ECORE_CALLBACK_CANCEL;
 }
 
-static struct packet *liveinfo_slave_list(pid_t pid, int handle, const struct packet *packet)
+static struct packet *widget_mgr_slave_list(pid_t pid, int handle, const struct packet *packet)
 {
-       struct liveinfo *info;
+       struct widget_mgr *info;
        double timestamp;
 
        if (packet_get(packet, "d", &timestamp) != 1) {
@@ -8464,7 +8464,7 @@ static struct packet *liveinfo_slave_list(pid_t pid, int handle, const struct pa
                goto out;
        }
 
-       info = liveinfo_find_by_pid(pid);
+       info = widget_mgr_find_by_pid(pid);
        if (!info) {
                ErrPrint("Invalid request\n");
                goto out;
@@ -8500,16 +8500,16 @@ static Eina_Bool inst_list_cb(void *info)
        Eina_List *inst_list;
        struct inst_info *inst;
 
-       pkgname = liveinfo_data(info);
+       pkgname = widget_mgr_data(info);
        if (!pkgname) {
                return ECORE_CALLBACK_CANCEL;
        }
 
-       liveinfo_open_fifo(info);
-       fp = liveinfo_fifo(info);
+       widget_mgr_open_fifo(info);
+       fp = widget_mgr_fifo(info);
        if (!fp) {
                ErrPrint("Invalid fp\n");
-               liveinfo_close_fifo(info);
+               widget_mgr_close_fifo(info);
                free(pkgname);
                return ECORE_CALLBACK_CANCEL;
        }
@@ -8542,23 +8542,23 @@ static Eina_Bool inst_list_cb(void *info)
 
 close_out:
        fprintf(fp, "EOD\n");
-       liveinfo_close_fifo(info);
+       widget_mgr_close_fifo(info);
 
        return ECORE_CALLBACK_CANCEL;
 }
 
-static struct packet *liveinfo_inst_list(pid_t pid, int handle, const struct packet *packet)
+static struct packet *widget_mgr_inst_list(pid_t pid, int handle, const struct packet *packet)
 {
        const char *pkgname;
        char *dup_pkgname;
-       struct liveinfo *info;
+       struct widget_mgr *info;
 
        if (packet_get(packet, "s", &pkgname) != 1) {
                ErrPrint("Invalid argument\n");
                goto out;
        }
 
-       info = liveinfo_find_by_pid(pid);
+       info = widget_mgr_find_by_pid(pid);
        if (!info) {
                ErrPrint("Invalid request\n");
                goto out;
@@ -8570,7 +8570,7 @@ static struct packet *liveinfo_inst_list(pid_t pid, int handle, const struct pac
                goto out;
        }
 
-       liveinfo_set_data(info, dup_pkgname);
+       widget_mgr_set_data(info, dup_pkgname);
        inst_list_cb(info);
 
 out:
@@ -8588,11 +8588,11 @@ static Eina_Bool pkg_list_cb(void *info)
        const char *slavename;
        pid_t pid;
 
-       liveinfo_open_fifo(info);
-       fp = liveinfo_fifo(info);
+       widget_mgr_open_fifo(info);
+       fp = widget_mgr_fifo(info);
        if (!fp) {
                DbgPrint("Failed to open a pipe\n");
-               liveinfo_close_fifo(info);
+               widget_mgr_close_fifo(info);
                return ECORE_CALLBACK_CANCEL;
        }
 
@@ -8631,13 +8631,13 @@ static Eina_Bool pkg_list_cb(void *info)
 
        fprintf(fp, "EOD\n");
        DbgPrint("EOD\n");
-       liveinfo_close_fifo(info);
+       widget_mgr_close_fifo(info);
        return ECORE_CALLBACK_CANCEL;
 }
 
-static struct packet *liveinfo_pkg_list(pid_t pid, int handle, const struct packet *packet)
+static struct packet *widget_mgr_pkg_list(pid_t pid, int handle, const struct packet *packet)
 {
-       struct liveinfo *info;
+       struct widget_mgr *info;
        double timestamp;
 
        if (packet_get(packet, "d", &timestamp) != 1) {
@@ -8647,7 +8647,7 @@ static struct packet *liveinfo_pkg_list(pid_t pid, int handle, const struct pack
 
        DbgPrint("Package List: %lf\n", timestamp);
 
-       info = liveinfo_find_by_pid(pid);
+       info = widget_mgr_find_by_pid(pid);
        if (!info) {
                ErrPrint("Invalid request\n");
                goto out;
@@ -8658,7 +8658,7 @@ out:
        return NULL;
 }
 
-static struct packet *liveinfo_slave_ctrl(pid_t pid, int handle, const struct packet *packet)
+static struct packet *widget_mgr_slave_ctrl(pid_t pid, int handle, const struct packet *packet)
 {
        return NULL;
 }
@@ -8666,16 +8666,16 @@ static struct packet *liveinfo_slave_ctrl(pid_t pid, int handle, const struct pa
 static Eina_Bool pkg_ctrl_rmpack_cb(void *info)
 {
        FILE *fp;
-       liveinfo_open_fifo(info);
-       fp = liveinfo_fifo(info);
+       widget_mgr_open_fifo(info);
+       fp = widget_mgr_fifo(info);
        if (!fp) {
-               liveinfo_close_fifo(info);
+               widget_mgr_close_fifo(info);
                return ECORE_CALLBACK_CANCEL;
        }
 
        fprintf(fp, "%d\n", ENOSYS);
        fprintf(fp, "EOD\n");
-       liveinfo_close_fifo(info);
+       widget_mgr_close_fifo(info);
        return ECORE_CALLBACK_CANCEL;
 }
 
@@ -8683,16 +8683,16 @@ static Eina_Bool pkg_ctrl_rminst_cb(void *info)
 {
        FILE *fp;
 
-       liveinfo_open_fifo(info);
-       fp = liveinfo_fifo(info);
+       widget_mgr_open_fifo(info);
+       fp = widget_mgr_fifo(info);
        if (!fp) {
-               liveinfo_close_fifo(info);
+               widget_mgr_close_fifo(info);
                return ECORE_CALLBACK_CANCEL;
        }
 
-       fprintf(fp, "%d\n", (int)liveinfo_data(info));
+       fprintf(fp, "%d\n", (int)widget_mgr_data(info));
        fprintf(fp, "EOD\n");
-       liveinfo_close_fifo(info);
+       widget_mgr_close_fifo(info);
        return ECORE_CALLBACK_CANCEL;
 }
 
@@ -8700,22 +8700,22 @@ static Eina_Bool pkg_ctrl_faultinst_cb(void *info)
 {
        FILE *fp;
 
-       liveinfo_open_fifo(info);
-       fp = liveinfo_fifo(info);
+       widget_mgr_open_fifo(info);
+       fp = widget_mgr_fifo(info);
        if (!fp) {
-               liveinfo_close_fifo(info);
+               widget_mgr_close_fifo(info);
                return ECORE_CALLBACK_CANCEL;
        }
 
-       fprintf(fp, "%d\n", (int)liveinfo_data(info));
+       fprintf(fp, "%d\n", (int)widget_mgr_data(info));
        fprintf(fp, "EOD\n");
-       liveinfo_close_fifo(info);
+       widget_mgr_close_fifo(info);
        return ECORE_CALLBACK_CANCEL;
 }
 
-static struct packet *liveinfo_pkg_ctrl(pid_t pid, int handle, const struct packet *packet)
+static struct packet *widget_mgr_pkg_ctrl(pid_t pid, int handle, const struct packet *packet)
 {
-       struct liveinfo *info;
+       struct widget_mgr *info;
        char *cmd;
        char *pkgname;
        char *id;
@@ -8725,7 +8725,7 @@ static struct packet *liveinfo_pkg_ctrl(pid_t pid, int handle, const struct pack
                goto out;
        }
 
-       info = liveinfo_find_by_pid(pid);
+       info = widget_mgr_find_by_pid(pid);
        if (!info) {
                ErrPrint("Invalid request\n");
                goto out;
@@ -8737,10 +8737,10 @@ static struct packet *liveinfo_pkg_ctrl(pid_t pid, int handle, const struct pack
                struct inst_info *inst;
                inst = package_find_instance_by_id(pkgname, id);
                if (!inst) {
-                       liveinfo_set_data(info, (void *)ENOENT);
+                       widget_mgr_set_data(info, (void *)ENOENT);
                } else {
                        (void)instance_destroy(inst, WIDGET_DESTROY_TYPE_DEFAULT);
-                       liveinfo_set_data(info, (void *)0);
+                       widget_mgr_set_data(info, (void *)0);
                }
 
                pkg_ctrl_rminst_cb(info);
@@ -8748,16 +8748,16 @@ static struct packet *liveinfo_pkg_ctrl(pid_t pid, int handle, const struct pack
                struct inst_info *inst;
                inst = package_find_instance_by_id(pkgname, id);
                if (!inst) {
-                       liveinfo_set_data(info, (void *)ENOENT);
+                       widget_mgr_set_data(info, (void *)ENOENT);
                } else {
                        struct pkg_info *pkg;
 
                        pkg = instance_package(inst);
                        if (!pkg) {
-                               liveinfo_set_data(info, (void *)EFAULT);
+                               widget_mgr_set_data(info, (void *)EFAULT);
                        } else {
                                (void)package_faulted(pkg, 1);
-                               liveinfo_set_data(info, (void *)0);
+                               widget_mgr_set_data(info, (void *)0);
                        }
                }
 
@@ -8772,21 +8772,21 @@ static Eina_Bool master_ctrl_cb(void *info)
 {
        FILE *fp;
 
-       liveinfo_open_fifo(info);
-       fp = liveinfo_fifo(info);
+       widget_mgr_open_fifo(info);
+       fp = widget_mgr_fifo(info);
        if (!fp) {
-               liveinfo_close_fifo(info);
+               widget_mgr_close_fifo(info);
                return ECORE_CALLBACK_CANCEL;
        }
-       fprintf(fp, "%d\nEOD\n", (int)liveinfo_data(info));
-       liveinfo_close_fifo(info);
+       fprintf(fp, "%d\nEOD\n", (int)widget_mgr_data(info));
+       widget_mgr_close_fifo(info);
 
        return ECORE_CALLBACK_CANCEL;
 }
 
-static struct packet *liveinfo_master_ctrl(pid_t pid, int handle, const struct packet *packet)
+static struct packet *widget_mgr_master_ctrl(pid_t pid, int handle, const struct packet *packet)
 {
-       struct liveinfo *info;
+       struct widget_mgr *info;
        char *cmd;
        char *var;
        char *val;
@@ -8797,7 +8797,7 @@ static struct packet *liveinfo_master_ctrl(pid_t pid, int handle, const struct p
                goto out;
        }
 
-       info = liveinfo_find_by_pid(pid);
+       info = widget_mgr_find_by_pid(pid);
        if (!info) {
                ErrPrint("Invalid request\n");
                goto out;
@@ -8817,7 +8817,7 @@ static struct packet *liveinfo_master_ctrl(pid_t pid, int handle, const struct p
                ret = g_conf.slave_max_load;
        }
 
-       liveinfo_set_data(info, (void *)ret);
+       widget_mgr_set_data(info, (void *)ret);
        master_ctrl_cb(info);
 
 out:
@@ -8827,31 +8827,31 @@ out:
 static struct method s_info_table[] = {
        {
                .cmd = CMD_STR_INFO_HELLO,
-               .handler = liveinfo_hello,
+               .handler = widget_mgr_hello,
        },
        {
                .cmd = CMD_STR_INFO_SLAVE_LIST,
-               .handler = liveinfo_slave_list,
+               .handler = widget_mgr_slave_list,
        },
        {
                .cmd = CMD_STR_INFO_PKG_LIST,
-               .handler = liveinfo_pkg_list,
+               .handler = widget_mgr_pkg_list,
        },
        {
                .cmd = CMD_STR_INFO_INST_LIST,
-               .handler = liveinfo_inst_list,
+               .handler = widget_mgr_inst_list,
        },
        {
                .cmd = CMD_STR_INFO_SLAVE_CTRL,
-               .handler = liveinfo_slave_ctrl,
+               .handler = widget_mgr_slave_ctrl,
        },
        {
                .cmd = CMD_STR_INFO_PKG_CTRL,
-               .handler = liveinfo_pkg_ctrl,
+               .handler = widget_mgr_pkg_ctrl,
        },
        {
                .cmd = CMD_STR_INFO_MASTER_CTRL,
-               .handler = liveinfo_master_ctrl,
+               .handler = widget_mgr_master_ctrl,
        },
        {
                .cmd = NULL,
similarity index 78%
rename from src/liveinfo.c
rename to src/widget-mgr.c
index d080bd7..bb84e19 100644 (file)
@@ -41,7 +41,7 @@ static struct info {
        .info_list = NULL,
 };
 
-struct liveinfo {
+struct widget_mgr {
        FILE *fp;
        char fifo_name[60];
        pid_t pid;
@@ -49,14 +49,14 @@ struct liveinfo {
        void *data;
 };
 
-HAPI int liveinfo_init(void)
+HAPI int widget_mgr_init(void)
 {
        return 0;
 }
 
-HAPI void liveinfo_fini(void)
+HAPI void widget_mgr_fini(void)
 {
-       struct liveinfo *info;
+       struct widget_mgr *info;
 
        EINA_LIST_FREE(s_info.info_list, info) {
                if (fclose(info->fp) != 0) {
@@ -84,15 +84,6 @@ static inline int valid_requestor(pid_t pid)
                return 0;
        }
 
-       if (stat("/opt/usr/devel/usr/bin/liveinfo", &src) < 0) {
-               ErrPrint("Error: %s\n", strerror(errno));
-               return 0;
-       }
-
-       if (target.st_ino == src.st_ino) {
-               return 1;
-       }
-
        if (stat("/opt/usr/devel/usr/bin/widget-mgr", &src) < 0) {
                ErrPrint("Error: %s\n", strerror(errno));
                return 0;
@@ -101,19 +92,19 @@ static inline int valid_requestor(pid_t pid)
        return target.st_ino == src.st_ino;
 }
 
-HAPI void liveinfo_set_data(struct liveinfo *info, void *data)
+HAPI void widget_mgr_set_data(struct widget_mgr *info, void *data)
 {
        info->data = data;
 }
 
-HAPI void *liveinfo_data(struct liveinfo *info)
+HAPI void *widget_mgr_data(struct widget_mgr *info)
 {
        return info->data;
 }
 
-HAPI struct liveinfo *liveinfo_create(pid_t pid, int handle)
+HAPI struct widget_mgr *widget_mgr_create(pid_t pid, int handle)
 {
-       struct liveinfo *info;
+       struct widget_mgr *info;
 
        if (!valid_requestor(pid)) {
                ErrPrint("Invalid requestor\n");
@@ -145,7 +136,7 @@ HAPI struct liveinfo *liveinfo_create(pid_t pid, int handle)
        return info;
 }
 
-HAPI int liveinfo_open_fifo(struct liveinfo *info)
+HAPI int widget_mgr_open_fifo(struct widget_mgr *info)
 {
        DbgPrint("FIFO is created (%s)\n", info->fifo_name);
        info->fp = fopen(info->fifo_name, "w");
@@ -157,7 +148,7 @@ HAPI int liveinfo_open_fifo(struct liveinfo *info)
        return WIDGET_ERROR_NONE;
 }
 
-HAPI void liveinfo_close_fifo(struct liveinfo *info)
+HAPI void widget_mgr_close_fifo(struct widget_mgr *info)
 {
        if (info->fp) {
                if (fclose(info->fp) != 0) {
@@ -167,35 +158,35 @@ HAPI void liveinfo_close_fifo(struct liveinfo *info)
        }
 }
 
-HAPI void liveinfo_destroy(struct liveinfo *info)
+HAPI void widget_mgr_destroy(struct widget_mgr *info)
 {
        s_info.info_list = eina_list_remove(s_info.info_list, info);
-       liveinfo_close_fifo(info);
+       widget_mgr_close_fifo(info);
        if (unlink(info->fifo_name) < 0) {
                ErrPrint("unlink: %s\n", strerror(errno));
        }
        DbgFree(info);
 }
 
-HAPI pid_t liveinfo_pid(struct liveinfo *info)
+HAPI pid_t widget_mgr_pid(struct widget_mgr *info)
 {
        return info ? info->pid : (pid_t)-1;
 }
 
-HAPI const char *liveinfo_filename(struct liveinfo *info)
+HAPI const char *widget_mgr_filename(struct widget_mgr *info)
 {
        return info ? info->fifo_name : NULL;
 }
 
-HAPI FILE *liveinfo_fifo(struct liveinfo *info)
+HAPI FILE *widget_mgr_fifo(struct widget_mgr *info)
 {
        return info ? info->fp : NULL;
 }
 
-HAPI struct liveinfo *liveinfo_find_by_pid(pid_t pid)
+HAPI struct widget_mgr *widget_mgr_find_by_pid(pid_t pid)
 {
        Eina_List *l;
-       struct liveinfo *info;
+       struct widget_mgr *info;
 
        EINA_LIST_FOREACH(s_info.info_list, l, info) {
                if (info->pid == pid) {
@@ -206,10 +197,10 @@ HAPI struct liveinfo *liveinfo_find_by_pid(pid_t pid)
        return NULL;
 }
 
-HAPI struct liveinfo *liveinfo_find_by_handle(int handle)
+HAPI struct widget_mgr *widget_mgr_find_by_handle(int handle)
 {
        Eina_List *l;
-       struct liveinfo *info;
+       struct widget_mgr *info;
 
        EINA_LIST_FOREACH(s_info.info_list, l, info) {
                if (info->handle == handle) {
old mode 100755 (executable)
new mode 100644 (file)
similarity index 88%
rename from util_liveinfo/CMakeLists.txt
rename to widget-mgr/CMakeLists.txt
index 24f240e..1c86cf9
@@ -1,6 +1,6 @@
-PROJECT(liveinfo C)
+PROJECT(widget-mgr C)
 
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/util_liveinfo/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/widget-info/include)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(info_pkgs REQUIRED
@@ -27,7 +27,7 @@ ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
 ADD_DEFINITIONS("-DSOCKET_FILE=\"/opt/usr/share/live_magazine/.live.socket\"")
 
 ADD_EXECUTABLE(${PROJECT_NAME}
-       src/liveinfo.c
+       src/widget-mgr.c
        src/node.c
 )
 
similarity index 99%
rename from util_liveinfo/src/liveinfo.c
rename to widget-mgr/src/widget-mgr.c
index b5183ab..d600943 100644 (file)
 
 #include <Ecore.h>
 
-#include "liveinfo.h"
+#include "widget-info.h"
 #include "node.h"
 
-#define PROMPT "liveinfo "
+#define PROMPT "widget-mgr "
 #define PROVIDER_FOLDER "provider"
 #define PACKAGE_FOLDER "package"
 
@@ -570,7 +570,7 @@ static void send_inst_list(const char *pkgname)
 
 static void help(void)
 {
-       printf("liveinfo - widget utility\n");
+       printf("widget-mgr - widget utility\n");
        printf("------------------------------ [Option] ------------------------------\n");
        printf("-b Batch mode\n");
        printf("-x execute command\n");
@@ -1944,7 +1944,7 @@ static int connected_cb(int handle, void *data)
 
        printf("Connected\n");
 
-       packet = packet_create("liveinfo_hello", "d", 0.0f);
+       packet = packet_create("widget_mgr_hello", "d", 0.0f);
        if (!packet) {
                printf("Failed to build a packet for hello\n");
                com_core_packet_client_fini(s_info.fd);