Remove unnecessary prefix 62/202462/4
authorjusung son <jusung07.son@samsung.com>
Fri, 29 Mar 2019 01:28:47 +0000 (10:28 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Mon, 1 Apr 2019 00:07:24 +0000 (00:07 +0000)
Change-Id: Ife2f9b6b760a5bb0a129f3fa81801e7d537d0a06
Signed-off-by: jusung son <jusung07.son@samsung.com>
12 files changed:
notification-ex/abstract_item.cc
notification-ex/common.h
notification-ex/db_manager.cc
notification-ex/dbus_connection_manager.cc
notification-ex/dbus_event_listener.cc
notification-ex/default_action_factory.cc
notification-ex/default_item_factory.cc
notification-ex/event_info.cc
notification-ex/exception.h
notification-ex/group_item.cc
notification-ex/manager.cc
notification-ex/progress_item.cc

index 4dd60fb..32acd4d 100644 (file)
@@ -238,7 +238,7 @@ void AbstractItem::Deserialize(Bundle b) {
 
   string type_str = b.GetString(ABSTRACT_ITEM_TYPE_KEY);
   if (type_str.empty())
-    THROW(NOTIFICATION_ERROR_IO_ERROR);
+    THROW(ERROR_IO_ERROR);
 
   impl_->id_ = b.GetString(ABSTRACT_ITEM_ID_KEY);
   impl_->sender_appid_ = b.GetString(ABSTRACT_ITEM_SENDER_APPID_KEY);
@@ -350,7 +350,7 @@ std::shared_ptr<LEDInfo> AbstractItem::GetLEDInfo() const {
 int AbstractItem::GetType(Bundle b) {
   string type_str = b.GetString(ABSTRACT_ITEM_TYPE_KEY);
   if (type_str.empty())
-    THROW(NOTIFICATION_ERROR_IO_ERROR);
+    THROW(ERROR_IO_ERROR);
   return strtol(type_str.c_str(), NULL, 10);
 }
 
index 4422823..72b4677 100644 (file)
 namespace notification {
 
 enum NotificationError {
NOTIFICATION_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
NOTIFICATION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
NOTIFICATION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
NOTIFICATION_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
NOTIFICATION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
NOTIFICATION_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
NOTIFICATION_ERROR_FROM_DB = TIZEN_ERROR_NOTIFICATION | 0x01, /**< Error from DB query */
NOTIFICATION_ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02, /**< Already exist private ID */
NOTIFICATION_ERROR_FROM_DBUS = TIZEN_ERROR_NOTIFICATION | 0x03, /**< Error from DBus */
NOTIFICATION_ERROR_NOT_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x04, /**< Not exist private ID */
NOTIFICATION_ERROR_SERVICE_NOT_READY = TIZEN_ERROR_NOTIFICATION | 0x05, /**< No response from notification service */
NOTIFICATION_ERROR_MAX_EXCEEDED = TIZEN_ERROR_NOTIFICATION | 0x06, /**< Max notification count exceeded (@b Since: 3.0) */
+ ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
+ ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
+ ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
+ ERROR_FROM_DB = TIZEN_ERROR_NOTIFICATION | 0x01, /**< Error from DB query */
+ ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02, /**< Already exist private ID */
+ ERROR_FROM_DBUS = TIZEN_ERROR_NOTIFICATION | 0x03, /**< Error from DBus */
+ ERROR_NOT_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x04, /**< Not exist private ID */
+ ERROR_SERVICE_NOT_READY = TIZEN_ERROR_NOTIFICATION | 0x05, /**< No response from notification service */
+ ERROR_MAX_EXCEEDED = TIZEN_ERROR_NOTIFICATION | 0x06, /**< Max notification count exceeded (@b Since: 3.0) */
 };
 
 }  // namespace notification
index 10991fe..5b5d5fe 100644 (file)
@@ -93,17 +93,17 @@ void DBManager::CloseDB(sqlite3* db) {
 }
 
 int DBManager::ExecuteQuery(sqlite3* db, const char* query, int* num_changes) {
-  int ret = NOTIFICATION_ERROR_NONE;
+  int ret = ERROR_NONE;
   sqlite3_stmt *stmt;
 
   if (db == nullptr || query == nullptr)
-    return NOTIFICATION_ERROR_INVALID_PARAMETER;
+    return ERROR_INVALID_PARAMETER;
 
   ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, nullptr);
   if (ret != SQLITE_OK) {
     /* LCOV_EXCL_START */
     LOGE("Sqlite3 err[%d][%s]", ret, sqlite3_errmsg(db));
-    return NOTIFICATION_ERROR_FROM_DB;
+    return ERROR_FROM_DB;
     /* LCOV_EXCL_STOP */
   }
 
@@ -111,11 +111,11 @@ int DBManager::ExecuteQuery(sqlite3* db, const char* query, int* num_changes) {
   if (ret == SQLITE_OK || ret == SQLITE_DONE) {
     if (num_changes != nullptr)
     *num_changes = sqlite3_changes(db);
-    ret = NOTIFICATION_ERROR_NONE;
+    ret = ERROR_NONE;
   } else {
     /* LCOV_EXCL_START */
     LOGE("Sqlite err[%d][%s]", ret, sqlite3_errmsg(db));
-    ret = NOTIFICATION_ERROR_FROM_DB;
+    ret = ERROR_FROM_DB;
     /* LCOV_EXCL_STOP */
   }
 
@@ -127,11 +127,11 @@ int DBManager::ExecuteQuery(const char* query, int* num_changes) {
   int ret;
 
   if (query == nullptr)
-    return NOTIFICATION_ERROR_INVALID_PARAMETER;
+    return ERROR_INVALID_PARAMETER;
 
   sqlite3* db = OpenDB();
   if (db == nullptr)
-    return NOTIFICATION_ERROR_FROM_DB;
+    return ERROR_FROM_DB;
 
   ret = ExecuteQuery(db, query, num_changes);
   CloseDB(db);
@@ -154,7 +154,7 @@ int DBManager::CheckDBIntegrity(void* user_data, int argc,
 }
 
 int DBManager::RecoverCorruptedDB(sqlite3* db) {
-  int ret = NOTIFICATION_ERROR_NONE;
+  int ret = ERROR_NONE;
   char* errmsg = nullptr;
 
   LOGI("DB is corrupted, start to recover corrupted db");
@@ -167,14 +167,14 @@ int DBManager::RecoverCorruptedDB(sqlite3* db) {
   if (ret != SQLITE_OK) {
     LOGE("Failed to open db[%d]", ret);
     unlink(DBPATH);
-    ret = NOTIFICATION_ERROR_FROM_DB;
+    ret = ERROR_FROM_DB;
     goto out;
   }
 
   ret = sqlite3_exec(db, CREATE_NOTIFICATION_TABLE, nullptr, nullptr, &errmsg);
   if (ret != SQLITE_OK) {
     LOGE("Failed to exec query[%d][%s]", ret, errmsg);
-    ret = NOTIFICATION_ERROR_FROM_DB;
+    ret = ERROR_FROM_DB;
   }
 
 out:
@@ -185,7 +185,7 @@ out:
 }
 
 int DBManager::InitializeDB() {
-  int ret = NOTIFICATION_ERROR_NONE;
+  int ret = ERROR_NONE;
   int sql_ret;
   sqlite3* db;
   char *errmsg = nullptr;
@@ -195,21 +195,21 @@ int DBManager::InitializeDB() {
                  SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE, nullptr);
   if (sql_ret != SQLITE_OK) {
     LOGE("Failed to open db[%d]", ret);
-    ret = NOTIFICATION_ERROR_FROM_DB;
+    ret = ERROR_FROM_DB;
     goto out;
   }
 
   sql_ret = sqlite3_exec(db, CREATE_NOTIFICATION_TABLE, nullptr, nullptr, &errmsg);
   if (sql_ret != SQLITE_OK) {
     LOGE("Failed to exec sqlite[%d][%s]", ret, errmsg);
-    ret = NOTIFICATION_ERROR_FROM_DB;
+    ret = ERROR_FROM_DB;
     goto out;
   }
 
   sql_ret = sqlite3_exec(db, "PRAGMA foreign_keys = ON", NULL, NULL, NULL);
   if (sql_ret != SQLITE_OK) {
     LOGE("Failed to exec sqlite[%d][%s]", ret, errmsg);
-    ret = NOTIFICATION_ERROR_FROM_DB;
+    ret = ERROR_FROM_DB;
     goto out;
   }
 
@@ -217,7 +217,7 @@ int DBManager::InitializeDB() {
               CheckDBIntegrity, &is_db_corrupted, &errmsg);
   if (sql_ret != SQLITE_OK || is_db_corrupted) {
     LOGE("Failed to exec query[%d][%s]", sql_ret, errmsg);
-    ret = NOTIFICATION_ERROR_FROM_DB;
+    ret = ERROR_FROM_DB;
   }
 
 out:
@@ -253,7 +253,7 @@ void DBManager::CheckLimit(shared_ptr<item::AbstractItem> addedItem, sqlite3* db
   int uid = static_pointer_cast<IItemInfoInternal>(addedItem->GetInfo())->GetUid();
 
   ret = GetCount(addedItem->GetSenderAppId(), uid, &count);
-  if (ret != NOTIFICATION_ERROR_NONE || count <= NOTI_LIMIT)
+  if (ret != ERROR_NONE || count <= NOTI_LIMIT)
     return;
 
   query = sqlite3_mprintf("SELECT root_id FROM noti_ex_list WHERE uid = %d"
@@ -338,13 +338,13 @@ int DBManager::UpdateReceiverList
             uid);
   if (!query) {
     LOGE("OOM - sql query");
-    return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+    return ERROR_OUT_OF_MEMORY;
   }
 
   ret = ExecuteQuery(db, query, nullptr);
   sqlite3_free(query);
 
-  if (ret != NOTIFICATION_ERROR_NONE)
+  if (ret != ERROR_NONE)
     return ret;
 
   for (auto& i : updatedItem->GetReceiverList()) {
@@ -358,16 +358,16 @@ int DBManager::UpdateReceiverList
 
     if (!query) {
       LOGE("OOM - sql query");
-      return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+      return ERROR_OUT_OF_MEMORY;
     }
 
     ret = ExecuteQuery(db, query, nullptr);
     sqlite3_free(query);
 
-    if (ret != NOTIFICATION_ERROR_NONE)
+    if (ret != ERROR_NONE)
       return ret;
   }
-  return NOTIFICATION_ERROR_NONE;
+  return ERROR_NONE;
 }
 
 int DBManager::InsertNotification(list<shared_ptr<item::AbstractItem>> addedItem) {
@@ -376,24 +376,24 @@ int DBManager::InsertNotification(list<shared_ptr<item::AbstractItem>> addedItem
   sqlite3* db = OpenDB();
 
   if (db == nullptr)
-    return NOTIFICATION_ERROR_FROM_DB;
+    return ERROR_FROM_DB;
 
   if (sqlite3_exec(db, "BEGIN TRANSACTION", nullptr, nullptr, nullptr)) {
     LOGE("begin transaction error : %s", sqlite3_errmsg(db));
     CloseDB(db);
-    return NOTIFICATION_ERROR_FROM_DB;
+    return ERROR_FROM_DB;
   }
 
   for (auto& i : addedItem) {
     int uid = static_pointer_cast<IItemInfoInternal>(i->GetInfo())->GetUid();
     ret = GetCount(i->GetId(), i->GetSenderAppId(), uid, &count);
-    if (ret != NOTIFICATION_ERROR_NONE)
+    if (ret != ERROR_NONE)
        break;
 
     if (count > 0) {
       LOGE("already exist id :[%s] appid[%s]",
                i->GetId().c_str(), i->GetSenderAppId().c_str());
-      ret = NOTIFICATION_ERROR_ALREADY_EXIST_ID;
+      ret = ERROR_ALREADY_EXIST_ID;
       break;
     }
 
@@ -412,25 +412,25 @@ int DBManager::InsertNotification(list<shared_ptr<item::AbstractItem>> addedItem
 
     if (!query) {
       LOGE("OOM - sql query");
-      ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
+      ret = ERROR_OUT_OF_MEMORY;
       break;
     }
 
     ret = ExecuteQuery(db, query, nullptr);
     sqlite3_free(query);
-    if (ret != NOTIFICATION_ERROR_NONE)
+    if (ret != ERROR_NONE)
       break;
 
     ret = UpdateReceiverList(i, db);
-    if (ret != NOTIFICATION_ERROR_NONE)
+    if (ret != ERROR_NONE)
       break;
   }
 
-  if (ret == NOTIFICATION_ERROR_NONE) {
+  if (ret == ERROR_NONE) {
     CheckLimit(*(addedItem.begin()), db);
     if (sqlite3_exec(db, "END TRANSACTION", nullptr, nullptr, nullptr)) {
       LOGE("end transaction error : %s", sqlite3_errmsg(db));
-      ret = NOTIFICATION_ERROR_FROM_DB;
+      ret = ERROR_FROM_DB;
     }
   } else {
     if (sqlite3_exec(db, "ROLLBACK TRANSACTION", nullptr, nullptr, nullptr))
@@ -504,13 +504,13 @@ int DBManager::GetCount(const string& root_id, const string& app_id,
   }
   if (!query) {
     LOGE("OOM - sql query");
-    return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+    return ERROR_OUT_OF_MEMORY;
   }
 
   db = OpenDB();
   if (db == nullptr) {
     sqlite3_free(query);
-    return NOTIFICATION_ERROR_FROM_DB;
+    return ERROR_FROM_DB;
   }
 
   ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, nullptr);
@@ -518,7 +518,7 @@ int DBManager::GetCount(const string& root_id, const string& app_id,
     LOGE("Failed to sqlite3_prepare [%d][%s]", ret,    sqlite3_errmsg(db));
     sqlite3_free(query);
     CloseDB(db);
-    return NOTIFICATION_ERROR_FROM_DB;
+    return ERROR_FROM_DB;
   }
   sqlite3_free(query);
 
@@ -530,7 +530,7 @@ int DBManager::GetCount(const string& root_id, const string& app_id,
 
   sqlite3_finalize(stmt);
   CloseDB(db);
-  return NOTIFICATION_ERROR_NONE;
+  return ERROR_NONE;
 }
 
 int DBManager::UpdateHideList(shared_ptr<item::AbstractItem> updatedItem,
@@ -545,7 +545,7 @@ int DBManager::UpdateHideList(shared_ptr<item::AbstractItem> updatedItem,
             static_pointer_cast<IItemInfoInternal>(updatedItem->GetInfo())->GetUid());
   if (!query) {
     LOGE("OOM - sql query");
-    return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+    return ERROR_OUT_OF_MEMORY;
   }
 
   ret = ExecuteQuery(query, nullptr);
@@ -560,15 +560,15 @@ int DBManager::UpdateNotification(shared_ptr<item::AbstractItem> updatedItem) {
   int uid = static_pointer_cast<IItemInfoInternal>(updatedItem->GetInfo())->GetUid();
 
   ret = GetCount(updatedItem->GetId(), updatedItem->GetSenderAppId(), uid, &count);
-  if (ret != NOTIFICATION_ERROR_NONE)
+  if (ret != ERROR_NONE)
     return ret;
 
   if (count <= 0)
-    return NOTIFICATION_ERROR_NOT_EXIST_ID;
+    return ERROR_NOT_EXIST_ID;
 
   sqlite3* db = OpenDB();
   if (db == nullptr)
-    return NOTIFICATION_ERROR_FROM_DB;
+    return ERROR_FROM_DB;
 
   Bundle b = updatedItem->Serialize();
   query = sqlite3_mprintf("UPDATE noti_ex_list SET"
@@ -586,28 +586,28 @@ int DBManager::UpdateNotification(shared_ptr<item::AbstractItem> updatedItem) {
   if (!query) {
     LOGE("OOM - sql query");
     CloseDB(db);
-    return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+    return ERROR_OUT_OF_MEMORY;
   }
 
   if (sqlite3_exec(db, "BEGIN TRANSACTION", nullptr, nullptr, nullptr)) {
     LOGE("begin transaction error : %s", sqlite3_errmsg(db));
     sqlite3_free(query);
     CloseDB(db);
-    return NOTIFICATION_ERROR_FROM_DB;
+    return ERROR_FROM_DB;
   }
 
   ret = ExecuteQuery(db, query, nullptr);
   sqlite3_free(query);
-  if (ret != NOTIFICATION_ERROR_NONE)
+  if (ret != ERROR_NONE)
     goto out;
 
   ret = UpdateReceiverList(updatedItem, db);
 
 out:
-  if (ret == NOTIFICATION_ERROR_NONE) {
+  if (ret == ERROR_NONE) {
     if (sqlite3_exec(db, "END TRANSACTION", nullptr, nullptr, nullptr)) {
       LOGE("end transaction error : %s", sqlite3_errmsg(db));
-      ret = NOTIFICATION_ERROR_FROM_DB;
+      ret = ERROR_FROM_DB;
     }
   } else {
     if (sqlite3_exec(db, "ROLLBACK TRANSACTION", nullptr, nullptr, nullptr))
@@ -734,12 +734,12 @@ int DBManager::DeleteNotification(shared_ptr<item::AbstractItem> deletedItem) {
             uid);
   if (!query) {
     LOGE("OOM - sql query");
-    return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+    return ERROR_OUT_OF_MEMORY;
   }
 
   ret = ExecuteQuery(query, nullptr);
   sqlite3_free(query);
-  if (ret != NOTIFICATION_ERROR_NONE)
+  if (ret != ERROR_NONE)
     return ret;
 
   query = sqlite3_mprintf("DELETE FROM receiver_list"
@@ -748,7 +748,7 @@ int DBManager::DeleteNotification(shared_ptr<item::AbstractItem> deletedItem) {
                 uid);
   if (!query) {
     LOGE("OOM - sql query");
-    return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+    return ERROR_OUT_OF_MEMORY;
   }
 
   ret = ExecuteQuery(query, nullptr);
index 2cf9297..6b81f6a 100644 (file)
@@ -42,7 +42,7 @@ DBusConnectionManager& DBusConnectionManager::GetInst() {
   int ret;
   if (w_inst.connection_ == nullptr) {
     ret = w_inst.Init();
-    if (ret != NOTIFICATION_ERROR_NONE)
+    if (ret != ERROR_NONE)
       THROW(ret);
   }
   return w_inst;
@@ -93,12 +93,12 @@ int DBusConnectionManager::Init() {
       LOGE("Failed to get dbus [%s]", error->message);
       g_error_free(error);
     }
-    return NOTIFICATION_ERROR_IO_ERROR;
+    return ERROR_IO_ERROR;
   }
 
   string appid = util::GetAppId();
   if (appid.empty())
-    return NOTIFICATION_ERROR_IO_ERROR;
+    return ERROR_IO_ERROR;
 
   if (IsDataProviderMaster(appid))
     is_DPM_ = true;
@@ -111,9 +111,9 @@ int DBusConnectionManager::Init() {
   if (!owner_id) {
     g_object_unref(connection_);
     LOGE("g_bus_own_name_on_connection, error");
-    return NOTIFICATION_ERROR_IO_ERROR;
+    return ERROR_IO_ERROR;
   }
-  return NOTIFICATION_ERROR_NONE;
+  return ERROR_NONE;
 }
 
 }  // namespace notification
index c5f048b..cc03c2c 100644 (file)
@@ -140,7 +140,7 @@ int DBusEventListener::Impl::RegisterGDBusInterface() {
       LOGE("g_dbus_node_info_new_for_xml err [%s]", error->message);
       g_error_free(error);
     }
-    return NOTIFICATION_ERROR_IO_ERROR;
+    return ERROR_IO_ERROR;
   }
 
   registration_id_ = g_dbus_connection_register_object(
@@ -150,11 +150,11 @@ int DBusEventListener::Impl::RegisterGDBusInterface() {
   g_dbus_node_info_unref(introspection_data);
   if (registration_id_ == 0) {
     LOGE("register object fail");
-    return NOTIFICATION_ERROR_IO_ERROR;
+    return ERROR_IO_ERROR;
   }
 
   LOGI("RegisterGDBusInterface success");
-  return NOTIFICATION_ERROR_NONE;
+  return ERROR_NONE;
 }
 
 void DBusEventListener::Impl::UnRegisterGDBusInterface() {
index 89f7689..fde65ee 100644 (file)
@@ -36,7 +36,7 @@ namespace item {
 unique_ptr<AbstractAction> DefaultActionFactory::CreateAction(int type) {
   switch (type) {
     case AbstractAction::NullObject :
-      THROW(NOTIFICATION_ERROR_INVALID_PARAMETER);
+      THROW(ERROR_INVALID_PARAMETER);
     case AbstractAction::AppControl :
       app_control_h control;
       app_control_create(&control);
index 13e43d7..8fa7902 100644 (file)
@@ -46,7 +46,7 @@ namespace item {
 unique_ptr<AbstractItem> DefaultItemFactory::CreateItem(int type) {
   switch (type) {
     case AbstractItem::NullObject :
-      THROW(NOTIFICATION_ERROR_INVALID_PARAMETER);
+      THROW(ERROR_INVALID_PARAMETER);
     case AbstractItem::Text :
       return unique_ptr<AbstractItem>(new TextItem("",""));
     case AbstractItem::Icon :
index 2dbd554..ded0ecf 100644 (file)
@@ -52,7 +52,7 @@ EventInfo::Impl::Impl(EventInfo* parent, int type, std::string owner,
     parent_(parent) {
   uid_ = getuid();
   request_id_ = util::GetRequestId();
-  error_ = NOTIFICATION_ERROR_NONE;
+  error_ = ERROR_NONE;
   LOGI("EventInfo impl created");
 }
 
index 4da7af0..0f8b7f2 100644 (file)
@@ -56,27 +56,27 @@ class Exception : public std::exception {
   std::string message_;
   std::string GetErrorString(int error_code) {
     switch (error_code) {
-    case NOTIFICATION_ERROR_INVALID_PARAMETER:
+    case ERROR_INVALID_PARAMETER:
       return ": INVALID_PARAMETER";
-    case NOTIFICATION_ERROR_OUT_OF_MEMORY:
+    case ERROR_OUT_OF_MEMORY:
       return ": OUT_OF_MEMORY";
-    case NOTIFICATION_ERROR_IO_ERROR:
+    case ERROR_IO_ERROR:
       return ": IO_ERROR";
-    case NOTIFICATION_ERROR_PERMISSION_DENIED:
+    case ERROR_PERMISSION_DENIED:
       return ": PERMISSION_DENIED";
-    case NOTIFICATION_ERROR_INVALID_OPERATION:
+    case ERROR_INVALID_OPERATION:
       return ": INVALID_OPERATION";
-    case NOTIFICATION_ERROR_FROM_DB:
+    case ERROR_FROM_DB:
       return ": ERROR_FROM_DB";
-    case NOTIFICATION_ERROR_ALREADY_EXIST_ID:
+    case ERROR_ALREADY_EXIST_ID:
       return ": ALREADY_EXIST_ID";
-    case NOTIFICATION_ERROR_FROM_DBUS:
+    case ERROR_FROM_DBUS:
       return ": ERROR_FROM_DBUS";
-    case NOTIFICATION_ERROR_NOT_EXIST_ID:
+    case ERROR_NOT_EXIST_ID:
       return ": NOT_EXIST_ID";
-    case NOTIFICATION_ERROR_SERVICE_NOT_READY:
+    case ERROR_SERVICE_NOT_READY:
       return ": SERVICE_NOT_READY";
-    case NOTIFICATION_ERROR_MAX_EXCEEDED:
+    case ERROR_MAX_EXCEEDED:
       return ": MAX_EXCEEDED";
     default:
       return "";
index 4022c73..430a6d1 100644 (file)
@@ -157,7 +157,7 @@ string GroupItem::GetAppLabel() {
    char* name;
    int ret = app_get_name(&name);
    if (ret != APP_ERROR_NONE)
-     THROW(NOTIFICATION_ERROR_IO_ERROR);
+     THROW(ERROR_IO_ERROR);
    impl_->app_label_ = string(name);
  }
  return impl_->app_label_;
index d1c9e57..a408dd7 100644 (file)
@@ -149,7 +149,7 @@ void Manager::OnEvent(const IEventInfo& info, list<Bundle> serialized) {
   int type = info.GetEventType();
   NotificationError error =
       (static_cast<const IEventInfoInternal&>(info)).GetError();
-  if (error != NOTIFICATION_ERROR_NONE) {
+  if (error != ERROR_NONE) {
     LOGE("Handling error event (%d)", error);
     OnError(error, info.GetRequestId());
     return;
index 9738ea3..a697d57 100644 (file)
@@ -55,7 +55,7 @@ ProgressItem::Impl::Impl(float min_val, float current, float max_val,
     ProgressItem* parent)
     : min_(min_val), current_(current), max_(max_val), parent_(parent) {
   if (min_val > current || max_val < current)
-    THROW(NOTIFICATION_ERROR_INVALID_PARAMETER);
+    THROW(ERROR_INVALID_PARAMETER);
   LOGI("ProgressItem impl created");
 }