From: hyunuktak Date: Fri, 12 May 2017 06:37:56 +0000 (+0900) Subject: Added init service method X-Git-Tag: accepted/tizen/unified/20170512.165706^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F46%2F128946%2F2;p=platform%2Fcore%2Fconnectivity%2Fstc-manager.git Added init service method Change-Id: I4afe3bf1c75119e97f3e27264db1239d44a8bbbf Signed-off-by: hyunuktak --- diff --git a/include/stc-statistics.h b/include/stc-statistics.h index ddb8f4d..a76607e 100755 --- a/include/stc-statistics.h +++ b/include/stc-statistics.h @@ -29,6 +29,9 @@ * Functions Declaration *****************************************************************************/ +gboolean handle_statistics_init(StcStatistics *object, + GDBusMethodInvocation *invocation); + gboolean handle_statistics_get_all(StcStatistics *object, GDBusMethodInvocation *invocation, GVariant *select_rule, diff --git a/interfaces/stcmanager-iface-statistics.xml b/interfaces/stcmanager-iface-statistics.xml index cad1de6..9c5b6ec 100644 --- a/interfaces/stcmanager-iface-statistics.xml +++ b/interfaces/stcmanager-iface-statistics.xml @@ -1,5 +1,7 @@ + + diff --git a/packaging/stc-manager.spec b/packaging/stc-manager.spec index df4b9c9..e110264 100644 --- a/packaging/stc-manager.spec +++ b/packaging/stc-manager.spec @@ -1,6 +1,6 @@ Name: stc-manager Summary: STC(Smart Traffic Control) manager -Version: 0.0.3 +Version: 0.0.4 Release: 0 Group: Network & Connectivity/Other License: Apache-2.0 diff --git a/resources/dbus/stc-manager.conf b/resources/dbus/stc-manager.conf index 895dfa3..2982db8 100755 --- a/resources/dbus/stc-manager.conf +++ b/resources/dbus/stc-manager.conf @@ -9,5 +9,7 @@ + + diff --git a/src/stc-manager-gdbus.c b/src/stc-manager-gdbus.c index 8352d6d..42f7697 100755 --- a/src/stc-manager-gdbus.c +++ b/src/stc-manager-gdbus.c @@ -45,6 +45,10 @@ static gboolean __stc_manager_gdbus_statistics_init(stc_s *stc) /* Register for method callbacks as signal callbacks */ + g_signal_connect(statistics, "handle-init", + G_CALLBACK(handle_statistics_init), + stc); + g_signal_connect(statistics, "handle-get", G_CALLBACK(handle_statistics_get), stc); diff --git a/src/stc-statistics.c b/src/stc-statistics.c index ba65f7e..ec52aeb 100755 --- a/src/stc-statistics.c +++ b/src/stc-statistics.c @@ -300,6 +300,18 @@ gboolean handle_statistics_get_all(StcStatistics *object, return TRUE; } +gboolean handle_statistics_init(StcStatistics *object, + GDBusMethodInvocation *invocation) +{ + __STC_LOG_FUNC_ENTER__; + + STC_LOGI("stc statistics initialized"); + stc_statistics_complete_init(object, invocation); + + __STC_LOG_FUNC_EXIT__; + return TRUE; +} + gboolean handle_statistics_get(StcStatistics *object, GDBusMethodInvocation *invocation, const gchar *app_id,