pass: Change DBUS interface of thermal monitor 74/203374/1
authorDongwoo Lee <dwoo08.lee@samsung.com>
Thu, 11 Apr 2019 07:44:13 +0000 (16:44 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 12 Apr 2019 06:40:04 +0000 (15:40 +0900)
This patch changes DBUS interface as following thermal interface
standard like below:
 - Interface: org.tizen.system.thermal
 - Path: /Org/Tizen/System/Thermal
 - Broadcast name: CoolDownModeChanged

Change-Id: Iedf5a1d78536a10829d37e84fadae0e51706f886
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
include/pass/gdbus-definition.h
include/pass/gdbus-util.h
scripts/pass-thermal.conf
scripts/thermal-dbus.xml
src/core/gdbus-util.c
src/thermal/thermal.c

index cca8b3f053664076f7f8c5b7e2a1d905cfad1f0d..16da516b61e7b61ec40aa4615e619485f86c7e63 100644 (file)
 #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_INTERFACE                 "org.tizen.system.thermal"
+#define DBUS_THERMAL_PATH                      "/Org/Tizen/System/Thermal"
 #define DBUS_THERMAL_I_START_HANDLER           "handle_start"
 #define DBUS_THERMAL_I_STOP_HANDLER            "handle_stop"
-#define DBUS_THERMAL_METHOD                    "thermal_scenario"
+#define DBUS_THERMAL_SIGNAL                    "CoolDownModeChanged"
 
 /* Dbus definition for systemd */
 #define SYSTEMD_DBUS_NAME                      "org.freedesktop.systemd1"
index 130e2376f1a1d1cd229650693f6d836e94f904ce..c85c228ecdb7ca0d533010c0f03c8c53d89c3b40 100644 (file)
@@ -54,8 +54,8 @@ SystemPassCore *pass_gdbus_get_instance_core(void);
 void pass_gdbus_put_instance_core(SystemPassCore **instance);
 SystemPassPmqos *pass_gdbus_get_instance_pmqos(void);
 void pass_gdbus_put_instance_pmqos(SystemPassPmqos **instance);
-SystemPassMonitorThermal *pass_gdbus_get_instance_thermal(void);
-void pass_gdbus_put_instance_thermal(SystemPassMonitorThermal **instance);
+SystemThermal *pass_gdbus_get_instance_thermal(void);
+void pass_gdbus_put_instance_thermal(SystemThermal **instance);
 
 int pass_gdbus_get_system_connection(void);
 void pass_gdbus_put_system_connection(void);
index ad0f02d53dec3ff6b60beb12e309ee059e0688a0..bc0c656968d7a3f7fe7d347586b9e36cf30c823d 100644 (file)
@@ -9,11 +9,11 @@ thermal_number_of_scenario=4
 #name=ReleaseAction
 #support=yes
 [thermal.scenario0]
-name=ReleaseAction
+name=Release
 support=yes
 
 [thermal.scenario1]
-name=WarningAction
+name=Warning
 support=yes
 
 [thermal.scenario2]
@@ -21,5 +21,5 @@ name=LimitAction
 support=yes
 
 [thermal.scenario3]
-name=ShutdownAction
+name=Shutdown
 support=yes
index 0b4b6f14888d849ddfede7957e9e31df1d5f757b..535a33f9e5da6e36e8a3814ebaa240eccd09ed43 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<node name="/Org/Tizen/System/Pass/Monitor/Thermal">
-  <interface name="org.tizen.system.pass.monitor.thermal">
+<node name="/Org/Tizen/System/Thermal">
+  <interface name="org.tizen.system.thermal">
     <method name="start">
       <arg type="i" name="return_code" direction="out" />
     </method>
index 7909a7d8c7b87898cd5d56f18ddf38ce2790a1ad..e7774e208082e52fff356f970891373466128d22 100644 (file)
@@ -253,12 +253,12 @@ void pass_gdbus_put_instance_pmqos(SystemPassPmqos **instance)
        put_instance((gpointer *)instance);
 }
 
-SystemPassMonitorThermal *pass_gdbus_get_instance_thermal(void)
+SystemThermal *pass_gdbus_get_instance_thermal(void)
 {
-       return system_pass_monitor_thermal_skeleton_new();
+       return system_thermal_skeleton_new();
 }
 
-void pass_gdbus_put_instance_thermal(SystemPassMonitorThermal **instance)
+void pass_gdbus_put_instance_thermal(SystemThermal **instance)
 {
        put_instance((gpointer *)instance);
 }
index a123ef9963e96f7d90e189bd4dd144b8f1e5b146..76207c3aa4d86127fca5c43421fe4560ed8add46 100644 (file)
@@ -44,7 +44,7 @@
  * @brief      Global instance indicating the Thermal Monitor D-Bus interface
  *             for PASS (Power Aware System Service)
  */
-static SystemPassMonitorThermal *g_gdbus_instance = NULL;
+static SystemThermal *g_gdbus_instance = NULL;
 
 /**
  * @brief      Global instance indicating Thermal Monitor feature for PASS
@@ -128,7 +128,7 @@ static int thermal_init_done(void *data, void *user_data)
  * @param      [in] user_data Not used
  * @return     @c true if success, otherwise @c false if fail
  */
-static gboolean dbus_cb_thermal_start(SystemPassMonitorThermal *obj,
+static gboolean dbus_cb_thermal_start(SystemThermal *obj,
                GDBusMethodInvocation *invoc, gpointer user_data)
 {
        int ret = 0;
@@ -157,7 +157,7 @@ static gboolean dbus_cb_thermal_start(SystemPassMonitorThermal *obj,
  * @param      [in] user_data Unused parameter
  * @return     @c true if success, otherwise @c false if fail
  */
-static gboolean dbus_cb_thermal_stop(SystemPassMonitorThermal *obj,
+static gboolean dbus_cb_thermal_stop(SystemThermal *obj,
                GDBusMethodInvocation *invoc, gpointer user_data)
 {
        if (!g_thermal)
@@ -229,7 +229,7 @@ static int thermal_notifier_cb(void *data, void *user_data)
        gvar = g_variant_new("(s)", data);
        ret = pass_gdbus_send_broadcast_signal(DBUS_THERMAL_PATH,
                                        DBUS_THERMAL_INTERFACE,
-                                       DBUS_THERMAL_METHOD,
+                                       DBUS_THERMAL_SIGNAL,
                                        gvar);
        if (ret < 0) {
                _E("failed to send broadcast signal of thermal monitor(%d)\n",