gdbus: Separate gdubs-definition.h from gdbus-util.h 05/185805/2
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 2 Aug 2018 07:17:51 +0000 (16:17 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 3 Aug 2018 01:44:20 +0000 (10:44 +0900)
gdbus-util.h contains the gdbus helper function and dbus path/interface
definitions. Some PASS modules only require the dbus path/interface
definitions with gdbus helper function. So, separate gdubs-definition.h
from gdbus-util.h.

Change-Id: I587c728d3d594adc65778e77bf7933a17acde4c1
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
include/pass/gdbus-definition.h [new file with mode: 0644]
include/pass/gdbus-util.h

diff --git a/include/pass/gdbus-definition.h b/include/pass/gdbus-definition.h
new file mode 100644 (file)
index 0000000..cca8b3f
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * PASS (Power Aware System Service)
+ *
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GDBUS_DEFINITION_H__
+#define __GDBUS_DEFINITION_H__
+
+/* Dbus definition for PASS */
+#define DBUS_PASS_BUS_NAME                     "org.tizen.system.pass"
+#define DBUS_PASS_PATH                         "/Org/Tizen/System/Pass"
+
+#define DBUS_CORE_INTERFACE                    "org.tizen.system.pass.core"
+#define DBUS_CORE_PATH                         "/Org/Tizen/System/Pass/Core"
+#define DBUS_CORE_I_START_HANDLER              "handle_start"
+#define DBUS_CORE_I_STOP_HANDLER               "handle_stop"
+
+#define DBUS_PMQOS_INTERFACE                   "org.tizen.system.pass.pmqos"
+#define DBUS_PMQOS_PATH                                "/Org/Tizen/System/Pass/Pmqos"
+#define DBUS_PMQOS_I_START_HANDLER             "handle_start"
+#define DBUS_PMQOS_I_STOP_HANDLER              "handle_stop"
+#define DBUS_PMQOS_I_APPLAUNCH_HANDLER         "handle_app_launch"
+#define DBUS_PMQOS_I_ULTRAPOWERSAVING_HANDLER  "handle_ultra_power_saving"
+
+#define DBUS_THERMAL_INTERFACE                 "org.tizen.system.pass.monitor.thermal"
+#define DBUS_THERMAL_PATH                      "/Org/Tizen/System/Pass/Monitor/Thermal"
+#define DBUS_THERMAL_I_START_HANDLER           "handle_start"
+#define DBUS_THERMAL_I_STOP_HANDLER            "handle_stop"
+#define DBUS_THERMAL_METHOD                    "thermal_scenario"
+
+/* Dbus definition for systemd */
+#define SYSTEMD_DBUS_NAME                      "org.freedesktop.systemd1"
+#define SYSTEMD_DBUS_OBJECT_PATH               "/org/freedesktop/systemd1"
+#define SYSTEMD_DBUS_IFACE_FOR_PROPS           "org.freedesktop.DBus.Properties"
+#define SYSTEMD_DBUS_METHOD_GET_PROP           "Get"
+#define SYSTEMD_DBUS_METHOD_GET_PROP_ARG_TYPE  "(ss)"
+#define SYSTEMD_DBUS_METHOD_GET_PROP_RET_TYPE  "(v)"
+#define SYSTEMD_DBUS_IFACE_MANAGER             SYSTEMD_DBUS_NAME ".Manager"
+
+#endif /* __GDBUS_DEFINITION_H__ */
index 1eb349e0d2683676b9e6dca0d161c60127c98447..130e2376f1a1d1cd229650693f6d836e94f904ce 100644 (file)
 #include "pmqos/pmqos-dbus-stub.h"
 #include "thermal/thermal-dbus-stub.h"
 
-/* Dbus definition for PASS */
-#define DBUS_PASS_BUS_NAME                     "org.tizen.system.pass"
-
-#define DBUS_CORE_INTERFACE                    "org.tizen.system.pass.core"
-#define DBUS_CORE_PATH                         "/Org/Tizen/System/Pass/Core"
-#define DBUS_CORE_I_START_HANDLER              "handle_start"
-#define DBUS_CORE_I_STOP_HANDLER               "handle_stop"
-
-#define DBUS_PMQOS_INTERFACE                   "org.tizen.system.pass.pmqos"
-#define DBUS_PMQOS_PATH                                "/Org/Tizen/System/Pass/Pmqos"
-#define DBUS_PMQOS_I_START_HANDLER             "handle_start"
-#define DBUS_PMQOS_I_STOP_HANDLER              "handle_stop"
-#define DBUS_PMQOS_I_APPLAUNCH_HANDLER         "handle_app_launch"
-#define DBUS_PMQOS_I_ULTRAPOWERSAVING_HANDLER  "handle_ultra_power_saving"
-
-#define DBUS_THERMAL_INTERFACE                 "org.tizen.system.pass.monitor.thermal"
-#define DBUS_THERMAL_PATH                      "/Org/Tizen/System/Pass/Monitor/Thermal"
-#define DBUS_THERMAL_I_START_HANDLER           "handle_start"
-#define DBUS_THERMAL_I_STOP_HANDLER            "handle_stop"
-#define DBUS_THERMAL_METHOD                    "thermal_scenario"
-
-/* Dbus definition for systemd */
-#define SYSTEMD_DBUS_NAME                      "org.freedesktop.systemd1"
-#define SYSTEMD_DBUS_OBJECT_PATH               "/org/freedesktop/systemd1"
-#define SYSTEMD_DBUS_IFACE_FOR_PROPS           "org.freedesktop.DBus.Properties"
-#define SYSTEMD_DBUS_METHOD_GET_PROP           "Get"
-#define SYSTEMD_DBUS_METHOD_GET_PROP_ARG_TYPE  "(ss)"
-#define SYSTEMD_DBUS_METHOD_GET_PROP_RET_TYPE  "(v)"
-#define SYSTEMD_DBUS_IFACE_MANAGER             SYSTEMD_DBUS_NAME ".Manager"
+#include "gdbus-definition.h"
 
 struct pass_gdbus_signal_info {
        const gchar *handler;