From: lokilee73 Date: Mon, 6 Mar 2017 05:38:39 +0000 (+0900) Subject: common : change dbus name of powering off from power to reboot X-Git-Tag: submit/tizen/20170308.102746~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef5bdac9ac064659702b7e528d362a899bfc7b5d;p=platform%2Fcore%2Fsystem%2Fsystem-popup.git common : change dbus name of powering off from power to reboot Change-Id: I531698756feebdbb9bedd354f20959205f3aa881 Signed-off-by: lokilee73 --- diff --git a/src/battery/battery-mobile.c b/src/battery/battery-mobile.c index 3db6bb8..0d55887 100755 --- a/src/battery/battery-mobile.c +++ b/src/battery/battery-mobile.c @@ -24,10 +24,10 @@ #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); diff --git a/src/battery/battery-wearable.c b/src/battery/battery-wearable.c index 5bb6c85..b3b318b 100755 --- a/src/battery/battery-wearable.c +++ b/src/battery/battery-wearable.c @@ -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); diff --git a/src/cooldown/cooldown-wearable.c b/src/cooldown/cooldown-wearable.c index 942ab2c..317c2f7 100755 --- a/src/cooldown/cooldown-wearable.c +++ b/src/cooldown/cooldown-wearable.c @@ -27,12 +27,12 @@ #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) diff --git a/src/overheat/overheat.c b/src/overheat/overheat.c index e83fb55..c49ed67 100755 --- a/src/overheat/overheat.c +++ b/src/overheat/overheat.c @@ -22,12 +22,12 @@ #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); diff --git a/src/powerkey/powerkey-mobile.c b/src/powerkey/powerkey-mobile.c index 7ee45df..b3166b0 100755 --- a/src/powerkey/powerkey-mobile.c +++ b/src/powerkey/powerkey-mobile.c @@ -22,17 +22,14 @@ #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); } diff --git a/src/powerkey/powerkey-tv.c b/src/powerkey/powerkey-tv.c index 868243e..579b516 100755 --- a/src/powerkey/powerkey-tv.c +++ b/src/powerkey/powerkey-tv.c @@ -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); } diff --git a/src/powerkey/powerkey-wearable.c b/src/powerkey/powerkey-wearable.c index fbfcfab..1494316 100755 --- a/src/powerkey/powerkey-wearable.c +++ b/src/powerkey/powerkey-wearable.c @@ -24,11 +24,11 @@ #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); }