From 7b82ada72d9325ba5192621a9366d915668793b8 Mon Sep 17 00:00:00 2001 From: minsoo kim Date: Thu, 6 Oct 2016 16:09:30 +0900 Subject: [PATCH] sensord: add get wristup dbus interface SENSORD_BUS_NAME : "org.tizen.system.sensord" SENSORD_OBJECT_PATH : "/Org/Tizen/System/SensorD" SENSORD_INTERFACE_NAME : SENSORD_BUS_NAME WRISTUP_ALGO_METHOD : "wristup_algo" Change-Id: Ic7992b874b2456da2ede823de6bb7ffeb579f1a0 Signed-off-by: minsoo kim --- src/server/dbus_util.cpp | 12 ++++++++++++ src/server/dbus_util.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/server/dbus_util.cpp b/src/server/dbus_util.cpp index c29b61d..0aa0b90 100755 --- a/src/server/dbus_util.cpp +++ b/src/server/dbus_util.cpp @@ -23,6 +23,7 @@ static int wrist_up_total_cnt; static int wrist_up_lcdon_cnt; +static int wrist_up_algo; static GDBusNodeInfo *introspection_data = NULL; static guint owner_id; @@ -39,6 +40,9 @@ static const gchar introspection_xml[] = " " " " " " +" " +" " +" " " " ""; @@ -59,6 +63,9 @@ static void method_call_handler(GDBusConnection *conn, } else if (g_strcmp0(method_name, "wristup_total_cnt") == 0) { _D("wristup_total_cnt called, %d", wrist_up_total_cnt); ret = wrist_up_total_cnt; + } else if (g_strcmp0(method_name, "wristup_algo") == 0) { + _D("wristup_algo called, %d", wrist_up_algo); + ret = wrist_up_algo; } else { _D("No matched method call"); ret = DBUS_FAILED; @@ -141,6 +148,11 @@ void reset_total_count(void) wrist_up_total_cnt = 0; } +void set_wrist_up_algo(int mode) +{ + wrist_up_algo = mode; +} + void init_dbus(void) { #ifndef GLIB_VERSION_2_36 diff --git a/src/server/dbus_util.h b/src/server/dbus_util.h index ce4ad54..f729e3b 100644 --- a/src/server/dbus_util.h +++ b/src/server/dbus_util.h @@ -37,6 +37,7 @@ void reset_lcdon_count(void); int get_total_count(void); void increase_total_count(void); void reset_total_count(void); +void set_wrist_up_algo(int mode); void init_dbus(void); void fini_dbus(void); -- 2.7.4