remove Doxygen warning
[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 for the Home application that receives request to add a shortcut.
42
43  * The following example demonstrates how to starts the application when added shortcut is selected by 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 the shortcut.
80          *
81          * @param[in]           appId           The application ID
82          * @param[in]           displayName     The display name of shortcut
83          * @param[in]           iconFilePath    The icon file path
84          * @param[in]           uriData         Uri that will be delivered by IAppControlProviderEventListener::OnAppControlRequestReceived(), when the application is started via shortcut.
85          * @see         ShortcutManager::AddShortcut()
86          *
87          * @remarks             If uriData is specified, application should be started by AppControl with http://tizen.org/appcontrol/operation/view operation, when it's launched from the Home application via shortcut.
88          *                              Or else application should be started by AppControl with default opertaion (http://tizen.org/appcontrol/operation/main).
89          *                              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>.
90          */
91         virtual void OnShortcutAddRequested(const Tizen::App::AppId& appId, const Tizen::Base::String& displayName, const Tizen::Base::String& iconFilePath, const Tizen::Base::String& uriData) = 0;
92
93         /**
94          * Called when requested to remove the shortcut.
95          *
96          * @param[in]   appId           The application ID
97          * @param[in]   displayName     The display name of shortcut
98          *
99          * @remarks       If there are one more shortcuts with duplicated appId and displayName, all of them should be removed.
100          *
101          * @see         ShortcutManager::RemoveShortcut()
102          */
103         virtual void OnShortcutRemoveRequested(const Tizen::App::AppId& appId, const Tizen::Base::String& displayName) = 0;
104
105 protected:
106         //
107         // This method is for internal use only. Using this method can cause behavioral,
108         // security-related, and consistency-related issues in the application.
109         //
110         // @since       2.1
111         //
112         virtual void IShortcutReqeustListener_Reserved1(void) {}
113
114         //
115         // This method is for internal use only. Using this method can cause behavioral,
116         // security-related, and consistency-related issues in the application.
117         //
118         // @since       2.1
119         //
120         virtual void IShortcutReqeustListener_Reserved2(void) {}
121
122         //
123         // This method is for internal use only. Using this method can cause behavioral,
124         // security-related, and consistency-related issues in the application.
125         //
126         // @since       2.1
127         //
128         virtual void IShortcutReqeustListener_Reserved3(void) {}
129 };
130
131 }} // Tizen::Shell
132
133 #endif /* _FSHELL_ISHORTCUT_REQUEST_LISTENER_H_ */