2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FApp_INotificationManagerImpl.h
19 * @brief This is the header file for the _INotificationManagerImpl class.
21 * This file contains the declarations of _INotificationManagerImpl.
24 #ifndef _FAPP_INTERNAL_INOTIFICATION_MANAGER_IMPL_H_
25 #define _FAPP_INTERNAL_INOTIFICATION_MANAGER_IMPL_H_
27 #include <FBaseObject.h>
28 #include <FBaseString.h>
29 #include <FAppTypes.h>
32 namespace Tizen { namespace App
35 class _INotificationManagerImpl
38 virtual ~_INotificationManagerImpl(void) {}
41 * Gets the badge number of the application icon.
43 * @return The current badge number
44 * @exception E_SUCCESS The method is successful.
45 * @exception E_SYSTEM A system error has occurred.
46 * @exception E_OBJ_NOT_FOUND The application is not installed.
47 * @exception E_INVALID_STATE This instance is in an invalid state. @n
48 * The Construct() method is not called.
50 virtual int GetBadgeNumber(void) const = 0;
53 * Notifies the user using a message and badge number. @n
54 * If the user checks the message, @c launchArguments is delivered to the application. @n
55 * @c launchArguments is specified as input parameter for Application::OnUserEventReceivedN() or can be obtained by
56 * invoking Application::GetAppArgumentListN(), especially within Application::OnAppInitializing().
58 * @return An error code
59 * @param[in] messageText The notification message
60 * @param[in] badgeNumber The badge number
61 * @param[in] launchArguments The message for application
62 * @exception E_SUCCESS The method is successful.
63 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
64 * - A specified input parameter is invalid. @n
65 * - The specified @c badgeNumber is less than @c 0. @n
66 * - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
67 * - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUUNCH_ARGUMENTS_LENGTH.
68 * @exception E_SYSTEM A system error has occurred.
69 * @exception E_INVALID_OPERATION The type of application calling this method is invalid as per the Tizen platform policy.
70 * @exception E_INVALID_STATE This instance is in an invalid state. @n
71 * The Construct() method is not called.
73 virtual result Notify(const Tizen::Base::String& messageText, int badgeNumber, const Tizen::Base::String& launchArguments) = 0;
76 * Removes the notification message.
78 * @return An error code
79 * @exception E_SUCCESS The method was successful.
80 * @exception E_SYSTEM A system error occurred.
81 * @exception E_INVALID_STATE This instance is in an invalid state: @n
82 * - The Construct() method is not called. @n
84 virtual result RemoveNotification(void) = 0;
87 * Notifies the user about the ongoing activity using a message. @n
88 * @c launchArguments is specified as input parameter for Application::OnUserEventReceivedN() or can be obtained by
89 * invoking Application::GetAppArgumentListN(), especially within Application::OnAppInitializing().
91 * @return An error code
92 * @param[in] messageText The notification message
93 * @param[in] launchArguments The launch arguments for the application
94 * @exception E_SUCCESS The method is successful.
95 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
96 * - A specified input parameter is invalid. @n
97 * @exception E_SYSTEM A system error has occurred.
98 * @exception E_INVALID_OPERATION The type of application calling this method is invalid as per the Tizen platform policy.
99 * @exception E_INVALID_STATE This instance is in an invalid state. @n
100 * The Construct() method is not called.
102 virtual result NotifyOngoingActivity(const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) = 0;
105 * Removes the notification message for the ongoing activity.
107 * @return An error code
108 * @exception E_SUCCESS The method is successful.
109 * @exception E_SYSTEM A system error has occurred.
110 * @exception E_INVALID_STATE This instance is in an invalid state. @n
111 * The Construct() method is not called.
113 virtual result RemoveOngoingActivityNotification(void) = 0;
116 * Gets the badge number of the application icon.
118 * @return The current badge number
119 * @param[in] appId The application ID
120 * @exception E_SUCCESS The method is successful.
121 * @exception E_SYSTEM A system error has occurred.
122 * @exception E_OBJ_NOT_FOUND The application is not installed.
123 * @exception E_INVALID_STATE This instance is in an invalid state. @n
124 * The Construct() method is not called.
126 virtual int GetBadgeNumber(const Tizen::App::AppId& appId) const = 0;
129 * Notifies the user using a message and badge number on behalf of the specified application. @n
130 * If the user checks the message, the @c launchArguments is delivered to the application.
132 * @return An error code
133 * @param[in] appId The application ID
134 * @param[in] messageText The notification message
135 * @param[in] badgeNumber The badge number
136 * @param[in] launchArguments The launch arguments for the application
137 * @exception E_SUCCESS The method is successful.
138 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
139 * - A specified input parameter is invalid. @n
140 * - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
141 * - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
142 * @exception E_APP_NOT_INSTALLED The application is not installed.
143 * @exception E_INVALID_OPERATION The target application with the specified application ID is not permitted to receive any notification as per the Tizen platform policy.
144 * @exception E_SYSTEM A system error has occurred.
145 * @exception E_INVALID_STATE This instance is in an invalid state. @n
146 * The Construct() method is not called.
148 virtual result NotifyByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, int badgeNumber, const Tizen::Base::String& launchArguments) = 0;
151 * Notifies the user about the ongoing activity using a message on behalf of the specified application.
153 * @return An error code
154 * @param[in] appId The application ID
155 * @param[in] messageText The notification message
156 * @param[in] launchArguments The launch arguments for application
157 * @exception E_SUCCESS The method is successful.
158 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
159 * - A specified input parameter is invalid. @n
160 * - The length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
161 * - The length of @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
162 * @exception E_APP_NOT_INSTALLED The application is not installed.
163 * @exception E_SYSTEM A system error has occurred.
164 * @exception E_INVALID_OPERATION The type of application calling this method is invalid as per the Tizen platform policy.
165 * @exception E_INVALID_STATE This instance is in an invalid state. @n
166 * The Construct() method is not called.
168 virtual result NotifyOngoingActivityByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) = 0;
171 * Removes the notification message for ongoing activity on behalf of the specified application.
173 * @return An error code
174 * @param[in] appId The application ID
175 * @exception E_SUCCESS The method is successful.
176 * @exception E_APP_NOT_INSTALLED The application is not installed.
177 * @exception E_SYSTEM A system error has occurred.
178 * @exception E_INVALID_STATE This instance is in an invalid state. @n
179 * The Construct() method is not called.
181 virtual result RemoveOngoingActivityNotificationByAppId(const Tizen::App::AppId& appId) = 0;
184 * Removes the notification message on behalf of the specified application.
186 * @return An error code
187 * @param[in] appId The application ID
188 * @exception E_SUCCESS The method was successful.
189 * @exception E_APP_NOT_INSTALLED The application is not installed.
190 * @exception E_SYSTEM A system error occurred.
191 * @exception E_INVALID_STATE This instance is in an invalid state: @n
192 * - The Construct() method is not called. @n
194 virtual result RemoveNotificationByAppId(const Tizen::App::AppId& appId) = 0;
200 #endif // _FAPP_INTERNAL_INOTIFICATION_MANAGER_IMPL_H_