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
25 #include <dpl/task_list.h>
26 #include <dpl/wrt-dao-ro/config_parser_data.h>
28 #include <widget_install/widget_update_info.h>
29 #include <widget_install/widget_install_context.h>
31 class InstallerContext;
34 namespace WidgetInstall {
36 class TaskConfiguration : public DPL::TaskDecl<TaskConfiguration>
38 InstallerContext& m_context;
39 WidgetUpdateInfo m_widgetUpdateInfo;
41 bool ConfigureInstallation(const std::string &widgetSource,
42 const WrtDB::ConfigParserData
44 const std::string &tempPath);
45 static WrtDB::ConfigParserData getWidgetDataFromXML(
46 const std::string &widgetSource,
47 const std::string &tempPath,
48 WrtDB::PackagingType pkgType,
50 static WidgetUpdateInfo detectWidgetUpdate(
51 const WrtDB::ConfigParserData &configInfo,
52 const WrtDB::TizenAppId &tizenId);
53 void setTizenId(const WrtDB::ConfigParserData &configInfo);
54 void configureWidgetLocation(const std::string & widgetPath,
55 const std::string &tempPath);
57 WrtDB::PackagingType checkPackageType(
58 const std::string &widgetSource,
59 const std::string &tempPath);
60 bool detectResourceEncryption(const WrtDB::ConfigParserData &configData);
61 void setInstallLocationType(const WrtDB::ConfigParserData
64 bool validateTizenApplicationID(const WrtDB::TizenAppId &tizenAppId);
65 bool validateTizenPackageID(const WrtDB::TizenPkgId &tizenPkgId);
66 bool checkWidgetUpdate(const WidgetUpdateInfo &update);
67 void setApplicationType(const WrtDB::ConfigParserData &configInfo);
68 bool checkSupportRDSUpdate(const WrtDB::ConfigParserData &configInfo);
70 void PrepareInstallationStep();
71 void AppendTasklistStep();
77 TaskConfiguration(InstallerContext& context);
83 #endif // TASK_CONFIGURATION_H