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>
32 #include <widget_location.h>
35 namespace WidgetInstall {
36 class JobWidgetInstall;
38 } //namespace WidgetInstall
42 typedef std::map<DPL::String, bool> RequestedDevCapsMap;
44 struct InstallerContext
46 typedef enum InstallStepEnum
50 INSTALL_CREATE_TEMPDIR,
52 INSTALL_WIDGET_CONFIG1,
53 INSTALL_WIDGET_CONFIG2,
54 INSTALL_WIDGET_CONFIG3,
55 INSTALL_WIDGET_CONFIG4,
56 INSTALL_WIDGET_CONFIG5,
63 INSTALL_CREATE_BACKUP_DIR = INSTALL_DB_UPDATE, /* For Update */
64 INSTALL_BACKUP_RES_FILES, /* For Update */
65 INSTALL_BACKUP_EXEC, /* For Update */
66 INSTALL_NEW_DB_INSERT, /* For Update */
68 INSTALL_CREATE_PRIVATE_STORAGE,
69 INSTALL_LINK_DEPENDS_DIRECTORY,
73 INSTALL_BACKUP_ICONFILE, /* For Update */
74 INSTALL_COPY_ICONFILE,
75 INSTALL_CREATE_EXECFILE,
76 INSTALL_CREATE_MANIFEST,
77 INSTALL_CREATE_DESKTOP,
78 INSTALL_CREATE_SHORTCUT,
79 INSTALL_INSTALL_OSPSVC,
81 INSTALL_UPDATE_DESKTOP = INSTALL_CREATE_DESKTOP, /* For Update */
82 INSTALL_DELETE_OLD_DB, /* For Update */
83 INSTALL_REMOVE_BACKUP_FILE,
88 // Installation state variables
89 WrtDB::WidgetRegisterInfo widgetConfig; ///< WidgetConfigInfo
90 DPL::Optional<WidgetLocation> locations;
91 Jobs::WidgetInstall::WacSecurity wacSecurity;///< Widget Domain information.
92 InstallStep installStep; ///< current step of installation
93 Jobs::WidgetInstall::JobWidgetInstall *job;
94 ///< pointer of instance of JobWidgetInstall
95 WidgetUpdateInfo::ExistingWidgetInfo existingWidgetInfo;
96 ///< Whether this is an update or normal installation
97 Jobs::WidgetInstall::FeatureLogicPtr featureLogic;
98 /** List of dev-caps that are requested in widget config file.
99 * Additional flag tells whether dev cap gets "static" permission
100 * (will always have PERMIT from ACE Policy). They will therefore receive
101 * static SMACK permission. (They may be forbidden because
102 * of ACE User Settings, but for now we do not protect this
103 * case with SMACK). */
104 RequestedDevCapsMap staticPermittedDevCaps;
105 std::string installInfo; ///<For recovery>
109 #endif // INSTALLER_CONTEXT_H