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 3db6bb8ccebce84c3ef0ec35997d3503c256b7c3..0d558873c20c69163cd67326e38b74818acd304e 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 5bb6c85336c0b81c0c84506c5156d5d7765260a5..b3b318b718e056f46b19d1beefd801d288c71d01 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 942ab2c02889a0ff7666c9bc8e1ba77a4d358a75..317c2f77a22c1e365a0412c458a11bbffaf917bb 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 e83fb550a6840c78877ddf7d99fa4bedcff6a891..c49ed673df4a6a9a26689333bfe847632af29e15 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 7ee45df1540548e9170106bcfbb45a2045d3e9c2..b3166b0d2e6d861c77812b456ed52ba4f8afed64 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 868243e9f100fa9951845b376233642d346662d2..579b51606cdbaf207ec5818a0f4073941453496b 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 fbfcfab936b3551def518507f3a907f8ecb7d58a..1494316496a25149457d84d2fcbac4ee5dba27ea 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);
 }