Changes for using new notification API. 66/40466/1 accepted/tizen_3.0.2015.q2_common tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/3.0.2015.q2/common/20150615.091833 accepted/tizen/common/20150612.065903 accepted/tizen/mobile/20150615.071216 accepted/tizen/tv/20150615.071241 accepted/tizen/wearable/20150617.012830 submit/submit/tizen/20150609.020831/20150609.021355 submit/submit/tizen/20150609.074149/20150609.101349 submit/submit/tizen_mobile/20150609.015041/20150609.021256 submit/tizen/20150609.074149 submit/tizen/20150611.063059 submit/tizen_3.0.2015.q2_common/20150615.075539 submit/tizen_mobile/20150604.063436 submit/tizen_mobile/20150612.084020 submit/tizen_tv/20150612.084103 submit/tizen_wearable/20150616.000000 submit/tizen_wearble/20150612.084038 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
authorKyuho Jo <kyuho.jo@samsung.com>
Thu, 4 Jun 2015 06:16:28 +0000 (15:16 +0900)
committerKyuho Jo <kyuho.jo@samsung.com>
Thu, 4 Jun 2015 06:16:28 +0000 (15:16 +0900)
Change-Id: I9b31bbe1bdfdfd4be10a7405721a75373ddece9b
Signed-off-by: Kyuho Jo <kyuho.jo@samsung.com>
src/agent/ui/AskUINotificationBackend.cpp
src/agent/ui/AskUINotificationBackend.h

index 99de50e..16df9d6 100644 (file)
 
 namespace {
 
-const char *errorToString(notification_error_e error) {
-    if (error == NOTIFICATION_ERROR_INVALID_DATA)
-        return "NOTIFICATION_ERROR_INVALID_DATA";
-    if (error == NOTIFICATION_ERROR_NO_MEMORY)
-        return "NOTIFICATION_ERROR_NO_MEMORY";
+const char *errorToString(int error) {
+    if (error == NOTIFICATION_ERROR_INVALID_PARAMETER)
+        return "NOTIFICATION_ERROR_INVALID_PARAMETER";
+    if (error == NOTIFICATION_ERROR_OUT_OF_MEMORY)
+        return "NOTIFICATION_ERROR_OUT_OF_MEMORY";
     if (error == NOTIFICATION_ERROR_FROM_DB)
         return "NOTIFICATION_ERROR_FROM_DB";
     if (error == NOTIFICATION_ERROR_ALREADY_EXIST_ID)
@@ -49,8 +49,8 @@ const char *errorToString(notification_error_e error) {
         return "NOTIFICATION_ERROR_FROM_DBUS";
     if (error == NOTIFICATION_ERROR_NOT_EXIST_ID)
         return "NOTIFICATION_ERROR_NOT_EXIST_ID";
-    if (error == NOTIFICATION_ERROR_IO)
-        return "NOTIFICATION_ERROR_IO";
+    if (error == NOTIFICATION_ERROR_IO_ERROR)
+        return "NOTIFICATION_ERROR_IO_ERROR";
     if (error == NOTIFICATION_ERROR_SERVICE_NOT_READY)
         return "NOTIFICATION_ERROR_SERVICE_NOT_READY";
     if (error == NOTIFICATION_ERROR_NONE)
@@ -95,7 +95,7 @@ bool AskUINotificationBackend::start(const std::string &client, const std::strin
 
 bool AskUINotificationBackend::createUI(const std::string &client, const std::string &user,
                                         const std::string &privilege) {
-    notification_error_e err;
+    int err;
 
     m_notification = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_NONE,
                                       NOTIFICATION_PRIV_ID_NONE);
@@ -223,7 +223,7 @@ void AskUINotificationBackend::run() {
 
     try {
         int buttonClicked = 0;
-        notification_error_e ret = notification_wait_response(m_notification, m_responseTimeout,
+        int ret = notification_wait_response(m_notification, m_responseTimeout,
                                                               &buttonClicked, nullptr);
         ALOGD("notification_wait_response finished with ret code: [" << ret << "]");
 
index 1f77bd0..b57a11c 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <atomic>
 #include <notification.h>
+#include <notification_internal.h>
+#include <notification_error.h>
 #include <future>
 #include <thread>