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/mime_type_utils.h>
33 #include <dpl/utils/wrt_global_settings.h>
34 #include <dpl/utils/wrt_utility.h>
35 #include <dpl/wrt-dao-ro/global_config.h>
36 #include <dpl/wrt-dao-rw/feature_dao.h>
38 #include <libiriwrapper.h>
39 #include <parser_runner.h>
40 #include <root_parser.h>
42 #include <widget_install/job_widget_install.h>
43 #include <widget_install/task_widget_config.h>
44 #include <widget_install/widget_install_context.h>
45 #include <widget_install/widget_install_errors.h>
46 #include <widget_parser.h>
47 #include <wrt_error.h>
49 namespace { // anonymous
50 const DPL::String BR = DPL::FromUTF8String("<br>");
51 const std::string WIDGET_NOT_COMPATIBLE = "This widget is "
52 "not compatible with WRT.<br><br>";
53 const std::string QUESTION = "Do you want to install it anyway?";
55 const char *const DEFAULT_LANGUAGE = "default";
57 const char *const WRT_WIDGET_CONFIG_FILE_NAME = "config.xml";
59 const std::string WINDGET_INSTALL_NETWORK_ACCESS = "network access";
63 namespace WidgetInstall {
64 void InstallerTaskWidgetPopupData::PopupData::addWidgetInfo(
65 const DPL::String &info)
70 TaskWidgetConfig::TaskWidgetConfig(InstallerContext& installContext) :
71 DPL::TaskDecl<TaskWidgetConfig>(this),
72 WidgetInstallPopup(installContext),
73 m_installContext(installContext)
75 AddStep(&TaskWidgetConfig::StepProcessConfigurationFile);
76 AddStep(&TaskWidgetConfig::ReadLocaleFolders);
77 AddStep(&TaskWidgetConfig::ProcessLocalizedStartFiles);
78 AddStep(&TaskWidgetConfig::ProcessBackgroundPageFile);
79 AddStep(&TaskWidgetConfig::ProcessLocalizedIcons);
80 AddStep(&TaskWidgetConfig::ProcessWidgetInstalledPath);
81 AddStep(&TaskWidgetConfig::StepVerifyFeatures);
82 AddStep(&TaskWidgetConfig::StepCheckMinVersionInfo);
84 if (!GlobalSettings::TestModeEnabled() && !m_installContext.m_quiet) {
87 StepCancelWidgetInstallationAfterVerifyFeatures);
88 AddStep(&TaskWidgetConfig::StepShowWidgetInfo);
89 AddStep(&TaskWidgetConfig::StepCancelWidgetInstallation);
90 AddStep(&TaskWidgetConfig::StepCancelWidgetInstallationAfterMinVersion);
91 AddStep(&TaskWidgetConfig::StepDeletePopupWin);
95 void TaskWidgetConfig::StepProcessConfigurationFile()
99 std::string path = m_installContext.locations->getConfigurationDir();
100 LogInfo("path: " << path);
102 processFile(path, m_installContext.widgetConfig);
104 Catch(Exception::ConfigParseFailed)
106 LogError("Parsing failed.");
107 ReThrow(Exceptions::WidgetConfigFileInvalid);
110 m_installContext.job->UpdateProgress(
111 InstallerContext::INSTALL_WIDGET_CONFIG1,
112 "Parse elements of configuration file and save them");
115 void TaskWidgetConfig::ReadLocaleFolders()
117 LogDebug("Reading locale");
118 //Adding default locale
119 m_localeFolders.insert(L"");
121 std::string localePath =
122 m_installContext.locations->getConfigurationDir() + "/locales";
123 DIR* localeDir = opendir(localePath.c_str());
125 LogDebug("No /locales directory in the widget package.");
129 struct dirent* dirent;
130 struct stat statStruct;
133 if ((dirent = readdir(localeDir))) {
134 DPL::String dirName = DPL::FromUTF8String(dirent->d_name);
135 std::string absoluteDirName = localePath + "/";
136 absoluteDirName += dirent->d_name;
138 if (stat(absoluteDirName.c_str(), &statStruct) != 0) {
139 LogError("stat() failed with " << DPL::GetErrnoString());
143 if (S_ISDIR(statStruct.st_mode)) {
144 //Yes, we ignore current, parent & hidden directories
145 if (dirName[0] != L'.') {
146 LogDebug("Adding locale directory \"" << dirName << "\"");
147 m_localeFolders.insert(dirName);
154 LogError("readdir() failed with " << DPL::GetErrnoString());
157 if (-1 == TEMP_FAILURE_RETRY(closedir(localeDir))) {
158 LogError("Failed to close dir: " << localePath << " with error: "
159 << DPL::GetErrnoString());
163 void TaskWidgetConfig::ProcessLocalizedStartFiles()
165 typedef DPL::String S;
167 m_installContext.widgetConfig.configInfo.startFile,
168 m_installContext.widgetConfig.configInfo.
169 startFileContentType,
170 m_installContext.widgetConfig.configInfo.startFileEncoding,
172 ProcessStartFile(S(L"index.htm"), S(L"text/html"));
173 ProcessStartFile(S(L"index.html"), S(L"text/html"));
174 ProcessStartFile(S(L"index.svg"), S(L"image/svg+xml"));
175 ProcessStartFile(S(L"index.xhtml"), S(L"application/xhtml+xml"));
176 ProcessStartFile(S(L"index.xht"), S(L"application/xhtml+xml"));
177 // TODO: (l.wrzosek) we need better check if in current locales widget is
179 FOREACH(it, m_installContext.widgetConfig.localizationData.startFiles) {
180 if (it->propertiesForLocales.size() > 0) {
184 ThrowMsg(Exceptions::WidgetConfigFileInvalid,
185 L"The Widget has no valid start file");
188 void TaskWidgetConfig::ProcessStartFile(const DPL::OptionalString& path,
189 const DPL::OptionalString& type,
190 const DPL::OptionalString& encoding,
191 bool typeForcedInConfig)
193 using namespace WrtDB;
196 WidgetRegisterInfo::LocalizedStartFile startFileData;
197 startFileData.path = *path;
199 FOREACH(i, m_localeFolders) {
200 DPL::String pathPrefix = *i;
201 if (!pathPrefix.empty()) {
202 pathPrefix = L"locales/" + pathPrefix + L"/";
205 DPL::String relativePath = pathPrefix + *path;
206 DPL::String absolutePath = DPL::FromUTF8String(
207 m_installContext.locations->getConfigurationDir()) + L"/" +
210 // get property data from packaged app
211 if (WrtUtilFileExists(DPL::ToUTF8String(absolutePath))) {
212 WidgetRegisterInfo::StartFileProperties startFileProperties;
214 startFileProperties.type = *type;
216 startFileProperties.type =
217 MimeTypeUtils::identifyFileMimeType(absolutePath);
220 //proceed only if MIME type is supported
221 if (MimeTypeUtils::isMimeTypeSupportedForStartFile(
222 startFileProperties.type))
225 startFileProperties.encoding = *encoding;
227 MimeTypeUtils::MimeAttributes attributes =
228 MimeTypeUtils::getMimeAttributes(
229 startFileProperties.type);
230 if (attributes.count(L"charset") > 0) {
231 startFileProperties.encoding =
232 attributes[L"charset"];
234 startFileProperties.encoding = L"UTF-8";
238 startFileData.propertiesForLocales[*i] =
242 //(there seems to be no similar requirement in .6,
243 //so let's throw only when mime type is
244 // provided explcitly in config.xml)
245 if (typeForcedInConfig) {
246 ThrowMsg(Exceptions::WidgetConfigFileInvalid,
247 "Unsupported MIME type for start file.");
251 // set property data for hosted start url
252 // Hosted start url only support TIZEN WebApp
253 if (m_installContext.widgetConfig.webAppType ==
254 APP_TYPE_TIZENWEBAPP)
256 std::string startPath = DPL::ToUTF8String(
259 if (strstr(startPath.c_str(),
260 "http") == startPath.c_str())
262 WidgetRegisterInfo::StartFileProperties
265 startFileProperties.type = *type;
268 startFileProperties.encoding = *encoding;
270 startFileData.propertiesForLocales[*i] =
277 m_installContext.widgetConfig.localizationData.startFiles.push_back(
282 void TaskWidgetConfig::ProcessBackgroundPageFile()
284 if (!!m_installContext.widgetConfig.configInfo.backgroundPage) {
285 // check whether file exists
286 DPL::String backgroundPagePath = DPL::FromUTF8String(
287 m_installContext.locations->getConfigurationDir()) + L"/" +
288 *m_installContext.widgetConfig.configInfo.backgroundPage;
289 //if no then cancel installation
290 if (!WrtUtilFileExists(DPL::ToUTF8String(backgroundPagePath))) {
291 ThrowMsg(Exceptions::WidgetConfigFileInvalid,
292 L"Given background page file not found in archive");
297 void TaskWidgetConfig::ProcessLocalizedIcons()
299 using namespace WrtDB;
300 ProcessIcon(ConfigParserData::Icon(L"icon.svg"));
301 ProcessIcon(ConfigParserData::Icon(L"icon.ico"));
302 ProcessIcon(ConfigParserData::Icon(L"icon.png"));
303 ProcessIcon(ConfigParserData::Icon(L"icon.gif"));
304 ProcessIcon(ConfigParserData::Icon(L"icon.jpg"));
306 FOREACH(i, m_installContext.widgetConfig.configInfo.iconsList)
312 void TaskWidgetConfig::ProcessIcon(const WrtDB::ConfigParserData::Icon& icon)
315 bool isAnyIconValid = false;
316 //In case a default filename is passed as custom filename in config.xml, we
317 //need to keep a set of already processed filenames to avoid icon
321 using namespace WrtDB;
323 if (m_processedIconSet.count(icon.src) > 0) {
326 m_processedIconSet.insert(icon.src);
328 LocaleSet localesAvailableForIcon;
330 FOREACH(i, m_localeFolders)
332 DPL::String pathPrefix = *i;
333 if (!pathPrefix.empty()) {
334 pathPrefix = L"locales/" + pathPrefix + L"/";
337 DPL::String relativePath = pathPrefix + icon.src;
338 DPL::String absolutePath = DPL::FromUTF8String(
339 m_installContext.locations->getConfigurationDir()) + L"/" +
342 if (WrtUtilFileExists(DPL::ToUTF8String(absolutePath))) {
343 DPL::String type = MimeTypeUtils::identifyFileMimeType(absolutePath);
345 if (MimeTypeUtils::isMimeTypeSupportedForIcon(type)) {
346 isAnyIconValid = true;
347 localesAvailableForIcon.insert(*i);
348 LogInfo("Icon absolutePath :" << absolutePath <<
349 ", assigned locale :" << *i << ", type: " << type);
354 if (isAnyIconValid) {
355 WidgetRegisterInfo::LocalizedIcon localizedIcon(icon,
356 localesAvailableForIcon);
357 m_installContext.widgetConfig.localizationData.icons.push_back(
362 void TaskWidgetConfig::ProcessWidgetInstalledPath()
364 LogDebug("ProcessWidgetInstalledPath");
365 m_installContext.widgetConfig.widgetInstalledPath =
367 m_installContext.locations->getPackageInstallationDir());
370 void TaskWidgetConfig::StepCancelWidgetInstallationAfterVerifyFeatures()
372 LogDebug("StepCancelWidgetInstallationAfterVerifyFeatures");
373 if (InfoPopupButton::WRT_POPUP_BUTTON_CANCEL == m_installCancel) {
374 m_installCancel = WRT_POPUP_BUTTON;
376 ThrowMsg(Exceptions::WidgetConfigFileInvalid, "Widget not allowed");
380 void TaskWidgetConfig::StepCancelWidgetInstallation()
382 if (InfoPopupButton::WRT_POPUP_BUTTON_CANCEL == m_installCancel) {
383 m_installCancel = WRT_POPUP_BUTTON;
385 ThrowMsg(Exceptions::NotAllowed, "Widget not allowed");
389 void TaskWidgetConfig::StepCancelWidgetInstallationAfterMinVersion()
391 if (InfoPopupButton::WRT_POPUP_BUTTON_CANCEL == m_installCancel) {
392 m_installCancel = WRT_POPUP_BUTTON;
394 ThrowMsg(Exceptions::NotAllowed, "WRT version incompatible.");
398 void TaskWidgetConfig::createInstallPopup(PopupType type,
399 const std::string &label)
401 m_installContext.job->Pause();
406 bool ret = createPopup();
408 loadPopup(type, label);
413 void TaskWidgetConfig::StepDeletePopupWin()
418 void TaskWidgetConfig::StepShowWidgetInfo()
420 if (!m_popupData.widgetInfo.empty()) {
421 std::string label = DPL::ToUTF8String(m_popupData.widgetInfo);
422 createInstallPopup(PopupType::WIDGET_FEATURE_INFO, label);
423 m_installContext.job->UpdateProgress(
424 InstallerContext::INSTALL_WIDGET_CONFIG2,
425 "Show Widget Info Finished");
429 void TaskWidgetConfig::StepCheckMinVersionInfo()
431 if (!isMinVersionCompatible(
432 m_installContext.widgetConfig.webAppType.appType,
433 m_installContext.widgetConfig.minVersion))
435 if (!GlobalSettings::TestModeEnabled() && !m_installContext.m_quiet) {
436 LogDebug("Platform version to low - launching");
437 std::string label = WIDGET_NOT_COMPATIBLE + QUESTION;
438 createInstallPopup(PopupType::WIDGET_MIN_VERSION, label);
441 "Platform version lower than required -> cancelling installation");
442 ThrowMsg(Exceptions::NotAllowed,
443 "Platform version does not meet requirements");
447 m_installContext.job->UpdateProgress(
448 InstallerContext::INSTALL_WIDGET_CONFIG2,
449 "Check MinVersion Finished");
452 void TaskWidgetConfig::StepVerifyFeatures()
454 using namespace WrtDB;
455 ConfigParserData &data = m_installContext.widgetConfig.configInfo;
456 ConfigParserData::FeaturesList list = data.featuresList;
457 ConfigParserData::FeaturesList newList;
459 //in case of tests, this variable is unused
460 std::string featureInfo;
463 // check feature vender for permission
464 // WAC, TIZEN WebApp cannot use other feature
466 if (!isFeatureAllowed(m_installContext.widgetConfig.webAppType.appType,
469 LogInfo("This application type not allowed to use this feature");
471 Exceptions::WidgetConfigFileInvalid,
473 m_installContext.widgetConfig.webAppType.getApptypeToString()
475 "] cannot be allowed to use [" <<
476 DPL::ToUTF8String(it->name) + "] feature");
478 if (!WrtDB::FeatureDAOReadOnly::isFeatureInstalled(
479 DPL::ToUTF8String(it->name)))
481 LogWarning("Feature not found. Checking if required :[" <<
482 DPL::ToUTF8String(it->name) << "]");
486 * WL-3210 The WRT MUST inform the user if a widget cannot be
487 * installed because one or more required features are not
490 std::ostringstream os;
492 "Widget cannot be installed, required feature is missing:["
493 << DPL::ToUTF8String(it->name) << "]";
494 if (!GlobalSettings::TestModeEnabled() && !isTizenWebApp()) {
495 std::string label = os.str();
496 createInstallPopup(PopupType::WIDGET_WRONG_FEATURE_INFO,
499 ThrowMsg(Exceptions::WidgetConfigFileInvalid, os.str());
503 featureInfo += DPL::ToUTF8String(it->name);
504 featureInfo += DPL::ToUTF8String(BR);
507 if (!data.accessInfoSet.empty()) {
508 featureInfo += WINDGET_INSTALL_NETWORK_ACCESS;
509 featureInfo += DPL::ToUTF8String(BR);
511 data.featuresList = newList;
512 if (!featureInfo.empty()) {
513 m_popupData.addWidgetInfo(DPL::FromUTF8String(featureInfo));
516 m_installContext.job->UpdateProgress(
517 InstallerContext::INSTALL_WIDGET_CONFIG2,
518 "Widget Config step2 Finished");
521 bool TaskWidgetConfig::isFeatureAllowed(WrtDB::AppType appType,
522 DPL::String featureName)
524 using namespace WrtDB;
525 LogInfo("AppType = [" <<
526 WidgetType(appType).getApptypeToString() << "]");
527 LogInfo("FetureName = [" << featureName << "]");
529 AppType featureType = APP_TYPE_UNKNOWN;
530 std::string featureStr = DPL::ToUTF8String(featureName);
531 const char* feature = featureStr.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,
559 long µVersion) const
561 std::istringstream inputString(version);
562 inputString >> majorVersion;
563 if (inputString.bad() || inputString.fail()) {
564 LogWarning("Invalid minVersion format.");
567 inputString.get(); // skip period
568 inputString >> minorVersion;
569 if (inputString.bad() || inputString.fail()) {
570 LogWarning("Invalid minVersion format");
573 inputString.get(); // skip period
574 if (inputString.bad() || inputString.fail()) {
575 inputString >> microVersion;
581 bool TaskWidgetConfig::isMinVersionCompatible(
582 WrtDB::AppType appType,
583 const DPL::OptionalString &
586 if (widgetVersion.IsNull() || (*widgetVersion).empty()) {
587 LogWarning("minVersion attribute is empty. WRT assumes platform "
588 "supports this widget.");
592 //Parse widget version
593 long majorWidget = 0, minorWidget = 0, microWidget = 0;
594 if (!parseVersionString(DPL::ToUTF8String(*widgetVersion), majorWidget,
595 minorWidget, microWidget))
597 LogWarning("Invalid format of widget version string.");
601 //Parse supported version
602 long majorSupported = 0, minorSupported = 0, microSupported = 0;
604 if (appType == WrtDB::AppType::APP_TYPE_TIZENWEBAPP) {
605 version = WrtDB::GlobalConfig::GetTizenVersion();
606 } else if (appType == WrtDB::AppType::APP_TYPE_WAC20) {
607 version = WrtDB::GlobalConfig::GetWACVersion();
609 LogWarning("Invaild AppType");
613 if (!parseVersionString(version,
614 majorSupported, minorSupported, microSupported))
616 LogWarning("Invalid format of platform version string.");
620 if (majorWidget > majorSupported ||
621 (majorWidget == majorSupported && minorWidget > minorSupported) ||
622 (majorWidget == majorSupported && minorWidget == minorSupported
623 && microWidget > microSupported))
625 LogInfo("Platform doesn't support this widget.");
631 bool TaskWidgetConfig::isTizenWebApp() const
634 if (m_installContext.widgetConfig.webAppType.appType
635 == WrtDB::AppType::APP_TYPE_TIZENWEBAPP)
643 bool TaskWidgetConfig::parseConfigurationFileBrowser(
644 WrtDB::ConfigParserData& configInfo,
652 parser.Parse(_currentPath, ElementParserPtr(new
656 DPL::FromUTF32String(
659 Catch(ElementParser::Exception::Base)
661 LogError("Invalid widget configuration file!");
662 *pErrCode = WRT_WM_ERR_INVALID_ARCHIVE;
668 bool TaskWidgetConfig::parseConfigurationFileWidget(
669 WrtDB::ConfigParserData& configInfo,
676 //TODO: rewrite this madness
677 std::string cfgAbsPath;
679 struct dirent* ptr = NULL;
681 dir = opendir(_currentPath.c_str());
683 *pErrCode = WRT_ERR_UNKNOWN;
686 bool has_config_xml = false;
688 while ((ptr = readdir(dir)) != NULL) { //Find configuration file, based on
690 if (ptr->d_type == DT_REG) {
691 if (!strcmp(ptr->d_name, WRT_WIDGET_CONFIG_FILE_NAME)) {
692 std::string dName(ptr->d_name);
693 WrtUtilJoinPaths(cfgAbsPath, _currentPath, dName);
695 //Parse widget configuration file
696 LogDebug("Found config: " << cfgAbsPath);
700 parser.Parse(cfgAbsPath, ElementParserPtr(new
709 Catch(ElementParser::Exception::Base)
711 LogError("Invalid widget configuration file!");
712 // _rethrown_exception.Dump();
713 *pErrCode = WRT_WM_ERR_INVALID_ARCHIVE;
714 if (-1 == TEMP_FAILURE_RETRY(closedir(dir))) {
716 "Failed to close dir: " << _currentPath <<
718 << DPL::GetErrnoString());
723 has_config_xml = true;
728 if (-1 == TEMP_FAILURE_RETRY(closedir(dir))) {
729 LogError("Failed to close dir: " << _currentPath << " with error: "
730 << DPL::GetErrnoString());
733 //We must have config.xml so leaveing if we doesn't
734 if (!has_config_xml) {
735 LogError("Invalid archive");
736 *pErrCode = WRT_WM_ERR_INVALID_ARCHIVE;
742 bool TaskWidgetConfig::locateAndParseConfigurationFile(
743 const std::string& _currentPath,
744 WrtDB::WidgetRegisterInfo& pWidgetConfigInfo,
745 const std::string& baseFolder,
748 using namespace WrtDB;
754 ConfigParserData& configInfo = pWidgetConfigInfo.configInfo;
756 // check if this installation from browser, or not.
757 size_t pos = _currentPath.rfind("/");
758 std::ostringstream infoPath;
759 infoPath << _currentPath.substr(pos + 1);
761 if (infoPath.str() != WRT_WIDGET_CONFIG_FILE_NAME) {
762 if (_currentPath.empty() || baseFolder.empty()) {
763 *pErrCode = WRT_ERR_INVALID_ARG;
766 // in case of general installation using wgt archive
767 if (!parseConfigurationFileWidget(configInfo, _currentPath,
773 // in case of browser installation
774 if (!parseConfigurationFileBrowser(configInfo, _currentPath,
781 if (!fillWidgetConfig(pWidgetConfigInfo, configInfo)) {
782 *pErrCode = WRT_WM_ERR_INVALID_ARCHIVE;
788 bool TaskWidgetConfig::fillWidgetConfig(
789 WrtDB::WidgetRegisterInfo& pWidgetConfigInfo,
790 WrtDB::ConfigParserData& configInfo)
792 if (!!configInfo.widget_id) {
793 if (!pWidgetConfigInfo.guid) {
794 pWidgetConfigInfo.guid = configInfo.widget_id;
796 if (pWidgetConfigInfo.guid != configInfo.widget_id) {
797 LogError("Invalid archive");
802 if (!!configInfo.tizenAppId) {
803 if (DPL::ToUTF8String(pWidgetConfigInfo.tzAppid).compare(
804 DPL::ToUTF8String(*configInfo.tizenAppId)) < 0)
806 LogError("Invalid archive - Tizen App ID not same error");
810 if (!!configInfo.tizenPkgId) {
811 if (pWidgetConfigInfo.tzPkgid != *configInfo.tizenPkgId) {
812 LogError("Invalid archive - Tizen Pkg ID not same error");
816 if (!!configInfo.version) {
817 if (!pWidgetConfigInfo.version) {
818 pWidgetConfigInfo.version = configInfo.version;
820 if (pWidgetConfigInfo.version != configInfo.version) {
821 LogError("Invalid archive");
826 if (!!configInfo.minVersionRequired) {
827 pWidgetConfigInfo.minVersion = configInfo.minVersionRequired;
828 } else if (!!configInfo.tizenMinVersionRequired) {
829 pWidgetConfigInfo.minVersion = configInfo.tizenMinVersionRequired;
834 void TaskWidgetConfig::processFile(
835 const std::string& path,
836 WrtDB::WidgetRegisterInfo &
841 if (!locateAndParseConfigurationFile(path, widgetConfiguration,
842 DEFAULT_LANGUAGE, &pErrCode))
844 LogWarning("Widget archive: Failed while parsing config file");
845 ThrowMsg(Exception::ConfigParseFailed, path);
848 } //namespace WidgetInstall