2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FAppIAppLaunchConditionEventListener.h
19 * @brief This is the header file for the %IAppLaunchConditionEventListener interface.
21 * This header file contains the declarations of the %IAppLaunchConditionEventListener interface.
24 #ifndef _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_
25 #define _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_
27 #include <FOspConfig.h>
28 #include <FBaseRtIEventListener.h>
30 namespace Tizen { namespace Base { class String; } }
32 namespace Tizen { namespace App
36 * @interface IAppLaunchConditionEventListener
37 * @brief This interface defines a listener for the AppLaunchCondition events.
41 * The %IAppLaunchConditionEventListener interface defines a listener for the AppLaunchCondition events.
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>.
45 class _OSP_EXPORT_ IAppLaunchConditionEventListener
46 : virtual public Tizen::Base::Runtime::IEventListener
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.
55 virtual ~IAppLaunchConditionEventListener(void) {}
58 * Called when the registered launch condition is met.
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
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()
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.
75 * NdefMessage* pMessage = dynamic_cast<NdefMessage*>(pExtraData);
78 virtual void OnAppLaunchConditionMetN(const Tizen::Base::String& condition, Tizen::Base::Object* pExtraData, Tizen::Base::Collection::IList* pArguments) = 0;
82 // This method is for internal use only.
83 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
85 // This method is reserved and may change its name at any time without prior notice.
89 virtual void IAppLaunchConditionEventListener_Reserved1(void) {}
92 // This method is for internal use only.
93 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
95 // This method is reserved and may change its name at any time without prior notice.
99 virtual void IAppLaunchConditionEventListener_Reserved2(void) {}
102 // This method is for internal use only.
103 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
105 // This method is reserved and may change its name at any time without prior notice.
109 virtual void IAppLaunchConditionEventListener_Reserved3(void) {}
110 }; // IAppLaunchConditionEventListener
114 #endif // _FAPP_IAPP_LAUNCH_CONDITION_EVENT_LISTENER_H_