Added new method to the NotificationManager Interface
authorJiban Prakash <p.jiban@samsung.com>
Fri, 1 Nov 2013 12:26:25 +0000 (21:26 +0900)
committerJiban Prakash <p.jiban@samsung.com>
Fri, 1 Nov 2013 12:26:25 +0000 (21:26 +0900)
Change-Id: I3adb8ff8a85977bd239d0869fd05d7416ee60249
Signed-off-by: Jiban Prakash <p.jiban@samsung.com>
src/app/FApp_NotificationManagerImpl.cpp
src/app/inc/FApp_INotificationManagerImpl.h

index d4579be..cbd7a03 100644 (file)
@@ -83,7 +83,13 @@ _NotificationManagerImpl::GetBadgeNumber(void) const
 {
        SysTryReturn(NID_APP, __pNotiImpl != null, -1, E_SYSTEM, "[E_SYSTEM] Notification interface error.");
 
-       return __pNotiImpl->GetBadgeNumber();
+       int res = __pNotiImpl->GetBadgeNumber();
+       if (GetLastResult() == E_OPERATION_FAILED)
+       {
+               SetLastResult(E_SUCCESS);
+               return -1;
+       }
+       return res;
 }
 
 
@@ -145,6 +151,11 @@ _NotificationManagerImpl::GetBadgeNumber(const AppId& appId) const
                SetLastResult(E_OBJ_NOT_FOUND);
        }
 
+       if (GetLastResult() == E_OPERATION_FAILED)
+       {
+               SetLastResult(E_SUCCESS);
+               return -1;
+       }
        return ret;
 }
 
@@ -211,7 +222,7 @@ _NotificationManagerImpl::NotifyOngoingActivity(const String& messageText) const
 {
        SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error.");
 
-       return __pNotiImpl->NotifyOngoingActivity(messageText, String(L""));
+       return __pNotiImpl->NotifyOngoingActivity(messageText);
 }
 
 
index c481132..8cec396 100644 (file)
@@ -84,6 +84,21 @@ public:
        virtual result RemoveNotification(void) = 0;
 
        /**
+        * Notifies the user about the ongoing activity using a message.
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        */
+       virtual result NotifyOngoingActivity(const Tizen::Base::String& messageText) = 0;
+
+       /**
         * Notifies the user about the ongoing activity using a message. @n
         * @c launchArguments is specified as input parameter for Application::OnUserEventReceivedN() or can be obtained by
         * invoking Application::GetAppArgumentListN(), especially within Application::OnAppInitializing().