Add new conf key for accessing input device
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 19 Mar 2013 10:21:18 +0000 (10:21 +0000)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 19 Mar 2013 10:21:18 +0000 (10:21 +0000)
Just for keeping the compatibility with master.

Change-Id: I2e3f262c4137edd954bb2b418cd8b8e8dbf9c9da

include/conf.h
packaging/org.tizen.data-provider-slave.spec
src/conf.c

index 0bea944..4c1dfc4 100644 (file)
@@ -66,6 +66,7 @@ struct conf {
                char *always;
                char *db;
                char *module;
+               char *input;
        } path;
 
        int max_size_type;
@@ -126,6 +127,7 @@ extern int conf_loader(void);
 #define READER_PATH            g_conf.path.reader
 #define ALWAYS_PATH            g_conf.path.always
 #define MODULE_PATH            g_conf.path.module
+#define INPUT_PATH             g_conf.path.input
 
 #define REPLACE_TAG_APPID      g_conf.replace_tag
 #define SLAVE_TTL              g_conf.slave_ttl
index 19a450d..6d1db4e 100644 (file)
@@ -2,7 +2,7 @@
 
 Name: org.tizen.data-provider-slave
 Summary: Plugin type livebox service provider.
-Version: 0.9.23
+Version: 0.10.0
 Release: 1
 Group: frameowrk/livebox
 License: Flora License
index 573bbb6..c3a2d63 100644 (file)
@@ -77,6 +77,7 @@ HAPI struct conf g_conf = {
                .conf = "/opt/usr/live/%s/etc/%s.conf",
                .script = "/opt/usr/live/%s/res/script/%s.edj",
                .module = "/opt/usr/live/%s/libexec/liblive-%s.so",
+               .input = "/dev/input/event1",
        },
 
        .ping_time = 240.0f,
@@ -308,6 +309,14 @@ static void share_path_handler(char *buffer)
        DbgPrint("Shared folder: %s\n", g_conf.path.image);
 }
 
+static void input_path_handler(char *buffer)
+{
+       g_conf.path.input = strdup(buffer);
+       if (!g_conf.path.input)
+               ErrPrint("Heap: %s\n", strerror(errno));
+       DbgPrint("Input path: %s\n", g_conf.path.input);
+}
+
 static void ping_time_handler(char *buffer)
 {
        if (sscanf(buffer, "%lf", &g_conf.ping_time) != 1)
@@ -471,6 +480,10 @@ HAPI int conf_loader(void)
                        .handler = com_core_thread_handler,
                },
                {
+                       .name = "input",
+                       .handler = input_path_handler,
+               },
+               {
                        .name = NULL,
                        .handler = NULL,
                },