FApp header review
[platform/framework/native/appfw.git] / inc / FAppIAppControlListener.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                        FAppIAppControlListener.h
20  * @brief                       This is the header file for the %IAppControlListener interface.
21  *
22  * This header file contains the declarations of the %IAppControlListener interface.
23  */
24
25 #ifndef _FAPP_IAPP_CONTROL_LISTENER_H_
26 #define _FAPP_IAPP_CONTROL_LISTENER_H_
27
28 #include <FAppIAppControlEventListener.h>
29
30 namespace Tizen { namespace App { class AppControl; } }
31 namespace Tizen { namespace Base { class String; } }
32 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
33
34 namespace Tizen { namespace App
35 {
36
37 /**
38  * @if OSPDEPREC
39  * @interface   IAppControlListener
40  * @brief               <i>[Deprecated]</i> This interface defines a listener for the AppControl start and result events.
41  *
42  * @deprecated  This interface is deprecated. Instead of using this interface, use the IAppControlResponseListener interface.
43  * @since               2.0
44  *
45  * The %IAppControlListener interface defines a listener for the AppControl start and result events.
46  * @endif
47  */
48 class _OSP_EXPORT_ IAppControlListener
49         : public IAppControlEventListener
50         , virtual public Tizen::Base::Runtime::IEventListener
51 {
52 public:
53         /**
54      * @if OSPDEPREC
55          * This polymorphic destructor should be overridden if required.
56          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
57          *
58          * @brief               <i>[Deprecated]</i>
59          *
60          * @deprecated  This interface is deprecated. Instead of using this interface, use the IAppControlResponseListener interface.
61          * @since       2.0
62          * @endif
63          */
64         virtual ~IAppControlListener(void) {}
65
66         /**
67          * @if OSPDEPREC
68          * Called when the application control is about to start. @n
69          * The client can get the callback result for some application controls by implementing this listener.
70          *
71          * @brief               <i>[Deprecated]</i>
72          *
73          * @deprecated  This interface is deprecated. Instead of using this interface, use the IAppControlResponseListener interface.
74          * @since                       2.0
75          *
76          * @param[in]   pAppControl                     A pointer to the AppControl instance that is started
77          * @param[in]   r                                       The error code
78          * @exception   E_SUCCESS                       The method is successful.
79          * @exception   E_SYSTEM                        A system error has occurred.
80          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
81          * @exception   E_IN_PROGRESS           The target AppControl is in progress.
82          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
83          * @see         AppControl::Start()
84          * @see         AppManager::StartAppControl()
85          * @endif
86          */
87         virtual void OnAppControlStarted(const AppControl* pAppControl, result r) = 0;
88
89 protected:
90         //
91         // This method is for internal use only.
92         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
93         //
94         // @since       2.0
95         //
96         virtual void IAppControlListener_Reserved1() {}
97
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         // @since       2.0
103         //
104         virtual void IAppControlListener_Reserved2() {}
105 }; // IAppControlListener
106
107 } } // Tizen::App
108
109 #endif // _FAPP_IAPP_CONTROL_LISTENER_H_