2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FMsgIPushManagerListener.h
19 * @brief This is the header file for the %IPushManagerListener interface.
21 * This header file contains the declarations of the %IPushManagerListener interface.
24 #ifndef _FMSG_IPUSH_MANAGER_LISTENER_H_
25 #define _FMSG_IPUSH_MANAGER_LISTENER_H_
27 #include <FBaseRtIEventListener.h>
29 namespace Tizen { namespace Messaging
32 * @interface IPushManagerListener
33 * @brief This listener interface receives the registration result.
37 * The %IPushManagerListener interface must be implemented to receive results of the push event registration. An application must register this interface using the PushManager::Construct() method.
39 class _OSP_EXPORT_ IPushManagerListener
40 : virtual public Tizen::Base::Runtime::IEventListener
44 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
48 virtual ~IPushManagerListener(void) {}
52 * Called when the result is received from PushManager::RegisterPushService().
56 * @param[in] reqId The request ID
57 * @param[in] registrationId The registration ID of the device @n
58 * The application must deliver this ID to the application server.
59 * @param[in] r The result of the request
60 * @param[in] errorCode The error code from the server
61 * @param[in] errorMsg The error message from the server
62 * @exception E_SUCCESS The method is successful.
63 * @exception E_SYSTEM An unknown operating system error has occurred.
64 * @exception E_CONNECTION_FAILED The network connection has failed.
65 * @exception E_SERVER An error has occurred on the server side.
66 * @exception E_SERVICE_UNAVAILABLE The service is unavailable. @n
67 * Check whether the push service registration is completed. For more information, see <a href="../org.tizen.native.appprogramming/html/guide/messaging/push_messaging.htm">Push Messaging Guide</a>.
68 * @see PushManager::RegisterPushService()
70 virtual void OnPushServiceRegistered(RequestId reqId, const Tizen::Base::String& registrationId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMsg) = 0;
73 * Called when the result is received from PushManager::UnregisterPushService().
77 * @param[in] reqId The request ID
78 * @param[in] r The result of the request
79 * @param[in] errorCode The error code from the server
80 * @param[in] errorMsg The error message from the server
81 * @exception E_SUCCESS The method is successful.
82 * @exception E_SYSTEM An unknown operating system error has occurred.
83 * @exception E_CONNECTION_FAILED The network connection has failed.
84 * @exception E_SERVER An error has occurred on the server side.
85 * @see PushManager::UnregisterPushService()
87 virtual void OnPushServiceUnregistered(RequestId reqId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMsg) = 0;
90 * Called when the result is received from PushManager::SendPushMessage().
94 * @param[in] reqId The request ID
95 * @param[in] registrationId The registration ID of the recipient
96 * @param[in] r The result of the request, @n
97 * Exception code may be given through this parameter.
98 * @param[in] errorCode The error code from the server
99 * @param[in] errorMsg The error message from the server
100 * @exception E_SUCCESS The method is successful.
101 * @exception E_INVALID_DATA An invalid data is received from the server.
102 * @exception E_CONNECTION_FAILED The network connection has failed.
103 * @exception E_REMOTE_DEVICE_NOT_FOUND The registration ID is invalid, so the recipient is not found.
104 * @exception E_AUTHENTICATION The appSecret is invalid, so application authentication has failed.
105 * @exception E_SERVER An error has occurred on the server side.
106 * @exception E_SERVICE_UNAVAILABLE The service is unavailable. @n
107 * Check whether the push service registration is completed. For more information, see <a href="../org.tizen.native.appprogramming/html/guide/messaging/push_messaging.htm">Push Messaging Guide</a>.
108 * @see PushManager::SendPushMessage()
110 virtual void OnPushMessageSent(RequestId reqId, const Tizen::Base::String& registrationId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMsg) {}
114 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
116 // This method is reserved and may change its name at any time without prior notice.
120 virtual void IPushManagerListener_Reserved2(void) {}
123 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
125 // This method is reserved and may change its name at any time without prior notice.
129 virtual void IPushManagerListener_Reserved3(void) {}
130 }; // IPushManagerListener
132 } } // Tizen::Messaging
133 #endif // _FMSG_IPUSH_MANAGER_LISTENER_H_