update header files for Doxygen
[framework/osp/shell.git] / inc / FShellAppWidgetProviderInfo.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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        FShellAppWidgetProviderInfo.h
20  * @brief       This is the header file for the %AppWidgetProviderInfo class.
21  *
22  * This header file contains the declarations of the %AppWidgetProviderInfo class.
23  */
24
25 #ifndef _FSHELL_APPWIDGET_PROVIDER_INFO_H_
26 #define _FSHELL_APPWIDGET_PROVIDER_INFO_H_
27
28 #include <FBaseString.h>
29 #include <FAppTypes.h>
30
31 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
32
33 namespace Tizen { namespace Shell
34 {
35
36 /**
37  * @class               AppWidgetProviderInfo
38  * @brief               This class contains static AppWidget information.
39  *
40  * @since       2.1
41  *
42  * The %AppWidgetProviderInfo class contains static AppWidget information.
43  */
44 class _OSP_EXPORT_ AppWidgetProviderInfo
45         : public Tizen::Base::Object
46 {
47 public:
48         /**
49          * Copying of objects using this copy constructor is allowed.
50          *
51          * @since       2.1
52          *
53          * @param[in]   rhs     An instance of %AppWidgetProviderInfo
54          */
55         AppWidgetProviderInfo(const AppWidgetProviderInfo& rhs);
56
57         /**
58          * This destructor overrides Tizen::Base::Object::~Object().
59          *
60          * @since       2.1
61          */
62         virtual ~AppWidgetProviderInfo(void);
63
64         /**
65          * Gets the application ID.
66          *
67          * @since       2.1
68          *
69          * @return      The application ID
70          */
71         Tizen::App::AppId GetAppId(void) const;
72
73         /**
74          * Gets the AppWidget provider name.
75          *
76          * @since       2.1
77          *
78          * @return      The provider name
79          */
80         Tizen::Base::String GetName(void) const;
81
82         /**
83          * Gets the display name of an AppWidget. @n
84          * If the system language setting is changed, the %GetDisplayName() method returns the localized application name.
85          * The display name is displayed in applications showing AppWidget such as Launcher, and so on.
86          *
87          * @since       2.1
88          *
89          * @return      The display name of an AppWidget
90          */
91         Tizen::Base::String GetDisplayName(void) const;
92
93         /**
94          * Gets the icon path of an application.
95          *
96          * @since       2.1
97          *
98          * @return      The icon path of an application @n
99          * An empty string is returned if there is no value.
100          */
101         Tizen::Base::String GetIconPath(void) const;
102
103         /**
104          * Gets the ID of the application that exports AppContorl to configure the AppWidget.
105          *
106          * @since       2.1
107          *
108          * @return      The ID of the application that exports AppContorl to configure the AppWidget @n
109          * An empty string is returned if there is no value.
110          *
111          * The following example demonstrates how to start the application control that is exported for AppWidget configuration.
112          *
113          * @code
114          * #include <FShell.h>
115          *
116          * using namespace Tizen::Shell;
117          *
118          * AppWidgetProviderInfo* pProviderInfo = AppWidgetManager::GetInstance()->GetAppWidgetProviderInfoN(appId, providerName);
119          * if( !pProviderInfo->GetConfigurationAppControlAppId().IsEmpty )
120          * {
121          *              AppControl* pAc = AppManager::FindAppControlN(pProviderInfo->GetConfigurationAppControlAppId(), L"http://tizen.org/appcontrol/operation/appwidget/configuration");
122          *
123          *              HashMap map();
124          *              map.Construct();
125          *              String key = L"ProviderName";
126          *              String value = pProviderInfo->GetName();
127          *              map.Add(&key, &value );
128          *
129          *              pAc->Start(null, null, &map, null);
130          *              delete pAc;
131          * }
132          * delete pProviderInfo;
133          * @endcode
134          */
135         Tizen::Base::String GetConfigurationAppControlAppId(void) const;
136
137         /**
138         * Checks whether the specified AppWidget provider is the default provider or not.
139         *
140         * @since                2.1
141         *
142         * @return               @c true if the AppWidget is default, @n
143         *                               else @c false
144         *
145         * @remarks              
146         *                               - Default AppWidget provider providing AppWidget that represents application.
147         *                               - Home application can show AppWidget instead of icon and text for applications that includes default AppWidget provider.
148         */
149         bool IsDefault(void) const;
150
151         /**
152          * Gets a list of AppWidgetSizeInfo of an AppWidget.
153          *
154          * @since       2.1
155          *
156          * @return      A pointer to the array list that contains all AppWidgetSizeInfo of the AppWidgetProvider instance, @n
157          *          else @c null if an error occurs
158          * @exception   E_SUCCESS                       The method is successful.
159          * @exception   E_SYSTEM                        The method cannot proceed due to a severe system error.
160          * @remarks     The specific error code can be accessed using the GetLastResult() method.
161          */
162     Tizen::Base::Collection::IList* GetSizeInfoListN(void) const;
163
164 private:
165
166         //
167         // This is the constructor that initializes an instance of %AppWidgetProviderInfo with the specified values.
168     // This constructor is intentionally declared as private so that only the platform can create an instance.
169         //
170         // @since       2.1
171         //
172         // @param[in]   appId                   The ID of the application that provides AppWidget
173         // @param[in]   name    The name of the AppWidget provider
174         //
175         AppWidgetProviderInfo(const Tizen::App::AppId& appId, const Tizen::Base::String& name);
176
177         //
178         // This default constructor is intentionally declared as private so that only the platform can create an instance.
179         //
180         // @since       2.1
181         //
182     AppWidgetProviderInfo(void);
183
184         //
185         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
186         //
187         // @since       2.1
188         //
189         //
190         AppWidgetProviderInfo& operator =(const AppWidgetProviderInfo& rhs);
191
192 private:
193     class _AppWidgetProviderInfoImpl* __pAppWidgetProviderInfoImpl;
194
195 friend class _AppWidgetProviderInfoImpl;
196 };
197
198 }} // Tizen::Shell
199 #endif /* _FSHELL_APPWIDGET_PROVIDER_INFO_H_ */