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/wac_security.h>
30 #include <feature_logic.h>
31 #include <widget_install/widget_update_info.h>
34 namespace WidgetInstall {
35 class JobWidgetInstall;
37 } //namespace WidgetInstall
41 typedef std::map<DPL::String, bool> RequestedDevCapsMap;
43 struct InstallerContext
45 typedef enum InstallStepEnum
49 INSTALL_CREATE_TEMPDIR,
51 INSTALL_WIDGET_CONFIG1,
52 INSTALL_WIDGET_CONFIG2,
53 INSTALL_WIDGET_CONFIG3,
54 INSTALL_WIDGET_CONFIG4,
55 INSTALL_WIDGET_CONFIG5,
62 INSTALL_CREATE_BACKUP_DIR = INSTALL_DB_UPDATE, /* For Update */
63 INSTALL_BACKUP_RES_FILES, /* For Update */
64 INSTALL_BACKUP_EXEC, /* For Update */
65 INSTALL_NEW_DB_INSERT, /* For Update */
67 INSTALL_CREATE_PRIVATE_STORAGE,
68 INSTALL_LINK_DEPENDS_DIRECTORY,
72 INSTALL_BACKUP_ICONFILE, /* For Update */
73 INSTALL_CREATE_MANIFEST,
74 INSTALL_COPY_ICONFILE,
75 INSTALL_CREATE_DESKTOP,
76 INSTALL_CREATE_EXECFILE,
77 INSTALL_INSTALL_OSPSVC,
79 INSTALL_UPDATE_DESKTOP = INSTALL_CREATE_DESKTOP, /* For Update */
80 INSTALL_DELETE_OLD_DB, /* For Update */
81 INSTALL_REMOVE_BACKUP_FILE,
87 typedef enum PackageTypeEnum
89 WGT, WITH_OSP, INVALID
93 // Installation state variables
94 std::string widgetSource; ///< Source widget zip file/widget url
95 std::string tempWidgetPath; ///< Unpacked widget temporary path
96 WrtDB::WidgetRegisterInfo widgetConfig; ///< WidgetConfigInfo
97 DPL::Optional<WrtDB::DbWidgetHandle> widgetHandle;
98 Jobs::WidgetInstall::WacSecurity wacSecurity;///< Widget Domain information.
99 InstallStep installStep; ///< current step of installation
100 Jobs::WidgetInstall::JobWidgetInstall *job;
101 ///< pointer of instance of JobWidgetInstall
102 WidgetUpdateInfo::ExistingWidgetInfo existingWidgetInfo;
103 ///< Whether this is an update or normal installation
104 Jobs::WidgetInstall::FeatureLogicPtr featureLogic;
105 /** List of dev-caps that are requested in widget config file.
106 * Additional flag tells whether dev cap gets "static" permission
107 * (will always have PERMIT from ACE Policy). They will therefore receive
108 * static SMACK permission. (They may be forbidden because
109 * of ACE User Settings, but for now we do not protect this
110 * case with SMACK). */
111 RequestedDevCapsMap staticPermittedDevCaps;
112 std::string installInfo; ///<For recovery>
114 //PackageType pkgType; /* whether this widget is only wgt
115 // @@ or with osp service */
117 std::string tempWidgetRoot; ///< temporary widget root path
120 #endif // INSTALLER_CONTEXT_H