Updated for PD buffer of livebox (inhouse)
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 19 Oct 2012 05:08:00 +0000 (14:08 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Mon, 22 Oct 2012 13:34:48 +0000 (22:34 +0900)
Change-Id: Id37f089e6d589a3ee14df7d61ead7cb1e6c6056f

19 files changed:
CMakeLists.txt
data/conf.ini
data/data-provider-master
include/conf.h
include/instance.h
include/virtual_canvas.h [deleted file]
packaging/com.samsung.data-provider-master.spec
pkgmgr_livebox/src/service_register.c
src/conf.c
src/critical_log.c
src/fault_manager.c
src/group.c
src/instance.c
src/io.c
src/script_handler.c
src/server.c
src/util.c
src/virtual_canvas.c [deleted file]
util_liveinfo/CMakeLists.txt

index 8eb0fa6..f091102 100644 (file)
@@ -31,7 +31,7 @@ pkg_check_modules(pkg REQUIRED
 )
 
 SET(PACKAGE "${PROJECT_NAME}")
-SET(LOCALEDIR "/opt/apps/com.samsung.${PROJECT_NAME}/res/locale")
+#SET(LOCALEDIR "/opt/apps/com.samsung.${PROJECT_NAME}/res/locale")
 SET(CMAKE_C_FLAGS "-Wall -fpie -Winline -Werror -fno-builtin-malloc -fno-omit-frame-pointer -g")
 SET(CMAKE_EXE_LINKER_FLAGS "-pie")
 
@@ -44,7 +44,7 @@ ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
 
 ADD_DEFINITIONS("-DSLAVE_PKGNAME=\"com.samsung.data-provider-slave\"")
 ADD_DEFINITIONS("-DSLAVE_WEB_PKGNAME=\"com.samsung.data-provider-webslave\"")
-ADD_DEFINITIONS("-DSOCKET_FILE=\"/opt/share/live_magazine/.live.socket\"")
+ADD_DEFINITIONS("-DSOCKET_FILE=\"/opt/usr/share/live_magazine/.live.socket\"")
 
 ADD_DEFINITIONS("-DNDEBUG")
 #ADD_DEFINITIONS("-DFLOG")
@@ -65,7 +65,6 @@ ADD_EXECUTABLE(${PROJECT_NAME}
        src/script_handler.c
        src/buffer_handler.c
        src/io.c
-       src/virtual_canvas.c
        src/xmonitor.c
        src/slave_life.c
        src/slave_rpc.c
index 5565f0e..d3ffd7a 100644 (file)
@@ -14,10 +14,9 @@ max_log_line=1000
 max_log_file=3
 sqilte_flush_max=1048576
 db_path=/opt/dbspace/.livebox.db
-log_path=/opt/share/live_magazine/log
-error_image=/usr/share/data-provider-master/images/error.png
-share_path=/opt/share/live_magazine/
-script_port_path=/opt/live/script_port/
+log_path=/opt/usr/share/live_magazine/log
+share_path=/opt/usr/share/live_magazine/
+script_port_path=/opt/usr/live/script_port/
 ping_interval=240.0
 slave_max_load=30
 vconf_sys_cluster=file/private/com.samsung.cluster-home/system_cluster
index 36abddd..3beecbc 100755 (executable)
@@ -18,8 +18,9 @@ launch_provider()
 
 start ()
 {
-       rm /opt/share/live_magazine/*
-       rm /opt/share/live_magazine/reader/*
+       rm /opt/usr/share/live_magazine/*
+       rm /opt/usr/share/live_magazine/reader/*
+       rm /opt/usr/share/live_magazine/log/*
        rm /tmp/.stop.provider
        launch_provider &
 }
index 54c1d01..0fcec8b 100644 (file)
@@ -79,9 +79,6 @@ struct conf {
 
        int max_size_type;
 
-       char *quality;
-       char *error;
-
        int slave_max_load;
 
        double ping_time;
@@ -134,8 +131,6 @@ extern int conf_loader(void);
 #define SQLITE_FLUSH_MAX       g_conf.sqlite_flush_max
 #define DBFILE                 g_conf.path.db
 
-#define DEFAULT_QUALITY                g_conf.quality
-
 #define SLAVE_MAX_LOAD         g_conf.slave_max_load
 #define DEFAULT_PING_TIME      g_conf.ping_time
 
index 7aaff92..f4cb0ff 100644 (file)
@@ -133,6 +133,7 @@ extern int instance_resize(struct inst_info *inst, int w, int h);
 extern int instance_set_period(struct inst_info *inst, double period);
 extern int instance_clicked(struct inst_info *inst, const char *event, double timestamp, double x, double y);
 extern int instance_text_signal_emit(struct inst_info *inst, const char *emission, const char *source, double sx, double sy, double ex, double ey);
+extern int instance_signal_emit(struct inst_info *inst, const char *emission, const char *source, double sx, double sy, double ex, double ey, double x, double y, int down);
 extern int instance_change_group(struct inst_info *inst, const char *cluster, const char *category);
 extern int instance_set_visible_state(struct inst_info *inst, enum livebox_visible_state state);
 extern enum livebox_visible_state instance_visible_state(struct inst_info *inst);
diff --git a/include/virtual_canvas.h b/include/virtual_canvas.h
deleted file mode 100644 (file)
index bed1ac8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * com.samsung.data-provider-master
- *
- * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Sung-jae Park <nicesj.park@samsung.com>, Youngjoo Park <yjoo93.park@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-extern int virtual_canvas_flush_to_file(Evas *e, const char *filename, int w, int h);
-extern int virtual_canvas_flush_data_to_file(Evas *e, char *data, const char *filename, int w, int h);
-
-extern Evas *virtual_canvas_create(int w, int h);
-extern int virtual_canvas_destroy(Evas *e);
-
-/* End of a file */
index cf22889..768d676 100644 (file)
@@ -1,6 +1,6 @@
 Name: com.samsung.data-provider-master
 Summary: Master data provider
-Version: 0.11.4
+Version: 0.11.5
 Release: 1
 Group: main/app
 License: Samsung Proprietary License
@@ -56,17 +56,17 @@ if [ -x /etc/rc.d/init.d/data-provider-master ]; then
 fi
 
 %post
-mkdir -p /opt/share/live_magazine
-chown 5000:5000 /opt/share/live_magazine
-chsmack -a "_" /opt/share/live_magazine
-chsmack -t /opt/share/live_magazine
+mkdir -p /opt/usr/share/live_magazine
+chown 5000:5000 /opt/usr/share/live_magazine
+chsmack -a "_" /opt/usr/share/live_magazine
+chsmack -t /opt/usr/share/live_magazine
 # According to this transmute attribute, below log, reader folder will be set as same label
 
-mkdir -p /opt/share/live_magazine/log
-chown 5000:5000 /opt/share/live_magazine/log
+mkdir -p /opt/usr/share/live_magazine/log
+chown 5000:5000 /opt/usr/share/live_magazine/log
 
-mkdir -p /opt/share/live_magazine/reader
-chown 5000:5000 /opt/share/live_magazine/reader
+mkdir -p /opt/usr/share/live_magazine/reader
+chown 5000:5000 /opt/usr/share/live_magazine/reader
 
 # End of a list of affected folder by the transmute attribute
 
index 8987c83..a17e44b 100644 (file)
@@ -2101,14 +2101,13 @@ int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr docPtr, const char *appid)
 
                snprintf(filename, len, "/libexec/liblive-%s.so", livebox->pkgid);
                livebox->libexec = xmlStrdup((xmlChar *)filename);
+               DbgPrint("Use the default libexec: %s\n", filename);
                free(filename);
 
                if (!livebox->libexec) {
                        livebox_destroy(livebox);
                        return -ENOMEM;
                }
-
-               DbgPrint("Use the default libexec: %s\n", filename);
        }
 
        for (node = node->children; node; node = node->next) {
index 4dcf258..a17b22d 100644 (file)
@@ -66,12 +66,12 @@ struct conf g_conf = {
        .sqlite_flush_max = 1048576,
 
        .path = {
-               .conf = "/opt/live/%s/etc/%s.conf",
-               .image = "/opt/share/live_magazine/",
-               .slave_log = "/opt/share/live_magazine/log",
-               .script = "/opt/live/%s/res/script/%s.edj",
-               .root = "/opt/live/",
-               .script_port = "/opt/live/script_port/",
+               .conf = "/opt/usr/live/%s/etc/%s.conf",
+               .image = "/opt/usr/share/live_magazine/",
+               .slave_log = "/opt/usr/share/live_magazine/log",
+               .script = "/opt/usr/live/%s/res/script/%s.edj",
+               .root = "/opt/usr/live/",
+               .script_port = "/opt/usr/live/script_port/",
                .db = "/opt/dbspace/.livebox.db",
        },
 
@@ -103,8 +103,6 @@ struct conf g_conf = {
        },
 
        .max_size_type = MAX_SIZE_LIST,
-       .quality = "quality=100 compress=1",
-       .error = "/opt/apps/com.samsung."PACKAGE"/res/images/error.png",
        .ping_time = 240.0f,
        .slave_max_load = 30,
        .vconf_sys_cluster = "file/private/com.samsung.cluster-home/system_cluster",
@@ -225,13 +223,6 @@ static void db_path_handler(char *buffer)
                ErrPrint("Heap: %s\n", strerror(errno));
 }
 
-static void error_image_handler(char *buffer)
-{
-       g_conf.error = strdup(buffer);
-       if (!g_conf.error)
-               ErrPrint("Heap: %s\n", strerror(errno));
-}
-
 static void log_path_handler(char *buffer)
 {
        g_conf.path.slave_log = strdup(buffer);
@@ -374,10 +365,6 @@ int conf_loader(void)
                        .handler = log_path_handler,
                },
                {
-                       .name = "error_image",
-                       .handler = error_image_handler,
-               },
-               {
                        .name = "share_path",
                        .handler = share_path_handler,
                },
index d92efd3..d32fbed 100644 (file)
@@ -8,7 +8,8 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "dlog.h"
+#include <dlog.h>
+
 #include "conf.h"
 #include "debug.h"
 #include "util.h"
@@ -51,10 +52,10 @@ int critical_log(const char *func, int line, const char *fmt, ...)
 
                s_info.file_id = (s_info.file_id + 1) % MAX_LOG_FILE;
 
-               namelen = strlen(s_info.filename) + strlen("/opt/var/log/") + 20;
+               namelen = strlen(s_info.filename) + strlen(SLAVE_LOG_PATH) + 20;
                filename = malloc(namelen);
                if (filename) {
-                       snprintf(filename, namelen, "/opt/var/log/%d_%s", s_info.file_id, s_info.filename);
+                       snprintf(filename, namelen, "%s/%d_%s", SLAVE_LOG_PATH, s_info.file_id, s_info.filename);
 
                        if (s_info.fp)
                                fclose(s_info.fp);
@@ -87,7 +88,7 @@ int critical_log_init(const char *name)
                return -ENOMEM;
        }
 
-       namelen = strlen(name) + strlen("/opt/var/log/") + 20;
+       namelen = strlen(name) + strlen(SLAVE_LOG_PATH) + 20;
 
        filename = malloc(namelen);
        if (!filename) {
@@ -97,7 +98,7 @@ int critical_log_init(const char *name)
                return -ENOMEM;
        }
 
-       snprintf(filename, namelen, "/opt/var/log/%d_%s", s_info.file_id, name);
+       snprintf(filename, namelen, "%s/%d_%s", SLAVE_LOG_PATH, s_info.file_id, name);
 
        s_info.fp = fopen(filename, "w+");
        if (!s_info.fp) {
index 31cb58f..4bb3f3d 100644 (file)
@@ -16,6 +16,7 @@
 #include "instance.h"
 #include "client_rpc.h"
 #include "package.h"
+#include "conf.h"
 
 static struct info {
        Eina_List *call_list;
@@ -41,7 +42,7 @@ int const fault_is_occured(void)
 static void clear_log_file(struct slave_node *slave)
 {
        char filename[BUFSIZ];
-       snprintf(filename, sizeof(filename), "/opt/share/live_magazine/log/slave.%d", slave_pid(slave));
+       snprintf(filename, sizeof(filename), "%s/slave.%d", SLAVE_LOG_PATH, slave_pid(slave));
 
        unlink(filename);
 }
@@ -55,7 +56,7 @@ static char *check_log_file(struct slave_node *slave)
        int i;
        char filename[BUFSIZ];
 
-       snprintf(filename, sizeof(filename), "/opt/share/live_magazine/log/slave.%d", slave_pid(slave));
+       snprintf(filename, sizeof(filename), "%s/slave.%d", SLAVE_LOG_PATH, slave_pid(slave));
        fp = fopen(filename, "rt");
        if (!fp) {
                ErrPrint("No log file found [%s]\n", strerror(errno));
index d695e75..8efa22c 100644 (file)
@@ -146,7 +146,7 @@ int group_add_option(struct context_item *item, const char *key, const char *val
        }
 
        option->item = item;
-       item->option_list = eina_list_append(item->option_list, item);
+       item->option_list = eina_list_append(item->option_list, option);
        return 0;
 }
 
index bca5484..204286c 100644 (file)
@@ -1725,6 +1725,43 @@ int instance_clicked(struct inst_info *inst, const char *event, double timestamp
        return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
 }
 
+int instance_signal_emit(struct inst_info *inst, const char *signal, const char *part, double sx, double sy, double ex, double ey, double x, double y, int down)
+{
+       const char *pkgname;
+       const char *id;
+       struct slave_node *slave;
+       struct packet *packet;
+       int ret;
+
+       pkgname = package_name(instance_package(inst));
+       id = instance_id(inst);
+       if (!pkgname || !id) {
+               ErrPrint("Invalid instance\n");
+               return -EINVAL;
+       }
+
+       DbgPrint("Package[%s], ID[%s]\n", pkgname, id);
+
+       slave = package_slave(instance_package(inst));
+       if (!slave) {
+               ErrPrint("Slave is not valid\n");
+               return -EINVAL;
+       }
+
+       packet = packet_create_noack("script", "ssssddddddi",
+                       pkgname, id,
+                       signal, part,
+                       sx, sy, ex, ey,
+                       x, y, down);
+       if (!packet) {
+               ErrPrint("Failed to create param\n");
+               return -EFAULT;
+       }
+
+       ret = slave_rpc_request_only(slave, pkgname, packet, 0); 
+       return ret;
+}
+
 int instance_text_signal_emit(struct inst_info *inst, const char *emission, const char *source, double sx, double sy, double ex, double ey)
 {
        struct packet *packet;
index 7b9a59b..6dc3efb 100644 (file)
--- a/src/io.c
+++ b/src/io.c
@@ -249,8 +249,6 @@ static inline int build_provider_info(struct pkg_info *info)
        int ret;
        const char *tmp;
        const char *appid;
-       char *path;
-       int pathlen;
 
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
@@ -297,20 +295,8 @@ static inline int build_provider_info(struct pkg_info *info)
        package_set_lb_type(info, sqlite3_column_int(stmt, 3));
        tmp = (const char *)sqlite3_column_text(stmt, 4);
        if (tmp && strlen(tmp)) {
-               pathlen = strlen("/opt/apps//") + strlen(appid) + strlen(tmp) + 1;
-               path = malloc(pathlen);
-               if (!path) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-                       sqlite3_reset(stmt);
-                       sqlite3_clear_bindings(stmt);
-                       sqlite3_finalize(stmt);
-                       return -ENOMEM;
-               }
-               snprintf(path, pathlen, "/opt/apps/%s/%s", appid, tmp);
-
-               package_set_lb_path(info, path);
-               DbgPrint("LB Path: %s\n", path);
-               DbgFree(path);
+               package_set_lb_path(info, tmp);
+               DbgPrint("LB Path: %s\n", tmp);
 
                tmp = (const char *)sqlite3_column_text(stmt, 5);
                if (tmp && strlen(tmp))
@@ -320,19 +306,8 @@ static inline int build_provider_info(struct pkg_info *info)
        package_set_pd_type(info, sqlite3_column_int(stmt, 6));
        tmp = (const char *)sqlite3_column_text(stmt, 7);
        if (tmp && strlen(tmp)) {
-               pathlen = strlen("/opt/apps//") + strlen(appid) + strlen(tmp) + 1;
-               path = malloc(pathlen);
-               if (!path) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-                       sqlite3_reset(stmt);
-                       sqlite3_clear_bindings(stmt);
-                       sqlite3_finalize(stmt);
-                       return -ENOMEM;
-               }
-               snprintf(path, pathlen, "/opt/apps/%s/%s", appid, tmp);
-               DbgPrint("PD Path: %s\n", path);
-               package_set_pd_path(info, path);
-               DbgFree(path);
+               package_set_pd_path(info, tmp);
+               DbgPrint("PD Path: %s\n", tmp);
 
                tmp = (const char *)sqlite3_column_text(stmt, 8);
                if (tmp && strlen(tmp))
index 7fd4a11..0b91c4d 100644 (file)
@@ -178,10 +178,6 @@ int script_signal_emit(Evas *e, const char *part, const char *signal, double sx,
 {
        Ecore_Evas *ee;
        struct script_info *info;
-       const char *pkgname;
-       const char *id;
-       struct slave_node *slave;
-       struct packet *packet;
        int ret;
 
        ee = ecore_evas_ecore_evas_get(e);
@@ -202,20 +198,7 @@ int script_signal_emit(Evas *e, const char *part, const char *signal, double sx,
        if (!part || strlen(part) == 0)
                part = "";
 
-       pkgname = package_name(instance_package(info->inst));
-       id = instance_id(info->inst);
-       slave = package_slave(instance_package(info->inst));
-       packet = packet_create_noack("script", "ssssddddddi",
-                       pkgname, id,
-                       signal, part,
-                       sx, sy, ex, ey,
-                       info->x, info->y, info->down);
-       if (!packet) {
-               ErrPrint("Failed to create param\n");
-               return -EFAULT;
-       }
-
-       ret = slave_rpc_request_only(slave, pkgname, packet, 0); 
+       ret = instance_signal_emit(info->inst, signal, part, sx, sy, ex, ey, info->x, info->y, info->down);
        return ret;
 }
 
index 9cf078e..4812105 100644 (file)
@@ -1952,6 +1952,9 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
                        slave_freeze_ttl(slave);
 
                ret = instance_slave_open_pd(inst);
+               ret = instance_signal_emit(inst,
+                               "pd,show", util_uri_to_path(instance_id(inst)),
+                               0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0);
 
                /*!
                 * \note
@@ -2069,6 +2072,9 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
                if (slave)
                        slave_thaw_ttl(slave);
 
+               ret = instance_signal_emit(inst,
+                               "pd,hide", util_uri_to_path(instance_id(inst)),
+                               0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0);
                ret = instance_slave_close_pd(inst);
 
                /*!
index 6993221..d097817 100644 (file)
@@ -81,7 +81,7 @@ static inline int check_web_livebox(const char *pkgname)
        char *path;
 
        len = strlen(pkgname) * 2;
-       len += strlen("/opt/apps/%s/res/wgt/livebox/index.html");
+       len += strlen("/opt/usr/apps/%s/res/wgt/livebox/index.html");
 
        path = malloc(len + 1);
        if (!path) {
@@ -89,7 +89,7 @@ static inline int check_web_livebox(const char *pkgname)
                return -ENOMEM;
        }
 
-       snprintf(path, len, "/opt/apps/%s/res/wgt/livebox/index.html", pkgname);
+       snprintf(path, len, "/opt/usr/apps/%s/res/wgt/livebox/index.html", pkgname);
        if (access(path, F_OK | R_OK) != 0) {
                ErrPrint("%s is not a valid package\n", pkgname);
                DbgFree(path);
diff --git a/src/virtual_canvas.c b/src/virtual_canvas.c
deleted file mode 100644 (file)
index 055d9c3..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * data-provider-master
- *
- * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Sung-jae Park <nicesj.park@samsung.com>, Youngjoo Park <yjoo93.park@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <Evas.h>
-#include <Ecore_X.h>
-#include <Ecore_Evas.h>
-
-#include <dlog.h>
-
-#include "virtual_canvas.h"
-#include "debug.h"
-#include "conf.h"
-#include "util.h"
-
-Evas *virtual_canvas_create(int w, int h)
-{
-       Ecore_Evas *internal_ee;
-       Evas *internal_e;
-
-       /* Create virtual canvas */
-       internal_ee = ecore_evas_buffer_new(w, h);
-       if (!internal_ee) {
-               ErrPrint("Failed to create a new canvas buffer\n");
-               return NULL;
-       }
-
-       ecore_evas_alpha_set(internal_ee, EINA_TRUE);
-       ecore_evas_manual_render_set(internal_ee, EINA_TRUE);
-
-       /* Get the "Evas" object from a virtual canvas */
-       internal_e = ecore_evas_get(internal_ee);
-       if (!internal_e) {
-               ecore_evas_free(internal_ee);
-               ErrPrint("Faield to get Evas object\n");
-               return NULL;
-       }
-
-       return internal_e;
-}
-
-int virtual_canvas_flush_to_file(Evas *e, const char *filename, int w, int h)
-{
-       void *data;
-       Ecore_Evas *internal_ee;
-       int ret;
-
-       internal_ee = ecore_evas_ecore_evas_get(e);
-       if (!internal_ee) {
-               ErrPrint("Failed to get ecore evas\n");
-               return -EFAULT;
-       }
-
-       ecore_evas_manual_render(internal_ee);
-
-       /* Get a pointer of a buffer of the virtual canvas */
-       data = (void *)ecore_evas_buffer_pixels_get(internal_ee);
-       if (!data) {
-               ErrPrint("Failed to get pixel data\n");
-               return -EFAULT;
-       }
-
-       ret = virtual_canvas_flush_data_to_file(e, data, filename, w, h);
-       return ret;
-}
-
-int virtual_canvas_flush_data_to_file(Evas *e, char *data, const char *filename, int w, int h)
-{
-       Evas_Object *output;
-
-       output = evas_object_image_add(e);
-       if (!output) {
-               ErrPrint("Failed to create an image object\n");
-               return -EFAULT;
-       }
-
-       evas_object_image_data_set(output, NULL);
-       evas_object_image_colorspace_set(output, EVAS_COLORSPACE_ARGB8888);
-       evas_object_image_alpha_set(output, EINA_TRUE);
-       evas_object_image_size_set(output, w, h);
-       evas_object_image_smooth_scale_set(output, EINA_TRUE);
-       evas_object_image_data_set(output, data);
-       evas_object_image_data_update_add(output, 0, 0, w, h);
-
-       if (evas_object_image_save(output, filename, NULL, DEFAULT_QUALITY)
-                                                               == EINA_FALSE) {
-               evas_object_del(output);
-               ErrPrint("Faield to save a captured image (%s)\n", filename);
-               return -EFAULT;
-       }
-
-       evas_object_del(output);
-
-       if (access(filename, F_OK) != 0) {
-               ErrPrint("File %s is not found (%s)\n", filename, strerror(errno));
-               return -EFAULT;
-       }
-
-       return 0;
-}
-
-int virtual_canvas_destroy(Evas *e)
-{
-       Ecore_Evas *ee;
-
-       ee = ecore_evas_ecore_evas_get(e);
-       if (!ee) {
-               ErrPrint("Failed to ecore evas object\n");
-               return -EFAULT;
-       }
-
-       ecore_evas_free(ee);
-       return 0;
-}
-
-/* End of a file */
index f1805a8..7b26041 100644 (file)
@@ -19,7 +19,7 @@ ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Wall -Werror")
 
 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-ADD_DEFINITIONS("-DSOCKET_FILE=\"/opt/share/live_magazine/.live.socket\"")
+ADD_DEFINITIONS("-DSOCKET_FILE=\"/opt/usr/share/live_magazine/.live.socket\"")
 
 ADD_EXECUTABLE(${PROJECT_NAME}
        src/liveinfo.c