From: jusung son Date: Fri, 29 Mar 2019 01:28:47 +0000 (+0900) Subject: Remove unnecessary prefix X-Git-Tag: submit/tizen/20190401.010208~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a3db3139e47e2ce0fac1a9df3518dd37b68a578;p=platform%2Fcore%2Fapi%2Fnotification.git Remove unnecessary prefix Change-Id: Ife2f9b6b760a5bb0a129f3fa81801e7d537d0a06 Signed-off-by: jusung son --- diff --git a/notification-ex/abstract_item.cc b/notification-ex/abstract_item.cc index 4dd60fb1..32acd4df 100644 --- a/notification-ex/abstract_item.cc +++ b/notification-ex/abstract_item.cc @@ -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 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); } diff --git a/notification-ex/common.h b/notification-ex/common.h index 44228233..72b4677d 100644 --- a/notification-ex/common.h +++ b/notification-ex/common.h @@ -22,18 +22,18 @@ 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 diff --git a/notification-ex/db_manager.cc b/notification-ex/db_manager.cc index 10991feb..5b5d5fe9 100644 --- a/notification-ex/db_manager.cc +++ b/notification-ex/db_manager.cc @@ -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 addedItem, sqlite3* db int uid = static_pointer_cast(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> addedItem) { @@ -376,24 +376,24 @@ int DBManager::InsertNotification(list> 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(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> 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 updatedItem, @@ -545,7 +545,7 @@ int DBManager::UpdateHideList(shared_ptr updatedItem, static_pointer_cast(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 updatedItem) { int uid = static_pointer_cast(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 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 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 deletedItem) { uid); if (!query) { LOGE("OOM - sql query"); - return NOTIFICATION_ERROR_OUT_OF_MEMORY; + return ERROR_OUT_OF_MEMORY; } ret = ExecuteQuery(query, nullptr); diff --git a/notification-ex/dbus_connection_manager.cc b/notification-ex/dbus_connection_manager.cc index 2cf92971..6b81f6a4 100644 --- a/notification-ex/dbus_connection_manager.cc +++ b/notification-ex/dbus_connection_manager.cc @@ -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 diff --git a/notification-ex/dbus_event_listener.cc b/notification-ex/dbus_event_listener.cc index c5f048ba..cc03c2cf 100644 --- a/notification-ex/dbus_event_listener.cc +++ b/notification-ex/dbus_event_listener.cc @@ -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() { diff --git a/notification-ex/default_action_factory.cc b/notification-ex/default_action_factory.cc index 89f7689b..fde65ee9 100644 --- a/notification-ex/default_action_factory.cc +++ b/notification-ex/default_action_factory.cc @@ -36,7 +36,7 @@ namespace item { unique_ptr 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); diff --git a/notification-ex/default_item_factory.cc b/notification-ex/default_item_factory.cc index 13e43d7e..8fa7902a 100644 --- a/notification-ex/default_item_factory.cc +++ b/notification-ex/default_item_factory.cc @@ -46,7 +46,7 @@ namespace item { unique_ptr DefaultItemFactory::CreateItem(int type) { switch (type) { case AbstractItem::NullObject : - THROW(NOTIFICATION_ERROR_INVALID_PARAMETER); + THROW(ERROR_INVALID_PARAMETER); case AbstractItem::Text : return unique_ptr(new TextItem("","")); case AbstractItem::Icon : diff --git a/notification-ex/event_info.cc b/notification-ex/event_info.cc index 2dbd554a..ded0ecf4 100644 --- a/notification-ex/event_info.cc +++ b/notification-ex/event_info.cc @@ -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"); } diff --git a/notification-ex/exception.h b/notification-ex/exception.h index 4da7af01..0f8b7f2d 100644 --- a/notification-ex/exception.h +++ b/notification-ex/exception.h @@ -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 ""; diff --git a/notification-ex/group_item.cc b/notification-ex/group_item.cc index 4022c73a..430a6d1b 100644 --- a/notification-ex/group_item.cc +++ b/notification-ex/group_item.cc @@ -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_; diff --git a/notification-ex/manager.cc b/notification-ex/manager.cc index d1c9e57e..a408dd73 100644 --- a/notification-ex/manager.cc +++ b/notification-ex/manager.cc @@ -149,7 +149,7 @@ void Manager::OnEvent(const IEventInfo& info, list serialized) { int type = info.GetEventType(); NotificationError error = (static_cast(info)).GetError(); - if (error != NOTIFICATION_ERROR_NONE) { + if (error != ERROR_NONE) { LOGE("Handling error event (%d)", error); OnError(error, info.GetRequestId()); return; diff --git a/notification-ex/progress_item.cc b/notification-ex/progress_item.cc index 9738ea35..a697d57a 100644 --- a/notification-ex/progress_item.cc +++ b/notification-ex/progress_item.cc @@ -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"); }