2be35c9609e419a07a4fd25dd0bfc3ccc85964ad
[platform/framework/native/shell.git] / inc / FShellHomeManager.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     FShellHomeManager.h
20  * @brief    This is the header file for the %HomeManager class.
21  *
22  * This header file contains the declarations of the %HomeManager class.
23  */
24
25 #ifndef _FSHELL_HOME_MANAGER_H_
26 #define _FSHELL_HOME_MANAGER_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FAppTypes.h>
31
32 namespace Tizen { namespace Shell
33 {
34
35 /*
36  * @class               HomeManager
37  * @brief               Manages information of home screen.
38  *
39  * @since       2.1
40  *
41  * @final               This class is not intended for extension.
42  *
43  * The %HomeManager class manages information of home screen.
44  */
45 class _OSP_EXPORT_ HomeManager
46         : public Tizen::Base::Object
47 {
48 public:
49
50         /*
51          * Gets the %HomeManager instance.
52          *
53          * @since       2.1
54          *
55          * @return      A pointer to the %HomeManager instance, @n
56          *                      else @c null if it fails
57          */
58         static HomeManager* GetInstance(void);
59
60         /*
61          * Request the Home screen to add the spefied shortcut.
62          *
63          * @privilege   http::tizen.org/privilege/homemanager
64          *
65          * @since       2.1
66          *
67          * @return      An error code
68          * @param[in]   appId   The application ID
69          * @param[in]   displayName     The display name of shortcut
70          * @param[in]   iconFilePath    The icon file path
71          * @param]in]   uriData                         Uri that will be delivered by IAppControlProviderEventListener::OnAppControlRequestReceived(), when the application start via shortcut.
72          *
73          * @exception   E_SUCCESS                       The method is successful.
74          * @exception   E_APP_NOT_INSTALLED     The application is not installed.
75          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
76          * @exception   E_SYSTEM                        The method cannot proceed due to a severe system error.
77          *
78          * @remark              If uriData is specified, application will be started by AppControl with http://tizen.org/appcontrol/operation/view operation, when it's launched from the Home screen via shortcut.
79          *                              Or else application will be started by AppControl with default operation(http://tizen.org/appcontrol/operation/main).
80          * @see                 IAppControlEventListener::OnAppControlRequestReceived()
81          */
82         result AddShortcut(const Tizen::App::AppId& appId, const Tizen::Base::String& displayName, const Tizen::Base::String& iconFilePath, const Tizen::Base::String& uriData);
83
84 private:
85         //
86         // This default constructor is intentionally declared as private to implement the %Singleton semantic.
87         //
88         // @since       2.1
89         //
90         HomeManager();
91
92         //
93         // This destructor is intentionally declared as private to implement the %Singleton semantic.
94         //
95         // @since       2.1
96         //
97         virtual ~HomeManager();
98
99         //
100         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
101         //
102         // @since       2.1
103         //
104         HomeManager& operator =(const HomeManager& rhs);
105
106         //
107         // Constructs the instance of this class.
108         //
109         // @since       2.1
110         //
111         // @return          An error code
112         // @exception   E_SUCCESS       The method is successful.
113         // @exception   E_SYSTEM        The method cannot proceed due to a severe system error.
114         //
115         result Construct();
116
117 private:
118         class _HomeManagerImpl* __pHomeManagerImpl;
119 };
120
121 }} // Tizen::Shell
122 #endif /* _FSHELL_HOME_MANAGER_H_ */