Fix Build errors
[platform/framework/web/wrt-installer.git] / src / jobs / widget_install / task_process_config.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 /*
17  * @file    task_process_config.cpp
18  * @author  Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
19  * @version 1.0
20  * @brief   Implementation file for installer task widget config
21  */
22
23 #include <string>
24 #include <sys/stat.h>
25 #include <dirent.h>
26
27 #include <dpl/errno_string.h>
28 #include <dpl/foreach.h>
29 #include <dpl/localization/w3c_file_localization.h>
30 #include <dpl/singleton_impl.h>
31 #include <dpl/utils/mime_type_utils.h>
32 #include <dpl/utils/wrt_global_settings.h>
33 #include <dpl/utils/wrt_utility.h>
34 #include <dpl/wrt-dao-ro/global_config.h>
35 #include <dpl/wrt-dao-ro/config_parser_data.h>
36 #include <dpl/wrt-dao-rw/feature_dao.h>
37
38 #include <widget_install/job_widget_install.h>
39 #include <widget_install/task_process_config.h>
40 #include <widget_install/widget_install_context.h>
41 #include <widget_install/widget_install_errors.h>
42 #include <widget_parser.h>
43 #ifdef LIVEBOX
44 #include <web_provider_plugin_info.h>
45 #include <web_provider_livebox_info.h>
46 #endif // LIVEBOX
47 #include <manifest.h>
48
49 #include <installer_log.h>
50
51 namespace { // anonymous
52 const DPL::String BR = DPL::FromUTF8String("<br>");
53 const std::string WINDGET_INSTALL_NETWORK_ACCESS = "network access";
54 }
55
56 namespace Jobs {
57 namespace WidgetInstall {
58
59 TaskProcessConfig::TaskProcessConfig(InstallerContext& installContext) :
60     DPL::TaskDecl<TaskProcessConfig>(this),
61     m_installContext(installContext)
62 {
63     AddStep(&TaskProcessConfig::StartStep);
64     AddStep(&TaskProcessConfig::ReadLocaleFolders);
65     AddStep(&TaskProcessConfig::StepFillWidgetConfig);
66     AddStep(&TaskProcessConfig::ProcessLocalizedStartFiles);
67     AddStep(&TaskProcessConfig::ProcessBackgroundPageFile);
68     AddStep(&TaskProcessConfig::ProcessLocalizedIcons);
69     AddStep(&TaskProcessConfig::ProcessWidgetInstalledPath);
70     AddStep(&TaskProcessConfig::ProcessAppControlInfo);
71     AddStep(&TaskProcessConfig::ProcessSecurityModel);
72     AddStep(&TaskProcessConfig::StepVerifyFeatures);
73     AddStep(&TaskProcessConfig::StepVerifyLivebox);
74     AddStep(&TaskProcessConfig::StepCheckMinVersionInfo);
75     AddStep(&TaskProcessConfig::EndStep);
76 }
77
78 void TaskProcessConfig::StepFillWidgetConfig()
79 {
80     if (!fillWidgetConfig(m_installContext.widgetConfig,
81                          m_installContext.widgetConfig.configInfo))
82     {
83         _E("Widget configuration is illformed");
84         ThrowMsg(Exception::ConfigParseFailed, "Widget configuration is illformed");
85     }
86 }
87
88 void TaskProcessConfig::ReadLocaleFolders()
89 {
90     _D("Reading locale");
91     //Adding default locale
92     m_localeFolders.insert(L"");
93
94     std::string localePath =
95         m_installContext.locations->getConfigurationDir() + "/locales";
96     DIR* localeDir = opendir(localePath.c_str());
97     if (!localeDir) {
98         _D("No /locales directory in the widget package.");
99         return;
100     }
101
102     struct stat statStruct;
103     struct dirent dirent;
104     struct dirent *result;
105     int return_code;
106     errno = 0;
107     for (return_code = readdir_r(localeDir, &dirent, &result);
108             result != NULL && return_code == 0;
109             return_code = readdir_r(localeDir, &dirent, &result))
110     {
111         DPL::String dirName = DPL::FromUTF8String(dirent.d_name);
112         std::string absoluteDirName = localePath + "/";
113         absoluteDirName += dirent.d_name;
114
115         if (stat(absoluteDirName.c_str(), &statStruct) != 0) {
116             _E("stat() failed with %s", DPL::GetErrnoString().c_str());
117             continue;
118         }
119
120         if (S_ISDIR(statStruct.st_mode)) {
121             //Yes, we ignore current, parent & hidden directories
122             if (dirName[0] != L'.') {
123                 _D("Adding locale directory \"%ls\"", dirName.c_str());
124                 m_localeFolders.insert(dirName);
125             }
126         }
127     }
128
129     if (return_code != 0 || errno != 0) {
130         _E("readdir_r() failed with %s", DPL::GetErrnoString().c_str());
131     }
132
133     if (-1 == closedir(localeDir)) {
134         _E("Failed to close dir: %s with error: %s", localePath.c_str(), DPL::GetErrnoString().c_str());
135     }
136
137     m_installContext.job->UpdateProgress(InstallerContext::INSTALL_WIDGET_CONFIG1, "Read locale folders");
138 }
139
140 void TaskProcessConfig::ProcessLocalizedStartFiles()
141 {
142     typedef DPL::String S;
143     ProcessStartFile(
144         m_installContext.widgetConfig.configInfo.startFile,
145         m_installContext.widgetConfig.configInfo.
146             startFileContentType,
147         m_installContext.widgetConfig.configInfo.startFileEncoding,
148         true);
149     ProcessStartFile(S(L"index.htm"), S(L"text/html"));
150     ProcessStartFile(S(L"index.html"), S(L"text/html"));
151     ProcessStartFile(S(L"index.svg"), S(L"image/svg+xml"));
152     ProcessStartFile(S(L"index.xhtml"), S(L"application/xhtml+xml"));
153     ProcessStartFile(S(L"index.xht"), S(L"application/xhtml+xml"));
154     // TODO: we need better check if in current locales widget is valid
155     FOREACH(it, m_installContext.widgetConfig.localizationData.startFiles) {
156         if (it->propertiesForLocales.size() > 0) {
157             return;
158         }
159     }
160     ThrowMsg(Exceptions::InvalidStartFile,
161              "The Widget has no valid start file");
162 }
163
164 void TaskProcessConfig::ProcessStartFile(const DPL::OptionalString& path,
165                                         const DPL::OptionalString& type,
166                                         const DPL::OptionalString& encoding,
167                                         bool typeForcedInConfig)
168 {
169     using namespace WrtDB;
170
171     if (!!path) {
172         WidgetRegisterInfo::LocalizedStartFile startFileData;
173         startFileData.path = *path;
174
175         FOREACH(i, m_localeFolders) {
176             DPL::String pathPrefix = *i;
177             if (!pathPrefix.empty()) {
178                 pathPrefix = L"locales/" + pathPrefix + L"/";
179             }
180
181             DPL::String relativePath = pathPrefix + *path;
182             DPL::String absolutePath = DPL::FromUTF8String(
183                     m_installContext.locations->getConfigurationDir()) + L"/" +
184                 relativePath;
185
186             // get property data from packaged app
187             if (WrtUtilFileExists(DPL::ToUTF8String(absolutePath))) {
188                 WidgetRegisterInfo::StartFileProperties startFileProperties;
189                 if (!!type) {
190                     startFileProperties.type = *type;
191                 } else {
192                     startFileProperties.type =
193                         MimeTypeUtils::identifyFileMimeType(absolutePath);
194                 }
195
196                 //proceed only if MIME type is supported
197                 if (MimeTypeUtils::isMimeTypeSupportedForStartFile(
198                         startFileProperties.type))
199                 {
200                     if (!!encoding) {
201                         startFileProperties.encoding = *encoding;
202                     } else {
203                         MimeTypeUtils::MimeAttributes attributes =
204                             MimeTypeUtils::getMimeAttributes(
205                                 startFileProperties.type);
206                         if (attributes.count(L"charset") > 0) {
207                             startFileProperties.encoding =
208                                 attributes[L"charset"];
209                         } else {
210                             startFileProperties.encoding = L"UTF-8";
211                         }
212                     }
213
214                     startFileData.propertiesForLocales[*i] =
215                         startFileProperties;
216                 } else {
217                     //9.1.16.5.content.8
218                     //(there seems to be no similar requirement in .6,
219                     //so let's throw only when mime type is
220                     // provided explcitly in config.xml)
221                     if (typeForcedInConfig) {
222                         ThrowMsg(Exceptions::WidgetConfigFileInvalid,
223                                  "Unsupported MIME type for start file.");
224                     }
225                 }
226             } else {
227                 // set property data for hosted start url
228                 // Hosted start url only support TIZEN WebApp
229                 if (m_installContext.widgetConfig.webAppType ==
230                     APP_TYPE_TIZENWEBAPP)
231                 {
232                     std::string startPath = DPL::ToUTF8String(
233                             startFileData.path);
234
235                     if (strstr(startPath.c_str(),
236                                "http") == startPath.c_str())
237                     {
238                         WidgetRegisterInfo::StartFileProperties
239                             startFileProperties;
240                         if (!!type) {
241                             startFileProperties.type = *type;
242                         }
243                         if (!!encoding) {
244                             startFileProperties.encoding = *encoding;
245                         }
246                         startFileData.propertiesForLocales[*i] =
247                             startFileProperties;
248                     }
249                 }
250             }
251         }
252
253         m_installContext.widgetConfig.localizationData.startFiles.push_back(
254             startFileData);
255     }
256 }
257
258 void TaskProcessConfig::ProcessBackgroundPageFile()
259 {
260     if (!!m_installContext.widgetConfig.configInfo.backgroundPage) {
261         // check whether file exists
262         DPL::String backgroundPagePath = DPL::FromUTF8String(
263                 m_installContext.locations->getConfigurationDir()) + L"/" +
264             *m_installContext.widgetConfig.configInfo.backgroundPage;
265         //if no then cancel installation
266         if (!WrtUtilFileExists(DPL::ToUTF8String(backgroundPagePath))) {
267             ThrowMsg(Exceptions::WidgetConfigFileInvalid,
268                      L"Given background page file not found in archive");
269         }
270     }
271 }
272
273 void TaskProcessConfig::ProcessLocalizedIcons()
274 {
275     using namespace WrtDB;
276     FOREACH(i, m_installContext.widgetConfig.configInfo.iconsList)
277     {
278         ProcessIcon(*i);
279     }
280     ProcessIcon(ConfigParserData::Icon(L"icon.svg"));
281     ProcessIcon(ConfigParserData::Icon(L"icon.ico"));
282     ProcessIcon(ConfigParserData::Icon(L"icon.png"));
283     ProcessIcon(ConfigParserData::Icon(L"icon.gif"));
284     ProcessIcon(ConfigParserData::Icon(L"icon.jpg"));
285 }
286
287 void TaskProcessConfig::ProcessIcon(const WrtDB::ConfigParserData::Icon& icon)
288 {
289     _D("enter");
290     bool isAnyIconValid = false;
291     //In case a default filename is passed as custom filename in config.xml, we
292     //need to keep a set of already processed filenames to avoid icon
293     // duplication
294     //in database.
295
296     using namespace WrtDB;
297
298     if (m_processedIconSet.count(icon.src) > 0) {
299         return;
300     }
301     m_processedIconSet.insert(icon.src);
302
303     LocaleSet localesAvailableForIcon;
304
305     FOREACH(i, m_localeFolders)
306     {
307         DPL::String pathPrefix = *i;
308         if (!pathPrefix.empty()) {
309             pathPrefix = L"locales/" + pathPrefix + L"/";
310         }
311
312         DPL::String relativePath = pathPrefix + icon.src;
313         DPL::String absolutePath = DPL::FromUTF8String(
314                 m_installContext.locations->getConfigurationDir()) + L"/" +
315             relativePath;
316
317         if (WrtUtilFileExists(DPL::ToUTF8String(absolutePath))) {
318             DPL::String type = MimeTypeUtils::identifyFileMimeType(absolutePath);
319
320             if (MimeTypeUtils::isMimeTypeSupportedForIcon(type)) {
321                 isAnyIconValid = true;
322                 localesAvailableForIcon.insert(*i);
323                 _D("Icon absolutePath: %ls, assigned locale: %ls, type: %ls",
324                     absolutePath.c_str(), (*i).c_str(), type.c_str());
325             }
326         }
327     }
328
329     if (isAnyIconValid) {
330         WidgetRegisterInfo::LocalizedIcon localizedIcon(icon,
331                                                         localesAvailableForIcon);
332         m_installContext.widgetConfig.localizationData.icons.push_back(
333             localizedIcon);
334     }
335 }
336
337 void TaskProcessConfig::ProcessWidgetInstalledPath()
338 {
339     _D("ProcessWidgetInstalledPath");
340     m_installContext.widgetConfig.widgetInstalledPath =
341         DPL::FromUTF8String(
342             m_installContext.locations->getPackageInstallationDir());
343 }
344
345 void TaskProcessConfig::ProcessAppControlInfo()
346 {
347     _D("ProcessAppControlInfo");
348     using namespace WrtDB;
349
350     // In case of dispostion is inline, set the seperate execute
351     int index = 1;
352     // 0 index is reserved by default execute
353     FOREACH(it, m_installContext.widgetConfig.configInfo.appControlList) {
354         if (it->m_disposition ==
355             ConfigParserData::AppControlInfo::Disposition::INLINE)
356         {
357             it->m_index = index++;
358         } else {
359             it->m_index = 0;
360         }
361     }
362 }
363
364 void TaskProcessConfig::ProcessSecurityModel()
365 {
366     // 0104.  If the "required_version" specified in the Web Application's
367     // configuration is 2.2 or higher and if the Web Application's
368     // configuration is "CSP-compatible configuration", then the WRT MUST be
369     // set to "CSP-based security mode". Otherwise, the WRT MUST be set to
370     // "WARP-based security mode".
371     // 0105.  A Web Application configuration is "CSP-compatible configuration"
372     // if the configuration includes one or more of
373     // <tizen:content-security-policy> /
374     // <tizen:content-security-policy-report-only> /
375     // <tizen:allow-navigation> elements.
376
377     bool isSecurityModelV1 = false;
378     bool isSecurityModelV2 = false;
379     WrtDB::ConfigParserData &data = m_installContext.widgetConfig.configInfo;
380
381     if (!data.cspPolicy.IsNull() ||
382         !data.cspPolicyReportOnly.IsNull() ||
383         !data.allowNavigationInfoList.empty())
384     {
385         data.accessInfoSet.clear();
386     }
387
388     // WARP is V1
389     if (!data.accessInfoSet.empty()) {
390         isSecurityModelV1 = true;
391     }
392
393     // CSP & allow-navigation is V2
394     if (!data.cspPolicy.IsNull() ||
395         !data.cspPolicyReportOnly.IsNull() ||
396         !data.allowNavigationInfoList.empty())
397     {
398         isSecurityModelV2 = true;
399     }
400
401     if (isSecurityModelV1 && isSecurityModelV2) {
402         _E("Security model is conflict");
403         ThrowMsg(Exceptions::NotAllowed, "Security model is conflict");
404     } else if (isSecurityModelV1) {
405         data.securityModelVersion =
406             WrtDB::ConfigParserData::SecurityModelVersion::SECURITY_MODEL_V1;
407     } else if (isSecurityModelV2) {
408         data.securityModelVersion =
409             WrtDB::ConfigParserData::SecurityModelVersion::SECURITY_MODEL_V2;
410     } else {
411         data.securityModelVersion =
412             WrtDB::ConfigParserData::SecurityModelVersion::SECURITY_MODEL_V1;
413     }
414
415     m_installContext.job->UpdateProgress(
416         InstallerContext::INSTALL_WIDGET_CONFIG2,
417         "Finished process security model");
418 }
419
420 void TaskProcessConfig::StepCheckMinVersionInfo()
421 {
422     if (!isMinVersionCompatible(
423             m_installContext.widgetConfig.webAppType.appType,
424             m_installContext.widgetConfig.minVersion))
425     {
426         _E("Platform version lower than required -> cancelling installation");
427         ThrowMsg(Exceptions::NotAllowed,
428                  "Platform version does not meet requirements");
429     }
430
431     m_installContext.job->UpdateProgress(
432         InstallerContext::INSTALL_WIDGET_CONFIG2,
433         "Check MinVersion Finished");
434 }
435
436 void TaskProcessConfig::StepVerifyFeatures()
437 {
438     using namespace WrtDB;
439     ConfigParserData &data = m_installContext.widgetConfig.configInfo;
440     ConfigParserData::FeaturesList list = data.featuresList;
441     ConfigParserData::FeaturesList newList;
442
443     //in case of tests, this variable is unused
444     std::string featureInfo;
445     FOREACH(it, list)
446     {
447         // check feature vender for permission
448         // WAC, TIZEN WebApp cannot use other feature
449
450         if (!isFeatureAllowed(m_installContext.widgetConfig.webAppType.appType,
451                               it->name))
452         {
453             _D("This application type not allowed to use this feature");
454             ThrowMsg(
455                 Exceptions::WidgetConfigFileInvalid,
456                 "This app type [" <<
457                 m_installContext.widgetConfig.webAppType.getApptypeToString()
458                                   <<
459                 "] cannot be allowed to use [" <<
460                 DPL::ToUTF8String(it->name) + "] feature");
461         } else {
462             newList.insert(*it);
463             featureInfo += DPL::ToUTF8String(it->name);
464             featureInfo += DPL::ToUTF8String(BR);
465         }
466     }
467     if (!data.accessInfoSet.empty()) {
468         featureInfo += WINDGET_INSTALL_NETWORK_ACCESS;
469         featureInfo += DPL::ToUTF8String(BR);
470     }
471     data.featuresList = newList;
472
473     m_installContext.job->UpdateProgress(
474         InstallerContext::INSTALL_WIDGET_CONFIG2,
475         "Widget Config step2 Finished");
476 }
477
478 void TaskProcessConfig::StepVerifyLivebox()
479 {
480 #ifdef LIVEBOX
481     using namespace WrtDB;
482     ConfigParserData &data = m_installContext.widgetConfig.configInfo;
483     ConfigParserData::LiveboxList liveBoxList = data.m_livebox;
484
485     if (liveBoxList.size() <= 0) {
486         return;
487     }
488
489     FOREACH (it, liveBoxList) {
490         std::string boxType;
491
492         if ((**it).m_liveboxId.find(m_installContext.widgetConfig.tzAppid) != 0) {
493             _E("Invalid app-widget id (doesn't begin with application id)");
494             ThrowMsg(Exceptions::WidgetConfigFileInvalid, "Invalid app-widget id (doesn't begin with application id)");
495         }
496
497         if ((**it).m_type.empty()) {
498             boxType = web_provider_livebox_get_default_type();
499         } else {
500             boxType = DPL::ToUTF8String((**it).m_type);
501         }
502
503         _D("livebox type: %s", boxType.c_str());
504
505         ConfigParserData::LiveboxInfo::BoxSizeList boxSizeList =
506             (**it).m_boxInfo.m_boxSize;
507         char** boxSize = static_cast<char**>(
508             malloc(sizeof(char*)* boxSizeList.size()));
509
510         int boxSizeCnt = 0;
511         FOREACH (m, boxSizeList) {
512             boxSize[boxSizeCnt++] = strdup(DPL::ToUTF8String((*m).m_size).c_str());
513         }
514
515         bool chkSize = web_provider_plugin_check_supported_size(
516             boxType.c_str(), boxSize, boxSizeCnt);
517
518         for(int i = 0; i < boxSizeCnt; i++) {
519             free(boxSize[i]);
520         }
521         free(boxSize);
522
523         if(!chkSize) {
524             _E("Invalid boxSize");
525             ThrowMsg(Exceptions::WidgetConfigFileInvalid, "Invalid boxSize");
526         }
527     }
528 #endif // LIVEBOX
529 }
530
531 bool TaskProcessConfig::isFeatureAllowed(WrtDB::AppType appType,
532                                         DPL::String featureName)
533 {
534     using namespace WrtDB;
535     _D("AppType = [%s]", WidgetType(appType).getApptypeToString().c_str());
536     _D("FetureName = [%ls]", featureName.c_str());
537
538     AppType featureType = APP_TYPE_UNKNOWN;
539     std::string featureStr = DPL::ToUTF8String(featureName);
540     const char* feature = featureStr.c_str();
541
542     // check prefix of  feature name
543     if (strstr(feature, PluginsPrefix::TIZENPluginsPrefix) == feature) {
544         // Tizen WebApp feature
545         featureType = APP_TYPE_TIZENWEBAPP;
546     } else if (strstr(feature, PluginsPrefix::W3CPluginsPrefix) == feature) {
547         // W3C standard feature
548         // Both WAC and TIZEN WebApp are possible to use W3C plugins
549         return true;
550     } else {
551         // unknown feature
552         // unknown feature will be checked next step
553         return true;
554     }
555
556     if (appType == featureType) {
557         return true;
558     }
559     return false;
560 }
561
562 bool TaskProcessConfig::parseVersionString(const std::string &version,
563                                           long &majorVersion,
564                                           long &minorVersion,
565                                           long &microVersion) const
566 {
567     std::istringstream inputString(version);
568     inputString >> majorVersion;
569     if (inputString.bad() || inputString.fail()) {
570         _W("Invalid minVersion format.");
571         return false;
572     }
573     inputString.get(); // skip period
574     inputString >> minorVersion;
575     if (inputString.bad() || inputString.fail()) {
576         _W("Invalid minVersion format");
577         return false;
578     } else {
579         inputString.get(); // skip period
580         if (inputString.bad() || inputString.fail()) {
581             inputString >> microVersion;
582         }
583     }
584     return true;
585 }
586
587 bool TaskProcessConfig::isMinVersionCompatible(
588     WrtDB::AppType appType,
589     const DPL::OptionalString &
590     widgetVersion) const
591 {
592     if (widgetVersion.IsNull() || (*widgetVersion).empty()) {
593         if (appType == WrtDB::AppType::APP_TYPE_TIZENWEBAPP) {
594             return false;
595         } else {
596             _W("minVersion attribute is empty. WRT assumes platform "
597                "supports this widget.");
598             return true;
599         }
600     }
601
602     //Parse widget version
603     long majorWidget = 0, minorWidget = 0, microWidget = 0;
604     if (!parseVersionString(DPL::ToUTF8String(*widgetVersion), majorWidget,
605                             minorWidget, microWidget))
606     {
607         _W("Invalid format of widget version string.");
608         return false;
609     }
610
611     //Parse supported version
612     long majorSupported = 0, minorSupported = 0, microSupported = 0;
613     std::string version;
614     if (appType == WrtDB::AppType::APP_TYPE_TIZENWEBAPP) {
615         version = WrtDB::GlobalConfig::GetTizenVersion();
616     } else {
617         _W("Invaild AppType");
618         return false;
619     }
620
621     if (!parseVersionString(version,
622                             majorSupported, minorSupported, microSupported))
623     {
624         _W("Invalid format of platform version string.");
625         return true;
626     }
627
628     if (majorWidget > majorSupported ||
629         (majorWidget == majorSupported && minorWidget > minorSupported) ||
630         (majorWidget == majorSupported && minorWidget == minorSupported
631          && microWidget > microSupported))
632     {
633         _D("Platform doesn't support this widget.");
634         return false;
635     }
636     return true;
637 }
638
639 bool TaskProcessConfig::isTizenWebApp() const
640 {
641     if (m_installContext.widgetConfig.webAppType.appType == WrtDB::AppType::APP_TYPE_TIZENWEBAPP)
642     {
643         return true;
644     }
645     return false;
646 }
647
648 bool TaskProcessConfig::fillWidgetConfig(
649     WrtDB::WidgetRegisterInfo& pWidgetConfigInfo,
650     WrtDB::ConfigParserData& configInfo)
651 {
652     pWidgetConfigInfo.guid = configInfo.widget_id;
653
654     if (!!configInfo.version) {
655         if (!pWidgetConfigInfo.version) {
656             pWidgetConfigInfo.version = configInfo.version;
657         } else {
658             if (pWidgetConfigInfo.version != configInfo.version) {
659                 _E("Invalid archive");
660                 return false;
661             }
662         }
663     }
664     if (!!configInfo.minVersionRequired) {
665         pWidgetConfigInfo.minVersion = configInfo.minVersionRequired;
666     } else if (!!configInfo.tizenMinVersionRequired) {
667         pWidgetConfigInfo.minVersion = configInfo.tizenMinVersionRequired;
668     }
669     return true;
670 }
671
672 void TaskProcessConfig::StartStep()
673 {
674     _D("--------- <TaskProcessConfig> : START ----------");
675 }
676
677 void TaskProcessConfig::EndStep()
678 {
679     _D("--------- <TaskProcessConfig> : END ----------");
680 }
681
682 } //namespace WidgetInstall
683 } //namespace Jobs