common : change dbus name of powering off from power to reboot 28/117428/1
authorlokilee73 <changjoo.lee@samsung.com>
Mon, 6 Mar 2017 05:38:39 +0000 (14:38 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Mon, 6 Mar 2017 05:38:58 +0000 (14:38 +0900)
Change-Id: I531698756feebdbb9bedd354f20959205f3aa881
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
src/battery/battery-mobile.c
src/battery/battery-wearable.c
src/cooldown/cooldown-wearable.c
src/overheat/overheat.c
src/powerkey/powerkey-mobile.c
src/powerkey/powerkey-tv.c
src/powerkey/powerkey-wearable.c

index 3db6bb8..0d55887 100755 (executable)
 
 #define SYSTEMD_STOP_POWER_OFF 4
 #define DEVICED_BUS_NAME        "org.tizen.system.deviced"
-#define POWER_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
-#define POWER_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
-#define POWER_METHOD            "reboot"
-#define POWER_OPERATION_OFF     "poweroff"
+#define REBOOT_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
+#define REBOOT_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
+#define REBOOT_METHOD            "reboot"
+#define REBOOT_OPERATION_OFF     "poweroff"
 
 static const struct popup_ops lowbattery_poweroff_ops;
 static const struct popup_ops charge_error_low_ops;
@@ -154,13 +154,13 @@ static void poweroff_clicked(const struct popup_ops *ops)
 
        unload_simple_popup(ops);
 
-       param[0] = POWER_OPERATION_OFF;
+       param[0] = REBOOT_OPERATION_OFF;
        snprintf(data, sizeof(data), "0");
        param[1] = data;
        ret = popup_dbus_method_sync(DEVICED_BUS_NAME,
-                       POWER_OBJECT_PATH,
-                       POWER_INTERFACE_NAME,
-                       POWER_METHOD,
+                       REBOOT_OBJECT_PATH,
+                       REBOOT_INTERFACE_NAME,
+                       REBOOT_METHOD,
                        "si", param);
        if (ret < 0)
                _E("Failed to request poweroff to deviced (%d)", ret);
index 5bb6c85..b3b318b 100755 (executable)
@@ -29,11 +29,11 @@ static const struct popup_ops charge_error_high_ops;
 static const struct popup_ops battery_disconnected_ops;
 
 #define DEVICED_BUS_NAME        "org.tizen.system.deviced"
-#define POWER_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
-#define POWER_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
+#define REBOOT_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
+#define REBOOT_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
 
-#define POWER_METHOD            "reboot"
-#define POWER_OPERATION_OFF     "poweroff"
+#define REBOOT_METHOD            "reboot"
+#define REBOOT_OPERATION_OFF     "poweroff"
 
 static int lowbattery_launch(bundle *b, const struct popup_ops *ops);
 
@@ -151,13 +151,13 @@ static void poweroff_clicked(const struct popup_ops *ops)
 
        unload_simple_popup(ops);
 
-       param[0] = POWER_OPERATION_OFF;
+       param[0] = REBOOT_OPERATION_OFF;
        snprintf(data, sizeof(data), "0");
        param[1] = data;
        ret = popup_dbus_method_sync(DEVICED_BUS_NAME,
-                       POWER_OBJECT_PATH,
-                       POWER_INTERFACE_NAME,
-                       POWER_METHOD,
+                       REBOOT_OBJECT_PATH,
+                       REBOOT_INTERFACE_NAME,
+                       REBOOT_METHOD,
                        "si", param);
        if (ret < 0)
                _E("Failed to request poweroff to deviced (%d)", ret);
index 942ab2c..317c2f7 100755 (executable)
 #define SIGNAL_COOL_DOWN_CHANGED  "CoolDownChanged"
 #define COOL_DOWN_RELEASE         "Release"
 
-#define POWER_BUS_NAME        "org.tizen.system.deviced"
-#define POWER_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
-#define POWER_INTERFACE_NAME  POWER_BUS_NAME".reboot"
+#define DEVICED_BUS_NAME        "org.tizen.system.deviced"
+#define REBOOT_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
+#define REBOOT_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
 
-#define POWER_METHOD            "reboot"
-#define POWER_OPERATION_OFF     "poweroff"
+#define REBOOT_METHOD            "reboot"
+#define REBOOT_OPERATION_OFF     "poweroff"
 
 #define TIMEOUT_POWEROFF 10 /* seconds */
 #define TIMEOUT_BEEP_40  40 /* seconds */
@@ -201,14 +201,14 @@ static void cooldown_poweroff(const struct popup_ops *ops)
        _I("Poweroff is selected");
        unload_simple_popup(ops);
 
-       param[0] = POWER_OPERATION_OFF;
+       param[0] = REBOOT_OPERATION_OFF;
        snprintf(data, sizeof(data), "0");
        param[1] = data;
 
-       ret = popup_dbus_method_sync(POWER_BUS_NAME,
-                       POWER_OBJECT_PATH,
-                       POWER_INTERFACE_NAME,
-                       POWER_METHOD,
+       ret = popup_dbus_method_sync(DEVICED_BUS_NAME,
+                       REBOOT_OBJECT_PATH,
+                       REBOOT_INTERFACE_NAME,
+                       REBOOT_METHOD,
                        "si", param);
 
        if (ret < 0)
index e83fb55..c49ed67 100755 (executable)
 #define BUF_MAX 512
 #define SYSTEMD_STOP_POWER_OFF 4
 
-#define POWER_BUS_NAME        "org.tizen.system.deviced"
-#define POWER_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
-#define POWER_INTERFACE_NAME  POWER_BUS_NAME".reboot"
+#define DEVICED_BUS_NAME        "org.tizen.system.deviced"
+#define REBOOT_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
+#define REBOOT_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
 
-#define POWER_METHOD            "reboot"
-#define POWER_OPERATION_OFF     "poweroff"
+#define REBOOT_METHOD            "reboot"
+#define REBOOT_OPERATION_OFF     "poweroff"
 
 /* Overheat Timer*/
 #define OVERHEAT_BUS_NAME              "org.tizen.system.popup"
@@ -142,13 +142,13 @@ static void overheat_poweroff(const struct popup_ops *ops)
 
        unload_simple_popup(ops);
 
-       param[0] = POWER_OPERATION_OFF;
+       param[0] = REBOOT_OPERATION_OFF;
        snprintf(data, sizeof(data), "0");
        param[1] = data;
-       ret = popup_dbus_method_sync(POWER_BUS_NAME,
-                       POWER_OBJECT_PATH,
-                       POWER_INTERFACE_NAME,
-                       POWER_METHOD,
+       ret = popup_dbus_method_sync(DEVICED_BUS_NAME,
+                       REBOOT_OBJECT_PATH,
+                       REBOOT_INTERFACE_NAME,
+                       REBOOT_METHOD,
                        "si", param);
        if (ret < 0)
                _E("Failed to request poweroff to deviced (%d)", ret);
index 7ee45df..b3166b0 100755 (executable)
 #define SYSTEMD_STOP_POWER_OFF 4
 
 #define DEVICED_BUS_NAME        "org.tizen.system.deviced"
-#define POWER_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
-#define POWER_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
+#define REBOOT_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
+#define REBOOT_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
 
-#define POWER_METHOD            "reboot"
-#define POWER_OPERATION_OFF     "poweroff"
-#define POWER_OPERATION_RESTART     "reboot"
+#define REBOOT_METHOD            "reboot"
+#define REBOOT_OPERATION_OFF     "poweroff"
+#define REBOOT_OPERATION_RESTART     "reboot"
 #define TIMEOUT_POWEROFF 5 /* seconds */
 
-#define DEVICED_OBJECT_PATH            "/Org/Tizen/System/DeviceD"
-#define DEVICED_INTERFACE_NAME DEVICED_BUS_NAME
-
 #define POWEROFF_KEY   "XF86PowerOff"
 #define BACK_KEY       "XF86Back"
 #define HOME_KEY       "XF86Home"
@@ -86,14 +83,14 @@ static void restart_clicked(const struct popup_ops *ops)
 
        unload_simple_popup(ops);
 
-       param[0] = POWER_OPERATION_RESTART;
+       param[0] = REBOOT_OPERATION_RESTART;
        snprintf(data, sizeof(data), "0");
        param[1] = data;
 
        ret = popup_dbus_method_sync(DEVICED_BUS_NAME,
-                       POWER_OBJECT_PATH,
-                       POWER_INTERFACE_NAME,
-                       POWER_METHOD,
+                       REBOOT_OBJECT_PATH,
+                       REBOOT_INTERFACE_NAME,
+                       REBOOT_METHOD,
                        "si", param);
 
        if (ret < 0) _E("Failed to request restart to deviced (%d)", ret);
@@ -327,13 +324,13 @@ static void poweroff_clicked(const struct popup_ops *ops)
 
        unload_simple_popup(ops);
 
-       param[0] = POWER_OPERATION_OFF;
+       param[0] = REBOOT_OPERATION_OFF;
        snprintf(data, sizeof(data), "0");
        param[1] = data;
        ret = popup_dbus_method_sync(DEVICED_BUS_NAME,
-                       POWER_OBJECT_PATH,
-                       POWER_INTERFACE_NAME,
-                       POWER_METHOD,
+                       REBOOT_OBJECT_PATH,
+                       REBOOT_INTERFACE_NAME,
+                       REBOOT_METHOD,
                        "si", param);
        if (ret < 0) _E("Failed to request poweroff to deviced (%d)", ret);
 }
index 868243e..579b516 100755 (executable)
@@ -117,13 +117,13 @@ static void poweroff_clicked(const struct popup_ops *ops)
 
        unload_simple_popup(ops);
 
-       param[0] = POWER_OPERATION_OFF;
+       param[0] = REBOOT_OPERATION_OFF;
        snprintf(data, sizeof(data), "0");
        param[1] = data;
        ret = popup_dbus_method_sync(DEVICED_BUS_NAME,
-                       POWER_OBJECT_PATH,
-                       POWER_INTERFACE_NAME,
-                       POWER_METHOD,
+                       REBOOT_OBJECT_PATH,
+                       REBOOT_INTERFACE_NAME,
+                       REBOOT_METHOD,
                        "si", param);
        if (ret < 0) _E("Failed to request poweroff to deviced (%d)", ret);
 }
index fbfcfab..1494316 100755 (executable)
 #define SYSTEMD_STOP_POWER_OFF 4
 
 #define DEVICED_BUS_NAME        "org.tizen.system.deviced"
-#define POWER_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
-#define POWER_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
+#define REBOOT_OBJECT_PATH     "/Org/Tizen/System/DeviceD/Reboot"
+#define REBOOT_INTERFACE_NAME  DEVICED_BUS_NAME".reboot"
 
-#define POWER_METHOD            "reboot"
-#define POWER_OPERATION_OFF     "poweroff"
+#define REBOOT_METHOD            "reboot"
+#define REBOOT_OPERATION_OFF     "poweroff"
 #define TIMEOUT_POWEROFF 5 /* seconds */
 #define TELEPHONY_PATH "tizen.org/feature/network.telephony"
 
@@ -250,13 +250,13 @@ static void poweroff_clicked(const struct popup_ops *ops)
 
        unload_simple_popup(ops);
 
-       param[0] = POWER_OPERATION_OFF;
+       param[0] = REBOOT_OPERATION_OFF;
        snprintf(data, sizeof(data), "0");
        param[1] = data;
        ret = popup_dbus_method_sync(DEVICED_BUS_NAME,
-                       POWER_OBJECT_PATH,
-                       POWER_INTERFACE_NAME,
-                       POWER_METHOD,
+                       REBOOT_OBJECT_PATH,
+                       REBOOT_INTERFACE_NAME,
+                       REBOOT_METHOD,
                        "si", param);
        if (ret < 0) _E("Failed to request poweroff to deviced (%d)", ret);
 }