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
26 #include <dpl/wrt-dao-rw/widget_dao.h>
27 #include <widget_install/wac_security.h>
28 #include <feature_logic.h>
29 #include <widget_install/widget_update_info.h>
32 namespace WidgetInstall {
33 class JobWidgetInstall;
35 } //namespace WidgetInstall
39 struct InstallerContext
41 typedef enum InstallStepEnum
44 INSTALL_WIDGET_CONFIG1,
45 INSTALL_WIDGET_CONFIG2,
46 INSTALL_WIDGET_CONFIG3,
47 INSTALL_WIDGET_CONFIG4,
48 INSTALL_WIDGET_CONFIG5,
51 INSTALL_CREATE_DESKTOP,
52 INSTALL_CREATE_EXECFILE,
53 INSTALL_COPY_ICONFILE,
54 INSTALL_CREATE_PRIVATE_STORAGE,
58 // Installation state variables
59 std::string widgetFilePath; ///< Source widget zip file
60 std::string tempWidgetPath; ///< Unpacked widget temporary path
61 WrtDB::WidgetRegisterInfo widgetConfig; ///< WidgetConfigInfo
62 DPL::Optional<WrtDB::DbWidgetHandle> widgetHandle;
63 Jobs::WidgetInstall::WacSecurity wacSecurity;///< Widget Domain information.
65 ///< flag that indicates whether installer starts to unzip .wgt file
67 ///< flag that indicates whether installer finishes to unzip completely.
68 InstallStep installStep; ///< current step of installation
69 Jobs::WidgetInstall::JobWidgetInstall *job;
70 ///< pointer of instance of JobWidgetInstall
71 WidgetUpdateInfo::ExistingWidgetInfo existingWidgetInfo;
72 ///< Whether this is an update or normal installation
73 Jobs::WidgetInstall::FeatureLogicPtr featureLogic;
74 /** List of dev-caps that get "static" permission (will always
75 * have PERMIT from ACE Policy). They will therefore receive
76 * static SMACK permission. (They may be forbidden because
77 * of ACE User Settings, but for now we do not protect this
78 * case with SMACK). */
79 std::set<DPL::String> staticPermittedDevCaps;
82 #endif // INSTALLER_CONTEXT_H