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