update header files for Doxygen
[framework/osp/shell.git] / inc / FShellIShortcutRequestListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2013 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                FShellIShortcutRequestListener.h
20  * @brief               This is the header file for the %IShortcutRequestListener interface.
21  *
22  * This header file contains the declarations of the %IShortcutRequestListener interface.
23  */
24
25 #ifndef _FSHELL_ISHORTCUT_REQUEST_LISTENER_H_
26 #define _FSHELL_ISHORTCUT_REQUEST_LISTENER_H_
27
28 #include <FBaseString.h>
29 #include <FAppTypes.h>
30 #include <FBaseRtIEventListener.h>
31
32 namespace Tizen { namespace Shell
33 {
34
35 /**
36  * @interface   IShortcutRequestListener
37  * @brief               This interface defines a listener for the Home application that receives request to add a shortcut.
38  *
39  * @since       2.1
40  *
41  * The %IShortcutRequestListener interface defines a listener for the Home application that receives request to add a shortcut.
42
43  * The following example demonstrates how to start the application when the added shortcut is selected by the user.
44  * @code
45 #include <FShell.h>
46 #include <FApp.h>
47
48 using namespace Tizen::Shell;
49 using namespace Tizen::App;
50
51                 if( uriData.IsEmpty() )
52                 {
53                         AppManager::GetInstance()->LaunchApplication(appId, null);
54                 }
55                 else
56                 {
57                         AppControlpAc = AppManager::FindAppControlN(App::GetInstance()->GetAppId(), L"http://tizen.org/appcontrol/operation/view");
58                         if( pAc )
59                         {
60                                 pAc->Start(*uriData, null, null, null);
61                                 delete pAc;
62                         }
63                 }
64 @endcode
65  */
66 class _OSP_EXPORT_ IShortcutRequestListener
67  : virtual public Tizen::Base::Runtime::IEventListener
68 {
69 public:
70         /**
71          * This polymorphic destructor should be overridden if required.
72          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
73          *
74          * @since       2.1
75          */
76         virtual ~IShortcutRequestListener(void) {}
77
78         /**
79          * Called when requested to add a shortcut.
80          *
81          * @since       2.1
82          *
83          * @param[in]   appId           The application ID
84          * @param[in]   displayName     The display name of shortcut
85          * @param[in]   iconFilePath    The icon file path
86          * @param[in]   uriData                 Uri that will be delivered by IAppControlProviderEventListener::OnAppControlRequestReceived(), when the application is started using a shortcut.
87          *
88          * @remarks             If @c uriData is specified, application should be started by AppControl with %http://tizen.org/appcontrol/operation/view operation, when it is launched from the Home application using a shortcut.
89          *                              Or else application should be started by AppControl with default operation (%http://tizen.org/appcontrol/operation/main).
90          *                              For more information on the AppControl class, see <a href="../org.tizen.native.appprogramming/html/guide/app/app_controls.htm">Application Controls</a>, and <a href="../org.tizen.native.appprogramming/html/guide/app/delivering_launch_arguments.htm">Delivering Launch Arguments</a>.
91          * @see         ShortcutManager::AddShortcut()
92          */
93         virtual void OnShortcutAddRequested(const Tizen::App::AppId& appId, const Tizen::Base::String& displayName, const Tizen::Base::String& iconFilePath, const Tizen::Base::String& uriData) = 0;
94
95         /**
96          * Called when requested to remove a shortcut.
97          *
98          * @since       2.1
99          *
100          * @param[in]   appId           The application ID
101          * @param[in]   displayName     The display name of shortcut
102          * @remarks       If there are more than one shortcuts with duplicated @c appId and @c displayName, all of them should be removed.
103          * @see         ShortcutManager::RemoveShortcut()
104          */
105         virtual void OnShortcutRemoveRequested(const Tizen::App::AppId& appId, const Tizen::Base::String& displayName) = 0;
106
107 protected:
108         //
109         // This method is for internal use only. Using this method can cause behavioral,
110         // security-related, and consistency-related issues in the application.
111         //
112         // @since       2.1
113         //
114         virtual void IShortcutReqeustListener_Reserved1(void) {}
115
116         //
117         // This method is for internal use only. Using this method can cause behavioral,
118         // security-related, and consistency-related issues in the application.
119         //
120         // @since       2.1
121         //
122         virtual void IShortcutReqeustListener_Reserved2(void) {}
123
124         //
125         // This method is for internal use only. Using this method can cause behavioral,
126         // security-related, and consistency-related issues in the application.
127         //
128         // @since       2.1
129         //
130         virtual void IShortcutReqeustListener_Reserved3(void) {}
131 };
132
133 }} // Tizen::Shell
134
135 #endif /* _FSHELL_ISHORTCUT_REQUEST_LISTENER_H_ */