2 // Copyright (c) 2012 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_AppControlEventArg.h
19 * @brief This is the header file of _AppControlEventArg class.
22 #ifndef _FAPP_INTERNAL_APP_CONTROL_EVENT_ARG_H_
23 #define _FAPP_INTERNAL_APP_CONTROL_EVENT_ARG_H_
25 #include <FBaseObject.h>
26 #include <FOspConfig.h>
27 #include <FAppTypes.h>
28 #include <FBaseRtIEventArg.h>
30 namespace Tizen { namespace Base { namespace Collection {
35 namespace Tizen { namespace App
39 class IAppControlResponseListener;
42 * @enum AppControlResposeType
44 enum _AppControlResponseType
46 _APPCONTROL_RESPONSETYPE_START,
47 _APPCONTROL_RESPONSETYPE_COMPLETE
51 * @class _AppControlEventArg
54 class _AppControlEventArg
55 : public Tizen::Base::Object
56 , public Tizen::Base::Runtime::IEventArg
59 _AppControlEventArg(int reqId, _AppArg* p, int res)
66 virtual ~_AppControlEventArg(void);
68 int GetRequestId(void) const
73 _AppArg* GetAppArg(void) const
78 int GetResult(void) const
84 _AppControlEventArg(const _AppControlEventArg& rhs);
86 _AppControlEventArg& operator =(const _AppControlEventArg& rhs);
92 }; // _AppControlEventArg
95 * @class _NativeAppControlEventArg
98 class _NativeAppControlEventArg
99 : public Tizen::Base::Object
100 , public Tizen::Base::Runtime::IEventArg
103 _NativeAppControlEventArg(int reqId, int res, Tizen::Base::Collection::IMap* pArgs, int prop);
105 _NativeAppControlEventArg(int reqId, int res, const AppId& appId, const Tizen::Base::String& oId, Tizen::Base::Collection::IMap* pArgs, int prop);
107 virtual ~_NativeAppControlEventArg(void) {}
109 int GetRequestId(void) const
114 int GetResult(void) const
119 const Tizen::Base::Collection::IMap* GetArgs(void) const
124 int GetProperty(void) const
129 AppId GetOptionalAppId(void) const
134 Tizen::Base::String GetOptionalOperationId(void) const
136 return __optOperationId;
142 Tizen::Base::Collection::IMap* __pArgs;
143 const int __property;
145 Tizen::Base::String __optOperationId;
146 }; // _NativeAppControlEventArg
149 * @class _AppControlStartEventArg
152 class _AppControlStartEventArg
153 : public Tizen::Base::Object
154 , public Tizen::Base::Runtime::IEventArg
157 _AppControlStartEventArg(int reqId, const AppId& appId, const Tizen::Base::String& operationId)
160 , __operationId(operationId)
164 virtual ~_AppControlStartEventArg(void)
168 int GetRequestId(void) const
173 AppId GetAppId(void) const
178 Tizen::Base::String GetOperationId(void) const
180 return __operationId;
184 _AppControlStartEventArg(const _AppControlStartEventArg& rhs);
186 _AppControlStartEventArg& operator =(const _AppControlStartEventArg& rhs);
191 Tizen::Base::String __operationId;
192 }; // _AppControlStartEventArg
195 * @class _AppControlResponseEventArg
198 class _AppControlResponseEventArg
199 : public Tizen::Base::Object
200 , public Tizen::Base::Runtime::IEventArg
203 _AppControlResponseEventArg(IAppControlResponseListener* pResponseListener, _AppControlResponseType type, const AppId& appId, const Tizen::Base::String& operationId, result res, AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData, int reqId, bool isSubMode)
204 : __pResponseListener(pResponseListener)
206 , __appId(appId.GetPointer())
207 , __operationId(operationId.GetPointer())
209 , __appControlResult(appControlResult)
210 , __pExtraData(pExtraData)
212 , __isSubMode(isSubMode)
216 virtual ~_AppControlResponseEventArg(void)
221 IAppControlResponseListener* GetListener(void) const
223 return __pResponseListener;
226 _AppControlResponseType GetType(void) const
231 const AppId& GetAppId(void) const
236 const Tizen::Base::String& GetOperationId(void) const
238 return __operationId;
241 result GetResult(void) const
246 AppCtrlResult GetAppControlResult(void) const
248 return __appControlResult;
251 const Tizen::Base::Collection::IMap* GetExtraData(void) const
256 int GetRequestId(void) const
261 bool IsSubMode(void) const
267 _AppControlResponseEventArg(const _AppControlResponseEventArg& rhs);
269 _AppControlResponseEventArg& operator =(const _AppControlResponseEventArg& rhs);
272 IAppControlResponseListener* __pResponseListener;
273 const _AppControlResponseType __type;
275 const Tizen::Base::String __operationId;
277 const AppCtrlResult __appControlResult;
278 const Tizen::Base::Collection::IMap* __pExtraData;
280 const bool __isSubMode;
281 }; // _AppControlEventArg
285 #endif // _FAPP_INTERNAL_APP_CONTROL_EVENT_ARG_H_