sync with tizen_2.0
[platform/framework/native/appfw.git] / inc / FAppIAppControlEventListener.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                        FAppIAppControlEventListener.h
20  * @brief                       This is the header file for the %IAppControlEventListener interface.
21  *
22  * This header file contains the declarations of the %IAppControlEventListener interface.
23  */
24
25 #ifndef _FAPP_IAPP_CONTROL_EVENT_LISTENER_H_
26 #define _FAPP_IAPP_CONTROL_EVENT_LISTENER_H_
27
28 #include <FBaseRtIEventListener.h>
29
30 namespace Tizen { namespace Base { class String; } }
31 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
32
33 namespace Tizen { namespace App
34 {
35
36 /**
37 * @if OSPDEPREC
38 * @interface    IAppControlEventListener
39 * @brief                <i>[Deprecated]</i> This interface defines a listener for the AppControl result events.
40 *
41 * @deprecated   This class is deprecated. Instead of using this interface, use the IAppControlResponseListener interface.
42 * @since        2.0
43 *
44 * The %IAppControlEventListener interface defines a listener for the AppControl result events.
45 * @endif
46 */
47 class _OSP_EXPORT_ IAppControlEventListener
48         : virtual public Tizen::Base::Runtime::IEventListener
49 {
50 public:
51         /**
52          * @if OSPDEPREC
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          * @brief       <i> [Deprecated] </i>
57          *
58          * @deprecated  This class is deprecated. Instead of using this interface, use the IAppControlResponseListener interface.
59          * @since       2.0
60          * @endif
61          */
62         virtual ~IAppControlEventListener(void) {}
63
64         /**
65          * @if OSPDEPREC
66          * Called when the application control is completed. @n
67          * The client can get callback result for some application controls by implementing this listener. @n
68          * %OnAppControlCompleted() is called after AppControl::Start() with listener for some application controls.
69          *
70          * @brief       <i> [Deprecated] </i>
71          *
72          * @deprecated  This class is deprecated. Instead of using this interface, use the IAppControlResponseListener interface.
73          * @since       2.0
74          *
75          * @param[in]   providerId      The provider ID
76          * @param[in]   operationId             The operation ID used in application control invocation
77          * @param[in]   pResultList             The list of callback strings of application control
78          *
79          * @remarks     The specified @c pResultList provides the result code for the first array element.
80          * @remarks     When the invoked application control is terminated without sending a result,
81          *           then this method is invoked with @c pResultList and it contains App::APPCONTROL_RESULT_TERMINATED.
82          * @remarks     Switching forms using Tizen::Ui::Controls::Frame::SetCurrentForm() in this listener disables the upcoming form
83          *           (UiApp::OnForeground()). If %UiApp::OnForeground() is being used in the application logic,
84          *                      it is recommended to avoid switching forms in this listener.
85          * @see         Tizen::App::AppControl
86          * @endif
87          */
88         virtual void OnAppControlCompleted(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::Collection::IList* pResultList) = 0;
89
90 protected:
91         //
92         // This method is for internal use only.
93         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
94         //
95         // This method is reserved and may change its name at any time without prior notice.
96         //
97         // @since       2.0
98         //
99         virtual void IAppControlEventListener_Reserved1(void) {}
100
101         //
102         // This method is for internal use only.
103         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
104         //
105         // This method is reserved and may change its name at any time without prior notice.
106         //
107         // @since       2.0
108         //
109         virtual void IAppControlEventListener_Reserved2(void) {}
110
111         //
112         // This method is for internal use only.
113         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
114         //
115         // This method is reserved and may change its name at any time without prior notice.
116         //
117         // @since       2.0
118         //
119         virtual void IAppControlEventListener_Reserved3(void) {}
120 }; // IAppControlEventListener
121
122 } } // Tizen::App
123
124 #endif // _FAPP_IAPP_CONTROL_EVENT_LISTENER_H_