summaryrefslogtreecommitdiff
path: root/src/jobs/widget_install/task_widget_config.h
diff options
context:
space:
mode:
authorTaejeong Lee <taejeong.lee@samsung.com>2012-08-31 21:19:14 +0900
committerTaejeong Lee <taejeong.lee@samsung.com>2012-08-31 21:22:44 +0900
commit5ed3165dbb0d38b93fdfd6791d35815b02b9d365 (patch)
tree4924cb89d18cd5302a4e01b2f4e38010c848f3b3 /src/jobs/widget_install/task_widget_config.h
parent2ce76b65237f65d053c6e72c4a39dcaa38b83843 (diff)
downloadwrt-installer-master.tar.gz
wrt-installer-master.tar.bz2
wrt-installer-master.zip
Diffstat (limited to 'src/jobs/widget_install/task_widget_config.h')
-rwxr-xr-xsrc/jobs/widget_install/task_widget_config.h41
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 &microVersion) 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);
};