From: Ryszard Matuszyk Date: Tue, 17 Mar 2015 10:44:18 +0000 (+0100) Subject: [Notification] removeAll X-Git-Tag: submit/tizen_tv/20150603.064601~1^2~282 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b965dbc933b1f523895076bba7d2d2fa190a7af7;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Notification] removeAll [Verification] Build required Change-Id: I91eb560d72ba302019ceac70ade55b0c96ab83f1 Signed-off-by: Ryszard Matuszyk --- diff --git a/src/notification/notification_manager.cc b/src/notification/notification_manager.cc index dfbe73db..ce50be1c 100644 --- a/src/notification/notification_manager.cc +++ b/src/notification/notification_manager.cc @@ -41,6 +41,20 @@ PlatformResult NotificationManager::Remove(const picojson::object& args) { } PlatformResult NotificationManager::RemoveAll() { + int ret = notification_delete_all(NOTIFICATION_TYPE_NOTI); + if (ret != NOTIFICATION_ERROR_NONE) { + LoggerE("Notification remove all failed: %d", ret); + return PlatformResult(ErrorCode::UNKNOWN_ERR, + "Notification noti remove all failed"); + } + + ret = notification_delete_all(NOTIFICATION_TYPE_ONGOING); + if (ret != NOTIFICATION_ERROR_NONE) { + LoggerE("Notification remove all failed: %d", ret); + return PlatformResult(ErrorCode::UNKNOWN_ERR, + "Notification ongoing remove all failed"); + } + return PlatformResult(ErrorCode::NO_ERROR); }