Added init service method 46/128946/2 accepted/tizen/unified/20170512.165706 submit/tizen/20170512.071139
authorhyunuktak <hyunuk.tak@samsung.com>
Fri, 12 May 2017 06:37:56 +0000 (15:37 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Fri, 12 May 2017 06:38:07 +0000 (15:38 +0900)
Change-Id: I4afe3bf1c75119e97f3e27264db1239d44a8bbbf
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
include/stc-statistics.h
interfaces/stcmanager-iface-statistics.xml
packaging/stc-manager.spec
resources/dbus/stc-manager.conf
src/stc-manager-gdbus.c
src/stc-statistics.c

index ddb8f4d..a76607e 100755 (executable)
@@ -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,
index cad1de6..9c5b6ec 100644 (file)
@@ -1,5 +1,7 @@
 <node>
        <interface name="net.stc.statistics">
+               <method name='Init'>
+               </method>
                <method name='GetAll'>
                        <arg type='a{sv}' name='select_rule' direction='in'/>
                        <arg type='i' name='error_code' direction='out'/>
index df4b9c9..e110264 100644 (file)
@@ -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
index 895dfa3..2982db8 100755 (executable)
@@ -9,5 +9,7 @@
         </policy>
         <policy context="default">
                 <check send_destination="net.stc" send_interface="net.stc" privilege="http://tizen.org/privilege/stc" />
+                <check send_destination="net.stc" send_interface="net.stc.restriction" privilege="http://tizen.org/privilege/stc" />
+                <check send_destination="net.stc" send_interface="net.stc.statistics" privilege="http://tizen.org/privilege/stc" />
         </policy>
 </busconfig>
index 8352d6d..42f7697 100755 (executable)
@@ -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);
index ba65f7e..ec52aeb 100755 (executable)
@@ -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,