2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file task_widget_config.cpp
18 * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
20 * @brief Implementation file for installer task widget config
28 #include <dpl/errno_string.h>
29 #include <dpl/foreach.h>
30 #include <dpl/localization/w3c_file_localization.h>
31 #include <dpl/singleton_impl.h>
32 #include <dpl/utils/file_utils.h>
33 #include <dpl/utils/mime_type_utils.h>
34 #include <dpl/utils/wrt_global_settings.h>
35 #include <dpl/utils/wrt_utility.h>
36 #include <dpl/wrt-dao-ro/global_config.h>
37 #include <dpl/wrt-dao-rw/feature_dao.h>
39 #include <libiriwrapper.h>
40 #include <parser_runner.h>
41 #include <root_parser.h>
43 #include <widget_install/job_widget_install.h>
44 #include <widget_install/task_widget_config.h>
45 #include <widget_install/widget_install_context.h>
46 #include <widget_install/widget_install_errors.h>
47 #include <widget_parser.h>
48 #include <wrt_error.h>
51 namespace { // anonymous
52 const WidgetHandle WIDGET_HANDLE_START_VALUE = 1000;
53 const DPL::String BR = DPL::FromUTF8String("<br>");
54 const std::string WIDGET_NOT_COMPATIBLE = "This widget is "
55 "not compatible with WRT.<br><br>";
56 const std::string QUESTION = "Do you want to install it anyway?";
58 const char *const DEFAULT_LANGUAGE = "default";
59 const size_t MAX_WIDGET_PATH_SIZE = 1024;
61 const char *const WRT_WIDGET_CONFIG_FILE_NAME = "config.xml";
66 namespace WidgetInstall {
67 void InstallerTaskWidgetPopupData::PopupData::addWidgetInfo(
68 const DPL::String &info)
73 TaskWidgetConfig::TaskWidgetConfig(InstallerContext& installContext) :
74 DPL::TaskDecl<TaskWidgetConfig>(this),
75 m_installContext(installContext),
76 WidgetInstallPopup(installContext)
78 AddStep(&TaskWidgetConfig::StepProcessConfigurationFile);
79 AddStep(&TaskWidgetConfig::ReadLocaleFolders);
80 AddStep(&TaskWidgetConfig::ProcessLocalizedStartFiles);
81 AddStep(&TaskWidgetConfig::ProcessLocalizedIcons);
82 AddStep(&TaskWidgetConfig::StepVerifyFeatures);
84 if (!GlobalSettings::TestModeEnabled() && !m_installContext.m_quiet) {
85 AddStep(&TaskWidgetConfig::StepCancelWidgetInstallationAfterVerifyFeatures);
86 AddStep(&TaskWidgetConfig::StepShowWidgetInfo);
87 AddStep(&TaskWidgetConfig::StepCancelWidgetInstallation);
88 AddStep(&TaskWidgetConfig::StepCheckMinVersionInfo);
89 AddStep(&TaskWidgetConfig::StepCancelWidgetInstallationAfterMinVersion);
90 AddStep(&TaskWidgetConfig::StepDeletePopupWin);
94 void TaskWidgetConfig::StepProcessConfigurationFile()
98 std::string path = m_installContext.locations->getConfigurationDir();
99 LogInfo("path: " << path);
101 processFile(path, m_installContext.widgetConfig);
103 Catch(Exception::ConfigParseFailed)
105 LogError("Parsing failed.");
106 ReThrow(Exceptions::WidgetConfigFileInvalid);
110 // To get widget type for distribute WAC, TIZEN WebApp
111 setApplicationType();
113 Catch(Exception::ConfigParseFailed)
115 LogError("Config.xml has more than one namespace");
116 ReThrow(Exceptions::WidgetConfigFileInvalid);
119 m_installContext.job->UpdateProgress(
120 InstallerContext::INSTALL_WIDGET_CONFIG1,
121 "Parse elements of configuration file and save them");
124 void TaskWidgetConfig::ReadLocaleFolders()
126 LogDebug("Reading locale");
127 //Adding default locale
128 m_localeFolders.insert(L"");
130 std::string localePath = m_installContext.locations->getConfigurationDir() + "/locales";
131 DIR* localeDir = opendir(localePath.c_str());
133 LogDebug("No /locales directory in the widget package.");
137 struct dirent* dirent;
138 struct stat statStruct;
141 if ((dirent = readdir(localeDir))) {
142 DPL::String dirName = DPL::FromUTF8String(dirent->d_name);
143 std::string absoluteDirName = localePath + "/";
144 absoluteDirName += dirent->d_name;
146 if (stat(absoluteDirName.c_str(), &statStruct) != 0) {
147 LogError("stat() failed with " << DPL::GetErrnoString());
151 if (S_ISDIR(statStruct.st_mode)) {
152 //Yes, we ignore current, parent & hidden directories
153 if (dirName[0] != L'.') {
154 LogDebug("Adding locale directory \"" << dirName << "\"");
155 m_localeFolders.insert(dirName);
163 LogError("readdir() failed with " << DPL::GetErrnoString());
166 if (closedir(localeDir)) {
167 LogError("closedir() failed with " << DPL::GetErrnoString());
171 void TaskWidgetConfig::ProcessLocalizedStartFiles()
173 typedef DPL::String S;
175 m_installContext.widgetConfig.configInfo.startFile,
176 m_installContext.widgetConfig.configInfo.
177 startFileContentType,
178 m_installContext.widgetConfig.configInfo.startFileEncoding,
180 ProcessStartFile(S(L"index.htm"), S(L"text/html"));
181 ProcessStartFile(S(L"index.html"), S(L"text/html"));
182 ProcessStartFile(S(L"index.svg"), S(L"image/svg+xml"));
183 ProcessStartFile(S(L"index.xhtml"), S(L"application/xhtml+xml"));
184 ProcessStartFile(S(L"index.xht"), S(L"application/xhtml+xml"));
185 // TODO: (l.wrzosek) we need better check if in current locales widget is valid.
186 FOREACH(it, m_installContext.widgetConfig.localizationData.startFiles) {
187 if (it->propertiesForLocales.size() > 0) {
191 ThrowMsg(Exceptions::WidgetConfigFileInvalid,
192 L"The Widget has no valid start file");
195 void TaskWidgetConfig::ProcessStartFile(const DPL::OptionalString& path,
196 const DPL::OptionalString& type,
197 const DPL::OptionalString& encoding,
198 bool typeForcedInConfig)
200 using namespace WrtDB;
203 WidgetRegisterInfo::LocalizedStartFile startFileData;
204 startFileData.path = *path;
206 FOREACH(i, m_localeFolders) {
207 DPL::String pathPrefix = *i;
208 if (!pathPrefix.empty()) {
209 pathPrefix = L"locales/" + pathPrefix + L"/";
212 DPL::String relativePath = pathPrefix + *path;
213 DPL::String absolutePath = DPL::FromUTF8String(
214 m_installContext.locations->getConfigurationDir()) + L"/" + relativePath;
216 // get property data from packaged app
217 if (FileUtils::FileExists(absolutePath)) {
218 WidgetRegisterInfo::StartFileProperties startFileProperties;
220 startFileProperties.type = *type;
222 startFileProperties.type =
223 MimeTypeUtils::identifyFileMimeType(absolutePath);
226 //proceed only if MIME type is supported
227 if (MimeTypeUtils::isMimeTypeSupportedForStartFile(
228 startFileProperties.type))
231 startFileProperties.encoding = *encoding;
233 MimeTypeUtils::MimeAttributes attributes =
234 MimeTypeUtils::getMimeAttributes(
235 startFileProperties.type);
236 if (attributes.count(L"charset") > 0) {
237 startFileProperties.encoding =
238 attributes[L"charset"];
240 startFileProperties.encoding = L"UTF-8";
244 startFileData.propertiesForLocales[*i] =
248 //(there seems to be no similar requirement in .6,
249 //so let's throw only when mime type is
250 // provided explcitly in config.xml)
251 if (typeForcedInConfig) {
252 ThrowMsg(Exceptions::WidgetConfigFileInvalid,
253 "Unsupported MIME type for start file.");
257 // set property data for hosted start url
258 // Hosted start url only support TIZEN WebApp
259 if (m_installContext.widgetConfig.type ==
260 APP_TYPE_TIZENWEBAPP)
262 const char *startPath =
263 DPL::ToUTF8String(startFileData.path).c_str();
264 if (strstr(startPath, "http") == startPath) {
265 WidgetRegisterInfo::StartFileProperties
268 startFileProperties.type = *type;
271 startFileProperties.encoding = *encoding;
273 startFileData.propertiesForLocales[*i] =
280 m_installContext.widgetConfig.localizationData.startFiles.push_back(
285 void TaskWidgetConfig::ProcessLocalizedIcons()
287 using namespace WrtDB;
288 ProcessIcon(ConfigParserData::Icon(L"icon.svg"));
289 ProcessIcon(ConfigParserData::Icon(L"icon.ico"));
290 ProcessIcon(ConfigParserData::Icon(L"icon.png"));
291 ProcessIcon(ConfigParserData::Icon(L"icon.gif"));
292 ProcessIcon(ConfigParserData::Icon(L"icon.jpg"));
294 FOREACH(i, m_installContext.widgetConfig.configInfo.iconsList)
300 void TaskWidgetConfig::ProcessIcon(const WrtDB::ConfigParserData::Icon& icon)
303 bool isAnyIconValid = false;
304 //In case a default filename is passed as custom filename in config.xml, we
305 //need to keep a set of already processed filenames to avoid icon duplication
308 using namespace WrtDB;
310 if (m_processedIconSet.count(icon.src) > 0) {
313 m_processedIconSet.insert(icon.src);
315 LocaleSet localesAvailableForIcon;
317 FOREACH(i, m_localeFolders)
319 DPL::String pathPrefix = *i;
320 if (!pathPrefix.empty()) {
321 pathPrefix = L"locales/" + pathPrefix + L"/";
324 DPL::String relativePath = pathPrefix + icon.src;
325 DPL::String absolutePath = DPL::FromUTF8String(
326 m_installContext.locations->getConfigurationDir()) + L"/" + relativePath;
328 if (FileUtils::FileExists(absolutePath)) {
329 DPL::String type = MimeTypeUtils::identifyFileMimeType(absolutePath);
331 if (MimeTypeUtils::isMimeTypeSupportedForIcon(type)) {
332 isAnyIconValid = true;
333 localesAvailableForIcon.insert(*i);
334 LogInfo("Icon absolutePath :" << absolutePath <<
335 ", assigned locale :" << *i << ", type: " << type);
342 WidgetRegisterInfo::LocalizedIcon localizedIcon(icon,
343 localesAvailableForIcon);
344 m_installContext.widgetConfig.localizationData.icons.push_back(
349 void TaskWidgetConfig::StepCancelWidgetInstallationAfterVerifyFeatures()
351 LogDebug("StepCancelWidgetInstallationAfterVerifyFeatures");
352 if (InfoPopupButton::WRT_POPUP_BUTTON_CANCEL == m_installCancel) {
353 m_installCancel = WRT_POPUP_BUTTON;
355 ThrowMsg(Exceptions::WidgetConfigFileInvalid, "Widget not allowed");
359 void TaskWidgetConfig::StepCancelWidgetInstallation()
361 if (InfoPopupButton::WRT_POPUP_BUTTON_CANCEL == m_installCancel) {
362 m_installCancel = WRT_POPUP_BUTTON;
364 ThrowMsg(Exceptions::NotAllowed, "Widget not allowed");
368 void TaskWidgetConfig::StepCancelWidgetInstallationAfterMinVersion()
370 if (InfoPopupButton::WRT_POPUP_BUTTON_CANCEL == m_installCancel) {
371 m_installCancel = WRT_POPUP_BUTTON;
373 ThrowMsg(Exceptions::NotAllowed, "WRT version incompatible.");
377 void TaskWidgetConfig::createInstallPopup(PopupType type, const std::string &label)
379 m_installContext.job->Pause();
383 bool ret = createPopup();
386 loadPopup( type, label);
391 void TaskWidgetConfig::StepDeletePopupWin()
396 void TaskWidgetConfig::StepShowWidgetInfo()
398 if (!m_popupData.widgetInfo.empty()) {
399 std::string label = DPL::ToUTF8String(m_popupData.widgetInfo);
400 createInstallPopup(PopupType::WIDGET_FEATURE_INFO, label);
401 m_installContext.job->UpdateProgress(
402 InstallerContext::INSTALL_WIDGET_CONFIG2,
403 "Show Widget Info Finished");
407 void TaskWidgetConfig::StepCheckMinVersionInfo()
409 if (!isMinVersionCompatible(
410 m_installContext.widgetConfig.type.appType,
411 m_installContext.widgetConfig.minVersion)) {
412 std::string label = WIDGET_NOT_COMPATIBLE + QUESTION;
413 createInstallPopup(PopupType::WIDGET_MIN_VERSION, label);
416 m_installContext.job->UpdateProgress(
417 InstallerContext::INSTALL_WIDGET_CONFIG2,
418 "Check MinVersion Finished");
421 void TaskWidgetConfig::StepVerifyFeatures()
423 using namespace WrtDB;
424 ConfigParserData &data = m_installContext.widgetConfig.configInfo;
425 ConfigParserData::FeaturesList list = data.featuresList;
426 ConfigParserData::FeaturesList newList;
428 //in case of tests, this variable is unused
429 std::string featureInfo;
432 // check feature vender for permission
433 // WAC, TIZEN WebApp cannot use other feature
435 if (!isFeatureAllowed(m_installContext.widgetConfig.type.appType,
438 LogInfo("This application type not allowed to use this feature");
440 Exceptions::WidgetConfigFileInvalid,
442 m_installContext.widgetConfig.type.getApptypeToString() <<
443 "] cannot be allowed to use [" <<
444 DPL::ToUTF8String(it->name) + "] feature");
446 if (!WrtDB::FeatureDAOReadOnly::isFeatureInstalled(
447 DPL::ToUTF8String(it->name))) {
448 LogWarning("Feature not found. Checking if required :[" <<
449 DPL::ToUTF8String(it->name) << "]");
453 * WL-3210 The WRT MUST inform the user if a widget cannot be
454 * installed because one or more required features are not
457 std::ostringstream os;
458 os << "Widget cannot be installed, required feature is missing:["
459 << DPL::ToUTF8String(it->name) << "]";
460 if (!GlobalSettings::TestModeEnabled() && !isTizenWebApp()) {
461 std::string label = os.str();
462 createInstallPopup(PopupType::WIDGET_WRONG_FEATURE_INFO, label);
464 ThrowMsg(Exceptions::WidgetConfigFileInvalid, os.str());
468 featureInfo += DPL::ToUTF8String(it->name);
469 featureInfo += DPL::ToUTF8String(BR);
472 data.featuresList = newList;
473 if (!featureInfo.empty()) {
474 m_popupData.addWidgetInfo(DPL::FromUTF8String(featureInfo));
477 m_installContext.job->UpdateProgress(
478 InstallerContext::INSTALL_WIDGET_CONFIG2,
479 "Widget Config step2 Finished");
482 void TaskWidgetConfig::setApplicationType()
484 using namespace WrtDB;
485 WidgetRegisterInfo* widgetInfo = &(m_installContext.widgetConfig);
486 ConfigParserData* configInfo = &(widgetInfo->configInfo);
488 FOREACH(iterator, configInfo->nameSpaces) {
489 LogInfo("namespace = [" << *iterator << "]");
490 AppType currentAppType = APP_TYPE_UNKNOWN;
492 if (*iterator == ConfigurationNamespace::W3CWidgetNamespaceName) {
496 ConfigurationNamespace::WacWidgetNamespaceNameForLinkElement ||
498 ConfigurationNamespace::WacWidgetNamespaceName)
500 currentAppType = APP_TYPE_WAC20;
501 } else if (*iterator == ConfigurationNamespace::TizenWebAppNamespaceName) {
502 currentAppType = APP_TYPE_TIZENWEBAPP;
505 if (widgetInfo->type == APP_TYPE_UNKNOWN) {
506 widgetInfo->type = currentAppType;
507 } else if (widgetInfo->type == currentAppType) {
510 ThrowMsg(Exceptions::WidgetConfigFileInvalid,
511 "Config.xml has more than one namespace");
515 // If there is no define, type set to WAC 2.0
516 if (widgetInfo->type == APP_TYPE_UNKNOWN) {
517 widgetInfo->type = APP_TYPE_WAC20;
520 LogInfo("type = [" << widgetInfo->type.getApptypeToString() << "]");
523 bool TaskWidgetConfig::isFeatureAllowed(WrtDB::AppType appType,
524 DPL::String featureName)
526 using namespace WrtDB;
527 LogInfo("AppType = [" <<
528 WidgetType(appType).getApptypeToString() << "]");
529 LogInfo("FetureName = [" << featureName << "]");
531 AppType featureType = APP_TYPE_UNKNOWN;
532 const char* feature = DPL::ToUTF8String(featureName).c_str();
533 // check prefix of feature name
534 if (strstr(feature, PluginsPrefix::TIZENPluginsPrefix) == feature) {
535 // Tizen WebApp feature
536 featureType = APP_TYPE_TIZENWEBAPP;
537 } else if (strstr(feature, PluginsPrefix::WACPluginsPrefix) == feature) {
539 featureType = APP_TYPE_WAC20;
540 } else if (strstr(feature, PluginsPrefix::W3CPluginsPrefix) == feature) {
541 // W3C standard feature
542 // Both WAC and TIZEN WebApp are possible to use W3C plugins
546 // unknown feature will be checked next step
550 if (appType == featureType) {
556 bool TaskWidgetConfig::parseVersionString(const std::string &version,
557 long &majorVersion, long &minorVersion, long µVersion) const
559 std::istringstream inputString(version);
560 inputString >> majorVersion;
561 if (inputString.bad() || inputString.fail()) {
562 LogWarning("Invalid minVersion format.");
565 inputString.get(); // skip period
566 inputString >> minorVersion;
567 if (inputString.bad() || inputString.fail()) {
568 LogWarning("Invalid minVersion format");
571 inputString.get(); // skip period
572 if (inputString.bad() || inputString.fail()) {
573 inputString >> microVersion;
579 bool TaskWidgetConfig::isMinVersionCompatible(WrtDB::AppType appType,
580 const DPL::OptionalString &widgetVersion) const
582 if (widgetVersion.IsNull() || (*widgetVersion).empty())
584 LogWarning("minVersion attribute is empty. WRT assumes platform "
585 "supports this widget.");
589 //Parse widget version
590 long majorWidget = 0, minorWidget = 0, microWidget = 0;
591 if (!parseVersionString(DPL::ToUTF8String(*widgetVersion), majorWidget,
592 minorWidget, microWidget)) {
593 LogWarning("Invalid format of widget version string.");
597 //Parse supported version
598 long majorSupported = 0, minorSupported = 0, microSupported = 0;
600 if (appType == WrtDB::AppType::APP_TYPE_TIZENWEBAPP) {
601 version = WrtDB::GlobalConfig::GetTizenVersion();
602 } else if (appType == WrtDB::AppType::APP_TYPE_WAC20) {
603 version = WrtDB::GlobalConfig::GetWACVersion();
605 LogWarning("Invaild AppType");
609 if (!parseVersionString(version,
610 majorSupported, minorSupported, microSupported)) {
611 LogWarning("Invalid format of WAC version string.");
615 if (majorWidget > majorSupported ||
616 minorWidget > minorSupported ||
617 microWidget > microSupported) {
618 LogInfo("Platform doesn't support this widget.");
624 bool TaskWidgetConfig::isTizenWebApp() const
627 if (m_installContext.widgetConfig.type.appType
628 == WrtDB::AppType::APP_TYPE_TIZENWEBAPP)
634 bool TaskWidgetConfig::parseConfigurationFileBrowser(WrtDB::ConfigParserData& configInfo,
635 const std::string& _currentPath, int* pErrCode)
640 parser.Parse(_currentPath, ElementParserPtr(new
644 DPL::FromUTF32String(
647 Catch(ElementParser::Exception::Base)
649 LogDebug("Invalid widget configuration file!");
650 *pErrCode = WRT_WM_ERR_INVALID_ARCHIVE;
656 bool TaskWidgetConfig::parseConfigurationFileWidget(WrtDB::ConfigParserData& configInfo,
657 const std::string& _currentPath, int* pErrCode)
661 //TODO: rewrite this madness
662 char cfgAbsPath[MAX_WIDGET_PATH_SIZE + 1] = { 0 };
664 struct dirent* ptr = NULL;
666 dir = opendir(_currentPath.c_str());
668 *pErrCode = WRT_ERR_UNKNOWN;
671 bool has_config_xml = false;
673 while ((ptr = readdir(dir)) != NULL) { //Find configuration file, based on its name
674 if (ptr->d_type == DT_REG) {
675 if (!strcmp(ptr->d_name, WRT_WIDGET_CONFIG_FILE_NAME)) {
676 _WrtUtilSetAbsolutePath(cfgAbsPath,
677 _currentPath.c_str(), ptr->d_name);
678 //Parse widget configuration file
679 LogDebug("Found config: " << cfgAbsPath);
683 parser.Parse(cfgAbsPath, ElementParserPtr(new
692 Catch(ElementParser::Exception::Base)
694 LogDebug("Invalid widget configuration file!");
695 // _rethrown_exception.Dump();
696 *pErrCode = WRT_WM_ERR_INVALID_ARCHIVE;
701 has_config_xml = true;
708 //We must have config.xml so leaveing if we doesn't
709 if (!has_config_xml) {
710 LogDebug("Invalid archive");
711 *pErrCode = WRT_WM_ERR_INVALID_ARCHIVE;
717 bool TaskWidgetConfig::locateAndParseConfigurationFile(
718 const std::string& _currentPath,
719 WrtDB::WidgetRegisterInfo& pWidgetConfigInfo,
720 const std::string& baseFolder,
723 using namespace WrtDB;
729 ConfigParserData& configInfo = pWidgetConfigInfo.configInfo;
731 // check if this installation from browser, or not.
732 size_t pos = _currentPath.rfind("/");
733 std::ostringstream infoPath;
734 infoPath << _currentPath.substr(pos+1);
736 std::string language = "";
738 if (infoPath.str() != WRT_WIDGET_CONFIG_FILE_NAME) {
739 if (_currentPath.empty() || baseFolder.empty()) {
740 *pErrCode = WRT_ERR_INVALID_ARG;
743 // in case of general installation using wgt archive
744 if(!parseConfigurationFileWidget(configInfo, _currentPath, pErrCode))
749 // in case of browser installation
750 if(!parseConfigurationFileBrowser(configInfo, _currentPath, pErrCode))
757 if (!_WrtUtilStringToLower(baseFolder.c_str(), &tmp_language)) {
758 *pErrCode = WRT_ERR_UNKNOWN;
763 *pErrCode = WRT_ERR_UNKNOWN;
766 language = tmp_language;
769 if(!fillWidgetConfig(pWidgetConfigInfo, configInfo))
771 *pErrCode = WRT_WM_ERR_INVALID_ARCHIVE;
777 bool TaskWidgetConfig::fillWidgetConfig(WrtDB::WidgetRegisterInfo& pWidgetConfigInfo,
778 WrtDB::ConfigParserData& configInfo)
780 if (!!configInfo.widget_id) {
781 if (!pWidgetConfigInfo.guid) {
782 pWidgetConfigInfo.guid = configInfo.widget_id;
784 if (pWidgetConfigInfo.guid != configInfo.widget_id) {
785 LogDebug("Invalid archive");
790 if (!!configInfo.tizenId) {
791 if (!pWidgetConfigInfo.pkgname) {
792 pWidgetConfigInfo.pkgname = configInfo.tizenId;
794 if (pWidgetConfigInfo.pkgname != configInfo.tizenId) {
795 LogDebug("Invalid archive - Tizen ID not same error");
800 if (!!configInfo.version) {
801 if (!pWidgetConfigInfo.version) {
802 pWidgetConfigInfo.version = configInfo.version;
804 if (pWidgetConfigInfo.version != configInfo.version) {
805 LogDebug("Invalid archive");
810 if (!!configInfo.minVersionRequired) {
811 pWidgetConfigInfo.minVersion = configInfo.minVersionRequired;
812 } else if (!!configInfo.tizenMinVersionRequired) {
813 pWidgetConfigInfo.minVersion = configInfo.tizenMinVersionRequired;
818 void TaskWidgetConfig::processFile(const std::string& path,
819 WrtDB::WidgetRegisterInfo &widgetConfiguration)
823 if (!locateAndParseConfigurationFile(path, widgetConfiguration,
824 DEFAULT_LANGUAGE, &pErrCode)) {
825 LogWarning("Widget archive: Failed while parsing config file");
826 ThrowMsg(Exception::ConfigParseFailed, path);
830 } //namespace WidgetInstall