From: taeyoung Date: Thu, 16 Jun 2016 03:56:23 +0000 (+0900) Subject: battery: change dbus method call to dbus signal X-Git-Tag: submit/tizen/20160616.062021~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F74882%2F1;p=platform%2Fadaptation%2Femulator%2Femulator-daemon.git battery: change dbus method call to dbus signal - Battery information was delivered to deviced by calling dbus method of deviced. But battery HAL is applied and the interface needs to be changed to dbus signal due to the registsering dbus method issues. Change-Id: I6a3b1a184b6be3596abc2aaa0e29dd62b41b34cb Signed-off-by: taeyoung --- diff --git a/src/mobile.cpp b/src/mobile.cpp index ca6bf83..cc789e3 100644 --- a/src/mobile.cpp +++ b/src/mobile.cpp @@ -97,7 +97,7 @@ static void dbus_send_power_supply(int capacity, int charger) snprintf(option, sizeof(option), "int32:5 string:\"%d\" string:\"%s\" string:\"Good\" string:\"%d\" string:\"1\"", capacity, state, (charger + 1)); - dbus_send(power_device, DBUS_SEND_SYSNOTI, option); + dbus_send_signal(power_device, DBUS_SEND_SYSNOTI, option); } static void dbus_send_usb(int on) diff --git a/src/mobile_dev.cpp b/src/mobile_dev.cpp index cfc700c..eeeb4ac 100644 --- a/src/mobile_dev.cpp +++ b/src/mobile_dev.cpp @@ -130,7 +130,7 @@ static void dbus_send_power_supply(int capacity, int charger) sprintf(option, "int32:5 string:\"%d\" string:\"%s\" string:\"Good\" string:\"%d\" string:\"1\"", capacity, state, (charger + 1)); - dbus_send(power_device, option); + dbus_send_signal(power_device, DBUS_SEND_SYSNOTI, option); } #define DEVICE_CHANGED "device_changed" diff --git a/src/wearable.cpp b/src/wearable.cpp index 5ccff7c..f8c8010 100644 --- a/src/wearable.cpp +++ b/src/wearable.cpp @@ -64,7 +64,7 @@ static void dbus_send_power_supply(int capacity, int charger) snprintf(option, sizeof(option), "int32:5 string:\"%d\" string:\"%s\" string:\"Good\" string:\"%d\" string:\"1\"", capacity, state, (charger + 1)); - dbus_send(power_device, DBUS_SEND_SYSNOTI, option); + dbus_send_signal(power_device, DBUS_SEND_SYSNOTI, option); } static void dbus_send_usb(int on) diff --git a/src/wearable_dev.cpp b/src/wearable_dev.cpp index 454f6b1..faad9cb 100644 --- a/src/wearable_dev.cpp +++ b/src/wearable_dev.cpp @@ -85,7 +85,7 @@ static void dbus_send_power_supply(int capacity, int charger) sprintf(option, "int32:5 string:\"%d\" string:\"%s\" string:\"Good\" string:\"%d\" string:\"1\"", capacity, state, (charger + 1)); - dbus_send(power_device, option); + dbus_send_signal(power_device, DBUS_SEND_SYSNOTI, option); } #define DEVICE_CHANGED "device_changed"