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.
89 * @return An error code
90 * @param[in] messageText The notification message
91 * @exception E_SUCCESS The method is successful.
92 * @exception E_INVALID_ARG The specified input parameter is invalid, or
93 * the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
94 * @exception E_SYSTEM A system error has occurred.
95 * @exception E_INVALID_OPERATION The type of application calling this method is invalid as per the Tizen platform policy.
96 * @exception E_INVALID_STATE This instance is in an invalid state. @n
97 * The Construct() method is not called.
99 virtual result NotifyOngoingActivity(const Tizen::Base::String& messageText) = 0;
102 * Notifies the user about the ongoing activity using a message. @n
103 * @c launchArguments is specified as input parameter for Application::OnUserEventReceivedN() or can be obtained by
104 * invoking Application::GetAppArgumentListN(), especially within Application::OnAppInitializing().
106 * @return An error code
107 * @param[in] messageText The notification message
108 * @param[in] launchArguments The launch arguments for the application
109 * @exception E_SUCCESS The method is successful.
110 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
111 * - A specified input parameter is invalid. @n
112 * @exception E_SYSTEM A system error has occurred.
113 * @exception E_INVALID_OPERATION The type of application calling this method is invalid as per the Tizen platform policy.
114 * @exception E_INVALID_STATE This instance is in an invalid state. @n
115 * The Construct() method is not called.
117 virtual result NotifyOngoingActivity(const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) = 0;
120 * Removes the notification message for the ongoing activity.
122 * @return An error code
123 * @exception E_SUCCESS The method is successful.
124 * @exception E_SYSTEM A system error has occurred.
125 * @exception E_INVALID_STATE This instance is in an invalid state. @n
126 * The Construct() method is not called.
128 virtual result RemoveOngoingActivityNotification(void) = 0;
131 * Gets the badge number of the application icon.
133 * @return The current badge number
134 * @param[in] appId The application ID
135 * @exception E_SUCCESS The method is successful.
136 * @exception E_SYSTEM A system error has occurred.
137 * @exception E_OBJ_NOT_FOUND The application is not installed.
138 * @exception E_INVALID_STATE This instance is in an invalid state. @n
139 * The Construct() method is not called.
141 virtual int GetBadgeNumber(const Tizen::App::AppId& appId) const = 0;
144 * Notifies the user using a message and badge number on behalf of the specified application. @n
145 * If the user checks the message, the @c launchArguments is delivered to the application.
147 * @return An error code
148 * @param[in] appId The application ID
149 * @param[in] messageText The notification message
150 * @param[in] badgeNumber The badge number
151 * @param[in] launchArguments The launch arguments for the application
152 * @exception E_SUCCESS The method is successful.
153 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
154 * - A specified input parameter is invalid. @n
155 * - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
156 * - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
157 * @exception E_APP_NOT_INSTALLED The application is not installed.
158 * @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.
159 * @exception E_SYSTEM A system error has occurred.
160 * @exception E_INVALID_STATE This instance is in an invalid state. @n
161 * The Construct() method is not called.
163 virtual result NotifyByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, int badgeNumber, const Tizen::Base::String& launchArguments) = 0;
166 * Notifies the user about the ongoing activity using a message on behalf of the specified application.
168 * @return An error code
169 * @param[in] appId The application ID
170 * @param[in] messageText The notification message
171 * @param[in] launchArguments The launch arguments for application
172 * @exception E_SUCCESS The method is successful.
173 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
174 * - A specified input parameter is invalid. @n
175 * - The length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
176 * - The length of @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
177 * @exception E_APP_NOT_INSTALLED The application is not installed.
178 * @exception E_SYSTEM A system error has occurred.
179 * @exception E_INVALID_OPERATION The type of application calling this method is invalid as per the Tizen platform policy.
180 * @exception E_INVALID_STATE This instance is in an invalid state. @n
181 * The Construct() method is not called.
183 virtual result NotifyOngoingActivityByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) = 0;
186 * Removes the notification message for ongoing activity on behalf of the specified application.
188 * @return An error code
189 * @param[in] appId The application ID
190 * @exception E_SUCCESS The method is successful.
191 * @exception E_APP_NOT_INSTALLED The application is not installed.
192 * @exception E_SYSTEM A system error has occurred.
193 * @exception E_INVALID_STATE This instance is in an invalid state. @n
194 * The Construct() method is not called.
196 virtual result RemoveOngoingActivityNotificationByAppId(const Tizen::App::AppId& appId) = 0;
199 * Removes the notification message on behalf of the specified application.
201 * @return An error code
202 * @param[in] appId The application ID
203 * @exception E_SUCCESS The method was successful.
204 * @exception E_APP_NOT_INSTALLED The application is not installed.
205 * @exception E_SYSTEM A system error occurred.
206 * @exception E_INVALID_STATE This instance is in an invalid state: @n
207 * - The Construct() method is not called. @n
209 virtual result RemoveNotificationByAppId(const Tizen::App::AppId& appId) = 0;
215 #endif // _FAPP_INTERNAL_INOTIFICATION_MANAGER_IMPL_H_