diff options
author | junkyu han <junkyu.han@samsung.com> | 2018-07-12 20:27:53 +0900 |
---|---|---|
committer | junkyu han <junkyu.han@samsung.com> | 2018-07-12 20:27:53 +0900 |
commit | 6614ee1a512bc4916fa7dfe30358b7b2b04d1125 (patch) | |
tree | ad2d81af4707a5b0d7c7c705da2b7ed6bba2bc79 | |
parent | 0ca076b57d15a12f0f0e0c05bb92fe6e15c19341 (diff) | |
download | tizen-things-daemon-6614ee1a512bc4916fa7dfe30358b7b2b04d1125.tar.gz tizen-things-daemon-6614ee1a512bc4916fa7dfe30358b7b2b04d1125.tar.bz2 tizen-things-daemon-6614ee1a512bc4916fa7dfe30358b7b2b04d1125.zip |
Make dbus method name shorter
Change-Id: If7bd309a0e1e1d502d3c60eda49149e428c5324d
-rw-r--r-- | common/common-worker-inf-dbus.xml | 4 | ||||
-rw-r--r-- | common/common-worker-inf-def.h | 2 | ||||
-rw-r--r-- | daemon/src/ttd-worker-interface.c | 12 | ||||
-rw-r--r-- | lib/things-service-worker/src/ttd-worker-lib.c | 10 |
4 files changed, 14 insertions, 14 deletions
diff --git a/common/common-worker-inf-dbus.xml b/common/common-worker-inf-dbus.xml index 6677eb3..9b8fc1a 100644 --- a/common/common-worker-inf-dbus.xml +++ b/common/common-worker-inf-dbus.xml @@ -5,11 +5,11 @@ "http://standards.freedesktop.org/dbus/1.0/introspect.dtd"> <node> - <interface name="ttd.worker.dbus"> + <interface name="ttd.worker"> <!-- Method definitions --> - <method name="ttd_worker_submit_report"> + <method name="report"> <arg type="s" name="cmd_id" direction="in"/> <arg type="s" name="report" direction="in"/> <arg type="i" name="working_state" direction="in"/> diff --git a/common/common-worker-inf-def.h b/common/common-worker-inf-def.h index 803029a..b0e9099 100644 --- a/common/common-worker-inf-def.h +++ b/common/common-worker-inf-def.h @@ -19,6 +19,6 @@ #define TTD_WORKER_DBUS_NAME "ttd.worker.dbus" #define TTD_WORKER_DBUS_OBJECT_PATH "/ttd_worker_dbus_object" -#define TTD_WORKER_DBUS_INTERFACE "ttd.worker.dbus" +#define TTD_WORKER_DBUS_INTERFACE "ttd.worker" #endif /* __TTD_COMMON_WORKER_INF_DEF_H__ */ diff --git a/daemon/src/ttd-worker-interface.c b/daemon/src/ttd-worker-interface.c index 4468914..7214b9d 100644 --- a/daemon/src/ttd-worker-interface.c +++ b/daemon/src/ttd-worker-interface.c @@ -24,11 +24,11 @@ struct _worker_interface_h { guint owner_id; GDBusObjectManagerServer *m_server; - TtdWorkerDbus *dbus_obj; + TtdWorker *dbus_obj; }; static gboolean -__received_from_worker(TtdWorkerDbus *obj, +__received_from_worker(TtdWorker *obj, GDBusMethodInvocation *invocation, const gchar *cmd_id, const gchar *report, @@ -56,7 +56,7 @@ __received_from_worker(TtdWorkerDbus *obj, ret = ttd_cmd_mgr_push_result(cmd_id, working_state, report); EXIT: - ttd_worker_dbus_complete_ttd_worker_submit_report(obj, invocation, ret); + ttd_worker_complete_report(obj, invocation, ret); return FALSE; } @@ -89,7 +89,7 @@ static void __on_bus_acquired_cb(GDBusConnection *connection, const gchar *name, return; } - h->dbus_obj = ttd_worker_dbus_skeleton_new(); + h->dbus_obj = ttd_worker_skeleton_new(); if (!h->dbus_obj) { _E("Failed to create dbus skeleton"); ttd_worker_interface_fini(h); @@ -103,10 +103,10 @@ static void __on_bus_acquired_cb(GDBusConnection *connection, const gchar *name, return; } - ret = g_signal_connect(h->dbus_obj, "handle-ttd-worker-submit-report", + ret = g_signal_connect(h->dbus_obj, "handle-report", G_CALLBACK (__received_from_worker), h); if (!ret) { - _E("Failed to connect handle: submit-report"); + _E("Failed to connect handle: report"); ttd_worker_interface_fini(h); return; } diff --git a/lib/things-service-worker/src/ttd-worker-lib.c b/lib/things-service-worker/src/ttd-worker-lib.c index 2cfc86c..9dcc343 100644 --- a/lib/things-service-worker/src/ttd-worker-lib.c +++ b/lib/things-service-worker/src/ttd-worker-lib.c @@ -34,7 +34,7 @@ struct _ttd_worker_report_s { typedef struct { GCancellable *cancellable; - TtdWorkerDbus *dbus_object; + TtdWorker *dbus_object; unsigned int ref_count; } worker_dbus_handle; @@ -91,7 +91,7 @@ static int __ref_dbus_connection(void) handle->cancellable = g_cancellable_new(); handle->dbus_object = - ttd_worker_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM, + ttd_worker_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, TTD_WORKER_DBUS_NAME, TTD_WORKER_DBUS_OBJECT_PATH, @@ -122,7 +122,7 @@ static void __submit_completed_cb( ttd_worker_submit_result_e result; _D("Send completed"); - ret = ttd_worker_dbus_call_ttd_worker_submit_report_finish( + ret = ttd_worker_call_report_finish( g_dbus_handle->dbus_object, &ret_val, res, &error); if (!ret) { _E("DBus proxy call is failed[%s]", error->message); @@ -279,7 +279,7 @@ int ttd_worker_submit_report(ttd_worker_report *report, report->completed_cb = completed_cb; report->completed_cb_data = completed_cb_data; - ttd_worker_dbus_call_ttd_worker_submit_report( + ttd_worker_call_report( g_dbus_handle->dbus_object, report->cmd_id, report->report_json, @@ -308,7 +308,7 @@ int ttd_worker_submit_report_sync( retvm_if(!report->report_json, -1, "report data is NULL"); retvm_if(report->state == TTD_WORKER_STATE_UNKNOWN, -1, "state is UNKNOWN"); - ret = ttd_worker_dbus_call_ttd_worker_submit_report_sync( + ret = ttd_worker_call_report_sync( g_dbus_handle->dbus_object, report->cmd_id, report->report_json, |