From b965dbc933b1f523895076bba7d2d2fa190a7af7 Mon Sep 17 00:00:00 2001 From: Ryszard Matuszyk Date: Tue, 17 Mar 2015 11:44:18 +0100 Subject: [PATCH] [Notification] removeAll [Verification] Build required Change-Id: I91eb560d72ba302019ceac70ade55b0c96ab83f1 Signed-off-by: Ryszard Matuszyk --- src/notification/notification_manager.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); } -- 2.34.1