From: Chanwoo Choi Date: Thu, 2 Aug 2018 07:17:51 +0000 (+0900) Subject: gdbus: Separate gdubs-definition.h from gdbus-util.h X-Git-Tag: submit/tizen/20180803.032812~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8345ee327c87319e64f267e30bd1f61507c887cc;p=platform%2Fcore%2Fsystem%2Fpass.git gdbus: Separate gdubs-definition.h from gdbus-util.h 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 --- diff --git a/include/pass/gdbus-definition.h b/include/pass/gdbus-definition.h new file mode 100644 index 0000000..cca8b3f --- /dev/null +++ b/include/pass/gdbus-definition.h @@ -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__ */ diff --git a/include/pass/gdbus-util.h b/include/pass/gdbus-util.h index 1eb349e..130e237 100644 --- a/include/pass/gdbus-util.h +++ b/include/pass/gdbus-util.h @@ -27,35 +27,7 @@ #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;