Sync with tizen_2.2.1
[platform/framework/native/appfw.git] / inc / FAppIAppControlProviderEventListener.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16 /**
17  * @file    FAppIAppControlProviderEventListener.h
18  * @brief   This is the header file for the %IAppControlProviderEventListener interface.
19  *
20  * This header file contains the declarations of the %IAppControlProviderEventListener interface.
21  */
22
23 #ifndef _FAPP_IAPPCONTROL_PROVIDER_EVENT_LISTENER_H_
24 #define _FAPP_IAPPCONTROL_PROVIDER_EVENT_LISTENER_H_
25
26 #include <FBaseObject.h>
27 #include <FBaseRtIEventListener.h>
28 #include <FAppTypes.h>
29
30
31 namespace Tizen { namespace Base { namespace Collection {
32 class IList;
33 class IMap;
34 }}}
35
36 namespace Tizen { namespace App
37 {
38
39 /**
40 *   @interface  IAppControlProviderEventListener
41 *   @brief      This interface defines the provider listener for the %AppControl request.
42 *
43 *   @since      2.0
44 *
45 * The %IAppControlProviderEventListener interface defines a listener for the AppControl request events.
46 * Applications that provide the %AppControl functionality must implement this interface.
47 *
48 * @see AppControlProviderManager
49 */
50 class _OSP_EXPORT_ IAppControlProviderEventListener
51         : virtual public Tizen::Base::Runtime::IEventListener
52 {
53 public:
54         /**
55          * This polymorphic destructor should be overridden if required. @n
56          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
57          *
58          * @since       2.0
59          */
60         virtual ~IAppControlProviderEventListener(void) {}
61
62         /**
63          * Called when the application control request is received from the caller application. @n
64          * The application control provider must implement this listener for exporting its own functionality.
65          *
66          * @since       2.0
67          *
68          * @param[in]   reqId           The application control request ID
69          * @param[in]   operationId     The application control operation ID
70          * @param[in]   pUriData        A pointer to the URI data
71          * @param[in]   pMimeType       A pointer to the MIME type (RFC 2046) data
72          * @param[in]   pExtraData      A pointer to the argument map of the key and value pair, where the key is of type Tizen::Base::String and the value is of type %Tizen::Base::String or of type Tizen::Base::Collection::ArrayList of %Tizen::Base::String
73          * @remarks
74          *                              - To reply to the application control request, use the AppControlProviderManager::SendAppControlResult() method with the given request ID. @n
75          *                              When the application receives the AppControl request in the background,
76          *                              the %OnAppControlRequestReceived() method is invoked before the UiApp::OnForeground() method.
77          *                              - When the application control is resolved with the file extension returned by the AppControl::FindAndStart() method,
78          *                              the delivered file extension is converted to the corresponding MIME type in the @c pMimeType parameter.
79          */
80         virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData) = 0;
81
82 protected:
83         //
84         // This method is for internal use only. Using this method can cause behavioral,
85         // security-related, and consistency-related issues in the application.
86         //
87         // @since       2.0
88         //
89         virtual void IAppControlProviderEventListener_Reserved1(void) {}
90
91         //
92         // This method is for internal use only. Using this method can cause behavioral,
93         // security-related, and consistency-related issues in the application.
94         //
95         // @since       2.0
96         //
97         virtual void IAppControlProviderEventListener_Reserved2(void) {}
98
99         //
100         // This method is for internal use only. Using this method can cause behavioral,
101         // security-related, and consistency-related issues in the application.
102         //
103         // @since       2.0
104         //
105         virtual void IAppControlProviderEventListener_Reserved3(void) {}
106
107 }; // IAppControlProviderEventListener
108
109 }} // Tizen::App
110
111 #endif // _FAPP_IAPPCONTROL_PROVIDER_EVENT_LISTENER_H_