2 * Copyright (c) 2013 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_configuration.h
19 * @author Tomasz Iwanek
20 * @brief header file for configuration task
22 #ifndef TASK_CONFIGURATION_H
23 #define TASK_CONFIGURATION_H
27 #include <dpl/task_list.h>
28 #include <dpl/wrt-dao-ro/config_parser_data.h>
30 #include <widget_install/widget_update_info.h>
31 #include <widget_install/widget_install_context.h>
33 #include <pkg-manager/pkgmgr_signal.h>
35 class InstallerContext;
38 namespace WidgetInstall {
40 class TaskConfiguration : public DPL::TaskDecl<TaskConfiguration>
42 InstallerContext& m_context;
43 std::string m_tempDir;
44 WrtDB::ConfigParserData m_widgetConfig; //TODO: temporary result of config.xml parsing
46 WidgetUpdateInfo m_widgetUpdateInfo;
48 static WrtDB::ConfigParserData getWidgetDataFromXML(
49 const std::string &widgetSource,
50 const std::string &tempPath,
51 WrtDB::PackagingType pkgType,
54 static WidgetUpdateInfo detectWidgetUpdate(
55 const WrtDB::ConfigParserData &configInfo,
56 const WrtDB::TizenAppId &tizenId);
58 bool validateTizenApplicationID(const WrtDB::TizenAppId &tizenAppId);
59 bool validateTizenPackageID(const WrtDB::TizenPkgId &tizenPkgId);
60 bool checkWidgetUpdate(const WidgetUpdateInfo &update);
61 void ApplicationTypeStep(const WrtDB::ConfigParserData &configInfo);
62 bool checkSupportRDSUpdate(const WrtDB::ConfigParserData &configInfo);
64 std::shared_ptr<PackageManager::IPkgmgrSignal> pkgMgrInterface();
69 void SetupTempDirStep();
70 void CheckPackageTypeStep();
71 void ParseXMLConfigStep();
74 void DetectUpdateInstallationStep();
75 void PkgmgrStartStep();
77 void ApplicationTypeStep();
78 void ResourceEncryptionStep();
79 void InstallationFSLocationStep();
81 void ConfigureWidgetLocationStep();
82 void CheckRDSSupportStep();
84 void AppendTasklistStep();
88 TaskConfiguration(InstallerContext& context);
94 #endif // TASK_CONFIGURATION_H