Merge "Modify Scanner class" into tizen_2.1
[platform/framework/native/appfw.git] / inc / FAppIAppControlResponseListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file                        FAppIAppControlResponseListener.h
20  * @brief                       This is the header file for the %IAppControlResponseListener interface.
21  *
22  * This header file contains the declarations of the %IAppControlResponseListener interface.
23  */
24
25 #ifndef _FAPP_IAPP_CONTROL_RESPONSE_LISTENER_H_
26 #define _FAPP_IAPP_CONTROL_RESPONSE_LISTENER_H_
27
28 #include <FBaseRtIEventListener.h>
29
30 namespace Tizen { namespace Base {
31 class String;
32 namespace Collection {
33 class IMap;
34 }
35 }}
36
37 namespace Tizen { namespace App
38 {
39
40 /**
41 * @interface    IAppControlResponseListener
42 * @brief                This interface defines a listener for the AppControl response events.
43 *
44 * @since        2.0
45 *
46 * The %IAppControlResponseListener interface defines a listener for the AppControl response events.
47 */
48 class _OSP_EXPORT_ IAppControlResponseListener
49         : virtual public Tizen::Base::Runtime::IEventListener
50 {
51 public:
52         /**
53          * This polymorphic destructor should be overridden if required.
54          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
55          *
56          * @since       2.0
57          */
58         virtual ~IAppControlResponseListener(void) {}
59
60         /**
61          * Called when the response for application control completion is received.
62          *
63          * @since       2.0
64          *
65          * @param[in]   appId                   The ID of the requested application
66          * @param[in]   operationId             The operation ID used in application control invocation
67          * @param[in]   appControlResult        The application control result
68          * @param[in]   pExtraData              A pointer to an result map of key and value pair where the key of type Tizen::Base::String and the value of 
69          *                                                      type %Tizen::Base::String or of type Tizen::Base::ArrayList of %Tizen::Base::String
70          * @remarks     The application control completion result is received when the requested application control
71          *                      sends the result using AppControlProviderManager::SendAppControlResult().
72          * @see         AppControl
73          * @see         AppControlProviderManager::SendAppControlResult()
74          */
75         virtual void OnAppControlCompleteResponseReceived(const AppId& appId, const Tizen::Base::String& operationId, AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData) = 0;
76
77         /**
78          * Called when the application control is about to start or to be canceled by the user resolution. @n
79          * The calling application can get the result of the resolution by implementing this empty body method.
80          *
81          * @since       2.0
82          *
83          * @param[in]   appId                   The ID of the requested application
84          * @param[in]   operationId             The operation ID used in application control invocation
85          * @param[in]   r                               The result of the application control start response @n
86          *                                                              The exception code may be given through this parameter.
87          * @exception   E_SUCCESS               The method is successful.
88          * @exception   E_OPERATION_CANCELED    The application control resolve request is canceled by a user operation.
89          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
90          * @exception   E_SYSTEM                A system error has occurred.
91          * @remarks             This method is invoked only for the implicit AppControl resolution.
92          * @see AppControl
93          * @see AppControl::FindAndStart()
94          */
95         virtual void OnAppControlStartResponseReceived(const AppId& appId, const Tizen::Base::String& operationId, result r) {}
96
97 protected:
98         //
99         // This method is for internal use only.
100         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
101         //
102         // This method is reserved and may change its name at any time without prior notice.
103         //
104         // @since       2.0
105         //
106         virtual void IAppControlResponseListener_Reserved1(void) {}
107
108         //
109         // This method is for internal use only.
110         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
111         //
112         // This method is reserved and may change its name at any time without prior notice.
113         //
114         // @since       2.0
115         //
116         virtual void IAppControlResponseListener_Reserved2(void) {}
117
118         //
119         // This method is for internal use only.
120         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
121         //
122         // This method is reserved and may change its name at any time without prior notice.
123         //
124         // @since       2.0
125         //
126         virtual void IAppControlResponseListener_Reserved3(void) {}
127
128         //
129         // This method is for internal use only.
130         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
131         //
132         // This method is reserved and may change its name at any time without prior notice.
133         //
134         // @since       2.0
135         //
136         virtual void IAppControlResponseListener_Reserved4(void) {}
137
138         //
139         // This method is for internal use only.
140         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
141         //
142         // This method is reserved and may change its name at any time without prior notice.
143         //
144         // @since       2.0
145         //
146         virtual void IAppControlResponseListener_Reserved5(void) {}
147 }; // IAppControlResponseListener
148
149 } } // Tizen::App
150
151 #endif // _FAPP_IAPP_CONTROL_RESPONSE_LISTENER_H_