diff options
Diffstat (limited to 'src/jobs/widget_install/task_widget_config.h')
-rwxr-xr-x | src/jobs/widget_install/task_widget_config.h | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/src/jobs/widget_install/task_widget_config.h b/src/jobs/widget_install/task_widget_config.h index 12525a6..632128e 100755 --- a/src/jobs/widget_install/task_widget_config.h +++ b/src/jobs/widget_install/task_widget_config.h @@ -14,7 +14,7 @@ * limitations under the License. */ /* - * @file task_widget_config.cpp + * @file task_widget_config.h * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) * @version 1.0 * @brief Implementation file for installer task widget config @@ -22,13 +22,18 @@ #ifndef INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_WIDGET_CONFIG_H #define INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_WIDGET_CONFIG_H -#include <WidgetConfigurationManager.h> +#include <set> +#include <list> + #include <dpl/task.h> #include <dpl/task_list.h> #include <dpl/string.h> -#include <wrt_error.h> +#include <dpl/optional.h> +#include <dpl/wrt-dao-ro/config_parser_data.h> +#include <dpl/wrt-dao-ro/widget_dao_read_only.h> #include <dpl/wrt-dao-ro/global_config.h> -#include <set> + +#include <wrt_error.h> #include <wrt_common_types.h> #include <widget_install/widget_install_popup.h> @@ -49,6 +54,15 @@ class TaskWidgetConfig : public WidgetInstallPopup { private: + class Exception + { + public: + DECLARE_EXCEPTION_TYPE(DPL::Exception, Base) + DECLARE_EXCEPTION_TYPE(Base, ConfigParseFailed) + }; + + typedef std::list<std::pair<DPL::String, DPL::String> > StringPairList; + InstallerContext& m_installContext; WrtDB::LocaleSet m_localeFolders; std::set<DPL::String> m_processedIconSet; @@ -89,7 +103,26 @@ class TaskWidgetConfig : bool isTizenWebApp() const; bool parseVersionString(const std::string &version, long &majorVersion, long &minorVersion, long µVersion) const; + /** + * This method is used to process the config.xml of widget, get + * the corresponding configuration to pWidgetConfigInfo + * + * @param[in] path Specified the widget archive file path (absolute path). + * @return Configuration information of widget + */ + void processFile(const std::string& path, + WrtDB::WidgetRegisterInfo &wConfig); + bool locateAndParseConfigurationFile(const std::string& currentPath, + WrtDB::WidgetRegisterInfo& pWidgetConfigInfo, + const std::string& baseFolder, + int* pErrCode); + bool parseConfigurationFileBrowser(WrtDB::ConfigParserData& configInfo, + const std::string& _currentPath, int* pErrCode); + bool parseConfigurationFileWidget(WrtDB::ConfigParserData& configInfo, + const std::string& _currentPath, int* pErrCode); + bool fillWidgetConfig(WrtDB::WidgetRegisterInfo& pWidgetConfigInfo, + WrtDB::ConfigParserData& configInfo); public: TaskWidgetConfig(InstallerContext& installTaskContext); }; |