2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file InstallerContext.h
19 * @brief This is the header file for the %InstallerContext class.
21 * This header file contains the declarations of the %InstallerContext class.
23 #ifndef _INSTALLATION_CONTEXT_H_
24 #define _INSTALLATION_CONTEXT_H_
26 #include <app2ext_interface.h>
28 #include <FAppPackageInfo.h>
29 #include <FSecCertX509CertificatePath.h>
31 #include "InstallerDefs.h"
32 #include "IInstallationStep.h"
33 #include "DrmLicense.h"
35 class IInstallationStep;
38 * @class InstallationContext
39 * @brief This class represents the class of InstallationContext.
42 * This class represents the class of InstallationContext.
45 class InstallationContext
48 enum InstallationStorage
50 INSTALLATION_STORAGE_INTERNAL,
51 INSTALLATION_STORAGE_EXTERNAL,
54 InstallationContext(void);
55 virtual ~InstallationContext(void);
56 InstallerError Construct(void);
58 bool ChangeStep(InstallationStep step);
59 InstallerError Run(void);
61 InstallationStep GetCurrentInstallationStep(void);
62 void SetCurrentInstallationStep(InstallationStep step);
64 InstallerError GetError(void);
65 void SetError(InstallerError installerError);
67 InstallationState GetState(void);
68 void SetState(InstallationState installationState);
70 IInstallationStep* GetStep(void);
72 void SetInputPath(const Osp::Base::String& path);
73 const Osp::Base::String& GetInputPath(void) const;
75 void SetInstallerOperation(InstallerOperation op);
76 InstallerOperation GetInstallerOperation(void) const;
78 void SetInstallationStorage(InstallationStorage storage);
79 InstallationStorage GetInstallationStorage(void) const;
81 bool IsContinue(void);
82 void SetContinue(bool cont);
84 bool IsPreloaded(void);
85 void SetPreloaded(bool preloaded);
87 bool IsHybridService(void);
88 void SetHybridService(bool hybridService);
90 const Osp::Base::String& GetPackagePath(void) const;
91 void SetPackagePath(const Osp::Base::String& packagePath);
93 const Osp::Base::String& GetLicensePath(void) const;
94 void SetLicensePath(const Osp::Base::String& licensePath);
96 const Osp::Base::String& GetTemporaryDir(void) const;
97 void SetTemporaryDir(const Osp::Base::String& temporaryDir);
99 const Osp::Base::String& GetInstallDir(void) const;
100 void SetInstallDir(const Osp::Base::String& installDir);
102 const Osp::Base::String& GetWorkingDir(void) const;
103 void SetWorkingDir(const Osp::Base::String& workingDir);
105 const Osp::Base::String& GetAppId(void) const;
106 void SetAppId(const Osp::Base::String& appId);
108 const Osp::Base::String& GetAppVersion(void) const;
109 void SetAppVersion(const Osp::Base::String& appVersion);
111 Osp::Base::String GetManifestXmlPath(void);
112 Osp::Base::String GetSignatureXmlPath(void);
113 Osp::Base::String GetAuthorSignatureXmlPath(void);
115 const Osp::Base::Collection::ArrayList* GetPrivilegeList(void) const;
116 void SetPrivilegeList(Osp::Base::Collection::ArrayList* privilegeList);
118 Osp::Base::Collection::ArrayList* GetLiveBoxList(void) const;
119 void SetLiveBoxList(Osp::Base::Collection::ArrayList* pLiveBoxList);
121 Osp::Base::Collection::ArrayList* GetContentInfoList(void) const;
122 void SetContentInfoList(Osp::Base::Collection::ArrayList* pContentInfoList);
124 Osp::Security::Cert::X509CertificatePath* GetAuthorCertPath(void) const;
125 void SetAuthorCertPath(Osp::Security::Cert::X509CertificatePath* pAuthorCertPath);
127 Osp::Security::Cert::X509CertificatePath* GetDistributorCertPath(void) const;
128 void SetDistributorCertPath(Osp::Security::Cert::X509CertificatePath* pDistributorCertPath);
130 RootCertificateType GetRootCertType(void) const;
131 void SetRootCertType(RootCertificateType certType);
133 int GetPackageNameType(void) const;
134 void SetPackageNameType(int type);
136 app2ext_handle* GetApp2ExtHandle(void) const;
137 void SetApp2ExtHandle(app2ext_handle* pHandle);
139 Osp::App::_PackageInfoImpl* GetPackageInfoImpl(void) const;
142 InstallationContext(const InstallationContext& value);
143 InstallationContext& operator =(const InstallationContext& source);
145 IInstallationStep* __pStep;
146 DrmLicense* __pDrmLicense;
147 InstallerError __error;
148 InstallationStep __step;
150 InstallationState __state;
154 bool __hybridService;
156 Osp::Base::String __inputPath;
157 InstallerOperation __operation;
158 InstallationStorage __storage;
160 Osp::Base::String __packagePath;
161 Osp::Base::String __licensePath;
162 Osp::Base::String __temporaryDir;
163 Osp::Base::String __installDir;
164 Osp::Base::String __workingDir;
165 Osp::Base::String __appId;
166 Osp::Base::String __appVersion;
167 Osp::Base::String __appRootPath;
169 Osp::Base::Collection::ArrayList* __pPrivilegeList;
170 Osp::Base::Collection::ArrayList* __pLiveBoxList;
171 Osp::Base::Collection::ArrayList* __pContentInfoList;
172 Osp::Security::Cert::X509CertificatePath* __pAuthorCertPath;
173 Osp::Security::Cert::X509CertificatePath* __pDistributorCertPath;
174 RootCertificateType __rootCertType;
176 int __packageNameType;
177 app2ext_handle* __pApp2ExtHandle;
179 Osp::App::_PackageInfoImpl* __pPackageInfoImpl;
181 }; // InstallationContext
184 : public Osp::Base::Object
188 virtual ~LiveboxInfo(void);
190 result SetUpdatePeriod(long long period);
191 long long GetUpdatePeriod(void) const;
193 result SetPopupEnabled(const Osp::Base::String& value);
194 const Osp::Base::String& GetPopupEnabled(void) const;
196 result SetIcon(const Osp::Base::String& icon);
197 const Osp::Base::String& GetIcon(void) const;
199 result AddName(const Osp::Base::String& language, const Osp::Base::String& name);
200 Osp::Base::Collection::HashMap* GetNameList(void) const;
202 result AddSize(const Osp::Base::String& size);
203 Osp::Base::Collection::ArrayList* GetSizeList(void) const;
206 LiveboxInfo(const LiveboxInfo& value);
207 LiveboxInfo& operator =(const LiveboxInfo& source);
209 long long __updatePeriod;
210 Osp::Base::String __popupEnabled;
211 Osp::Base::String __icon;
213 Osp::Base::Collection::HashMap* __pNameList;
214 Osp::Base::Collection::ArrayList* __pSizeList;
219 : public Osp::Base::Object
223 virtual ~ContentInfo(void);
225 result SetContentId(const Osp::Base::String& contentId);
226 const Osp::Base::String& GetContentId(void) const;
228 result SetIcon(const Osp::Base::String& icon);
229 const Osp::Base::String& GetIcon(void) const;
231 result AddName(const Osp::Base::String& language, const Osp::Base::String& name);
232 Osp::Base::Collection::HashMap* GetNameList(void) const;
235 ContentInfo(const ContentInfo& value);
236 ContentInfo& operator =(const ContentInfo& source);
238 Osp::Base::String __icon;
239 Osp::Base::String __contentId;
241 Osp::Base::Collection::HashMap* __pNameList;
245 #endif // _INSTALLATION_CONTEXT_H_