2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FShellAppWidgetProviderInfo.h
20 * @brief This is the header file for the %AppWidgetProviderInfo class.
22 * This header file contains the declarations of the %AppWidgetProviderInfo class.
25 #ifndef _FSHELL_APPWIDGET_PROVIDER_INFO_H_
26 #define _FSHELL_APPWIDGET_PROVIDER_INFO_H_
28 #include <FBaseString.h>
29 #include <FAppTypes.h>
31 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
33 namespace Tizen { namespace Shell
37 * @class AppWidgetProviderInfo
38 * @brief This class contains static AppWidget information.
42 * The %AppWidgetProviderInfo class contains static AppWidget information.
44 class _OSP_EXPORT_ AppWidgetProviderInfo
45 : public Tizen::Base::Object
49 * Copying of objects using this copy constructor is allowed.
53 * @param[in] rhs An instance of %AppWidgetProviderInfo
55 AppWidgetProviderInfo(const AppWidgetProviderInfo& rhs);
58 * This destructor overrides Tizen::Base::Object::~Object().
62 virtual ~AppWidgetProviderInfo(void);
65 * Gets the application ID.
69 * @return The application ID
71 Tizen::App::AppId GetAppId(void) const;
74 * Gets the AppWidget provider name.
78 * @return The provider name
80 Tizen::Base::String GetName(void) const;
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.
89 * @return The display name of an AppWidget
91 Tizen::Base::String GetDisplayName(void) const;
94 * Gets the icon path of an application.
98 * @return The icon path of an application @n
99 * An empty string is returned if there is no value.
101 Tizen::Base::String GetIconPath(void) const;
104 * Gets the ID of the application that exports AppContorl to configure the AppWidget.
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.
111 * The following example demonstrates how to start the application control that is exported for AppWidget configuration.
114 * #include <FShell.h>
116 * using namespace Tizen::Shell;
118 * AppWidgetProviderInfo* pProviderInfo = AppWidgetManager::GetInstance()->GetAppWidgetProviderInfoN(appId, providerName);
119 * if( !pProviderInfo->GetConfigurationAppControlAppId().IsEmpty )
121 * AppControl* pAc = AppManager::FindAppControlN(pProviderInfo->GetConfigurationAppControlAppId(), L"http://tizen.org/appcontrol/operation/appwidget/configuration");
125 * String key = L"ProviderName";
126 * String value = pProviderInfo->GetName();
127 * map.Add(&key, &value );
129 * pAc->Start(null, null, &map, null);
132 * delete pProviderInfo;
135 Tizen::Base::String GetConfigurationAppControlAppId(void) const;
138 * Checks whether the specified AppWidget provider is the default provider or not.
142 * @return @c true if the AppWidget is default, @n
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.
149 bool IsDefault(void) const;
152 * Gets a list of AppWidgetSizeInfo of an AppWidget.
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.
162 Tizen::Base::Collection::IList* GetSizeInfoListN(void) const;
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.
172 // @param[in] appId The ID of the application that provides AppWidget
173 // @param[in] name The name of the AppWidget provider
175 AppWidgetProviderInfo(const Tizen::App::AppId& appId, const Tizen::Base::String& name);
178 // This default constructor is intentionally declared as private so that only the platform can create an instance.
182 AppWidgetProviderInfo(void);
185 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
190 AppWidgetProviderInfo& operator =(const AppWidgetProviderInfo& rhs);
193 class _AppWidgetProviderInfoImpl* __pAppWidgetProviderInfoImpl;
195 friend class _AppWidgetProviderInfoImpl;
199 #endif /* _FSHELL_APPWIDGET_PROVIDER_INFO_H_ */