Update doxygen for privilege
[platform/framework/native/appfw.git] / inc / FAppAppControlProviderManager.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         FAppAppControlProviderManager.h
20  * @brief       This is the header file for the %AppControlProviderManager class.
21  *
22  * This header file contains the declarations of the %AppControlProviderManager class.
23  */
24
25 #ifndef _FAPP_APPCONTROL_PROVIDER_MANAGER_H_
26 #define _FAPP_APPCONTROL_PROVIDER_MANAGER_H_
27
28 #include <FBaseDataType.h>
29 #include <FBaseObject.h>
30 #include <FBaseString.h>
31 #include <FAppTypes.h>
32
33
34 namespace Tizen { namespace Base { namespace Collection {
35 class IList;
36 class IMap;
37 }}}
38
39 namespace Tizen { namespace App
40 {
41
42 class IAppControlProviderEventListener;
43
44 /**
45  * @class       AppControlProviderManager
46  * @brief       This class manages the AppControl provider.
47  *
48  * @since       2.0
49  *
50  * @final       This class is not intended for extension.
51  *
52  * The %AppControlProviderManager class manages the AppControl provider. @n
53  * The %AppControl provider registers or unregisters the IAppControlProviderEventListener listener
54  * for providing the %AppControl functionality, looks up for the delivered %AppControl request information,
55  * and sends the %AppControl result back to the calling application. @n
56  *
57  * The request ID is used to identify each %AppControl request and can be acquired using
58  * IAppControlProviderEventListener::OnAppControlRequestReceived().
59  *
60  */
61 class _OSP_EXPORT_ AppControlProviderManager
62         : public Tizen::Base::Object
63 {
64 public:
65         /**
66          * Gets the application control provider manager instance.
67          *
68          * @since       2.0
69          *
70          * @return      A pointer to the %AppControlProviderManager instance if it succeeds, @n
71          *                      else @c null
72          */
73         static AppControlProviderManager* GetInstance(void);
74
75         /**
76          * Sets the application control provider listener to the application control provider manager. @n
77          * The listener gets notified when the application control request is received from other applications.
78          * To unset the listener, pass a @c null value to the listener parameter. @n
79          *
80          * If the application does not set the listener using %SetAppControlProviderEventListener(),
81          * then the application is launched or moves to the foreground without invoking any listener
82          * for the application request from another application.
83          *
84          * @since       2.0
85          *
86          * @return      An error code
87          * @param[in]   pListener       The application control provider listener
88          * @exception   E_SUCCESS       The method is successful.
89          * @exception   E_INVALID_STATE This instance has not been properly constructed.
90          * @exception   E_INVALID_OPERATION     The listener must be set for the valid %App class.
91          * @exception   E_SYSTEM        A system error has occurred.
92          * @remarks     If the application is newly launched with the AppControl request, then %SetAppControlProviderEventListener() must
93          *                      be set before invoking IAppControlProviderEventListener::OnAppControlRequestReceived().
94          *                      For valid %AppControl request handling, %SetAppControlProviderEventListener() must be called within
95          *                      App::OnAppInitializing().
96          */
97         result SetAppControlProviderEventListener(IAppControlProviderEventListener* pListener);
98
99         /**
100          * Gets the application ID for the application control request.
101          *
102          * @since       2.0
103          *
104          * @return      The application ID @n
105          *                      If an error occurs, an empty string is returned.
106          * @param[in]   reqId   The requestID
107          * @exception   E_SUCCESS       The method is successful.
108          * @exception   E_OBJ_NOT_FOUND The application control request is not found.
109          * @exception   E_INVALID_STATE This instance has not been properly constructed.
110          * @exception   E_SYSTEM        A system error has occurred.
111          * @remarks     The specific error code can be accessed using the GetLastResult() method.
112          */
113         AppId GetClientAppId(RequestId reqId) const;
114
115         /**
116          * Sends the result list for the application control request. @n
117          * The client receives the result by implementing IAppControlResponseListener::OnAppControlCompleteResponseReceived().
118          *
119          * @since       2.0
120          *
121          * @return      An error code
122          * @param[in]   reqId   The application control request ID
123          * @param[in]   appControlResult        The application control result
124          * @param[in]   pExtraData      A pointer to an extra argument map of key and value pair where the key is of type String and the value is of type String or type ArrayList of String
125          * @exception   E_SUCCESS       The method is successful.
126          * @exception   E_OBJ_NOT_FOUND The application control request is not found.
127          * @exception   E_SYSTEM        The method cannot proceed due to a severe system error.
128          */
129         result SendAppControlResult(RequestId reqId, AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
130
131 private:
132         /**
133          * This default constructor is intentionally declared as private to implement the %Singleton semantic.
134          *
135          * @since       2.0
136          */
137         AppControlProviderManager(void);
138
139         /**
140          * This destructor is intentionally declared as private to implement the %Singleton semantic.
141          *
142          * @since       2.0
143          */
144         virtual ~AppControlProviderManager(void);
145
146         /**
147          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
148          *
149          * @since       2.0
150          */
151         AppControlProviderManager(const AppControlProviderManager& rhs);
152
153         /**
154          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
155          *
156          * @since       2.0
157          */
158         AppControlProviderManager& operator=(const AppControlProviderManager& rhs);
159
160
161 private:
162         class _AppControlProviderManagerImpl*   __pAppControlProviderManagerImpl;
163
164         friend class _AppControlProviderManagerImpl;
165 };
166
167 };
168 };      // Tizen::App
169
170 #endif //_FAPP_APPCONTROL_PROVIDER_MANAGER_H_
171