Move system-server under server/system.
[platform/framework/native/appfw.git] / inc / FAppIAppLaunchConditionEventListener.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  * @file                        FAppIAppLaunchConditionEventListener.h
19  * @brief                       This is the header file for the %IAppLaunchConditionEventListener interface.
20  *
21  * This header file contains the declarations of the %IAppLaunchConditionEventListener interface.
22  */
23
24 #ifndef _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_
25 #define _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_
26
27 #include <FOspConfig.h>
28 #include <FBaseRtIEventListener.h>
29
30 namespace Tizen { namespace Base { class String; } }
31
32 namespace Tizen { namespace App
33 {
34
35 /**
36 * @interface    IAppLaunchConditionEventListener
37 * @brief                This interface defines a listener for the AppLaunchCondition events.
38 *
39 * @since        2.0
40 *
41 * The %IAppLaunchConditionEventListener interface defines a listener for the AppLaunchCondition events.
42 * @n
43 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/app/launching_other_apps_within_apps.htm">Launching Other Applications</a> and <a href="../org.tizen.native.appprogramming/html/guide/app/registering_launch_condition.htm">Registering a Launch Condition</a>.
44 */
45 class _OSP_EXPORT_ IAppLaunchConditionEventListener
46         : virtual public Tizen::Base::Runtime::IEventListener
47 {
48 public:
49         /**
50          * This polymorphic destructor should be overridden if required.
51          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
52          *
53          * @since       2.0
54          */
55         virtual ~IAppLaunchConditionEventListener(void) {}
56
57         /**
58         * Called when the registered launch condition is met.
59         *
60         * @since        2.0
61         *
62         * @param[in] condition        The registered condition for the application launch
63         * @param[in] pArguments       A list of string arguments specified when the condition is registered
64         * @param[in] pExtraData       A pointer to the instance of object that system delivered, @n
65         *                             else @c null if there is no extra data
66         *
67         * @remarks     If extra data is required to be delivered, @c pExtraData contains the data,
68         *              and this must be freed by the launched application after use.
69         *               ( Currently, only NFC condition uses this to deliver to Tizen::Net::Nfc::NdefMessage. )
70         * @see         Tizen::App::AppManager::RegisterAppLaunch()
71         * @see         Tizen::App::AppManager::SetAppLaunchConditionEventListener()
72         *
73         *  The following example demonstrates how to use the %OnAppLaunchConditionMetN() method to get Tizen::Net::Nfc::NdefMessage instance, when an application is launched by NFC condition.
74         *  @code
75         *  NdefMessage* pMessage = dynamic_cast<NdefMessage*>(pExtraData);
76         *  @endcode
77         */
78         virtual void OnAppLaunchConditionMetN(const Tizen::Base::String& condition, Tizen::Base::Object* pExtraData, Tizen::Base::Collection::IList* pArguments) = 0;
79
80 protected:
81         //
82         // This method is for internal use only.
83         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
84         //
85         // This method is reserved and may change its name at any time without prior notice.
86         //
87         // @since       2.0
88         //
89         virtual void IAppLaunchConditionEventListener_Reserved1(void) {}
90
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 IAppLaunchConditionEventListener_Reserved2(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 IAppLaunchConditionEventListener_Reserved3(void) {}
110 }; // IAppLaunchConditionEventListener
111
112 } } // Tizen::App
113
114 #endif // _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_
115