2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FAppIAppLaunchConditionEventListener.h
20 * @brief This is the header file for the %IAppLaunchConditionEventListener interface.
22 * This header file contains the declarations of the %IAppLaunchConditionEventListener interface.
25 #ifndef _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_
26 #define _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_
28 #include <FOspConfig.h>
29 #include <FBaseRtIEventListener.h>
31 namespace Tizen { namespace Base { class String; } }
33 namespace Tizen { namespace App
37 * @interface IAppLaunchConditionEventListener
38 * @brief This interface defines a listener for the AppLaunchCondition events.
42 * The %IAppLaunchConditionEventListener interface defines a listener for the AppLaunchCondition events.
44 * 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>.
46 class _OSP_EXPORT_ IAppLaunchConditionEventListener
47 : virtual public Tizen::Base::Runtime::IEventListener
51 * This polymorphic destructor should be overridden if required.
52 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
56 virtual ~IAppLaunchConditionEventListener(void) {}
59 * Called when the registered launch condition is met.
63 * @param[in] condition The registered condition for the application launch
64 * @param[in] pArguments A list of string arguments specified when the condition is registered
65 * @param[in] pExtraData A pointer to the instance of object that system delivered, @n
66 * else @c null if there is no extra data
68 * @remarks If extra data is required to be delivered, @c pExtraData contains the data,
69 * and this must be freed by the launched application after use.
70 * ( Currently, only NFC condition uses this to deliver to Tizen::Net::Nfc::NdefMessage. )
71 * @see Tizen::App::AppManager::RegisterAppLaunch()
72 * @see Tizen::App::AppManager::SetAppLaunchConditionEventListener()
74 * 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.
76 * NdefMessage* pMessage = dynamic_cast<NdefMessage*>(pExtraData);
79 virtual void OnAppLaunchConditionMetN(const Tizen::Base::String& condition, Tizen::Base::Object* pExtraData, Tizen::Base::Collection::IList* pArguments) = 0;
83 // This method is for internal use only.
84 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
86 // This method is reserved and may change its name at any time without prior notice.
90 virtual void IAppLaunchConditionEventListener_Reserved1(void) {}
93 // This method is for internal use only.
94 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
96 // This method is reserved and may change its name at any time without prior notice.
100 virtual void IAppLaunchConditionEventListener_Reserved2(void) {}
103 // This method is for internal use only.
104 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
106 // This method is reserved and may change its name at any time without prior notice.
110 virtual void IAppLaunchConditionEventListener_Reserved3(void) {}
111 }; // IAppLaunchConditionEventListener
115 #endif // _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_