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 installer_structs.h
18 * @author Pawel Sikorski (p.sikorski@samgsung.com)
20 * @brief Definition file of installer tasks data structures
22 #ifndef INSTALLER_CONTEXT_H
23 #define INSTALLER_CONTEXT_H
27 #include <dpl/string.h>
28 #include <dpl/wrt-dao-rw/widget_dao.h>
29 #include <widget_install/widget_security.h>
30 #include <feature_logic.h>
31 #include <widget_install/widget_update_info.h>
32 #include <widget_location.h>
33 #include <wrt_install_mode.h>
36 namespace WidgetInstall {
37 class JobWidgetInstall;
39 } //namespace WidgetInstall
43 typedef std::map<DPL::String, bool> RequestedDevCapsMap;
45 struct InstallerContext
47 typedef enum InstallStepEnum
53 INSTALL_RDS_DELTA_CHECK,
56 INSTALL_CREATE_BACKUP_DIR, /* For Update */
59 INSTALL_WIDGET_CONFIG1,
60 INSTALL_WIDGET_CONFIG2,
63 INSTALL_CERTIFY_LEVEL_CHECK,
64 INSTALL_ECRYPTION_FILES,
65 INSTALL_BACKUP_ICONFILE, /* For Update */
66 INSTALL_COPY_ICONFILE,
67 INSTALL_COPY_LIVEBOX_FILES,
68 INSTALL_CREATE_EXECFILE,
69 INSTALL_CREATE_MANIFEST,
70 INSTALL_INSTALL_OSPSVC,
71 INSTALL_NEW_DB_INSERT,
75 INSTALL_PKGINFO_UPDATE,
81 // Installation state variables
82 WrtDB::WidgetRegisterInfo widgetConfig; ///< WidgetConfigInfo
83 DPL::Optional<WidgetLocation> locations;
84 Jobs::WidgetInstall::WidgetSecurity widgetSecurity; ///< Widget Domain
86 InstallStep installStep; ///< current step of installation
87 Jobs::WidgetInstall::JobWidgetInstall *job;
88 ///< Whether this is an update or normal installation
89 Jobs::WidgetInstall::FeatureLogicPtr featureLogic;
90 /** List of dev-caps that are requested in widget config file.
91 * Additional flag tells whether dev cap gets "static" permission
92 * (will always have PERMIT from ACE Policy). They will therefore receive
93 * static SMACK permission. (They may be forbidden because
94 * of ACE User Settings, but for now we do not protect this
95 * case with SMACK). */
96 RequestedDevCapsMap staticPermittedDevCaps;
97 std::string installInfo; ///<For recovery>
98 InstallLocationType locationType;
101 DPL::String callerPkgId;
103 std::string requestedPath; ///input path of widget
104 bool needEncryption; ///for configuring right task if encryption needed
108 #endif // INSTALLER_CONTEXT_H