diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
|---|---|---|
| committer | <> | 2014-05-08 15:03:54 +0000 |
| commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
| tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Main/include/ApplianceImplPrivate.h | |
| parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
| download | VirtualBox-master.tar.gz | |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Main/include/ApplianceImplPrivate.h')
| -rw-r--r-- | src/VBox/Main/include/ApplianceImplPrivate.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/VBox/Main/include/ApplianceImplPrivate.h b/src/VBox/Main/include/ApplianceImplPrivate.h index ee2f39d8..d36754a3 100644 --- a/src/VBox/Main/include/ApplianceImplPrivate.h +++ b/src/VBox/Main/include/ApplianceImplPrivate.h @@ -1,10 +1,9 @@ /** @file - * * VirtualBox Appliance private data definitions */ /* - * Copyright (C) 2006-2010 Oracle Corporation + * Copyright (C) 2006-2013 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -21,6 +20,7 @@ class VirtualSystemDescription; #include "ovfreader.h" +#include <map> //////////////////////////////////////////////////////////////////////////////// // @@ -47,11 +47,13 @@ struct LocationInfo struct Appliance::Data { enum ApplianceState { ApplianceIdle, ApplianceImporting, ApplianceExporting }; + enum digest_T {SHA1, SHA256}; Data() : state(ApplianceIdle) , fManifest(true) , fSha256(false) + , fExportISOImages(false) , pReader(NULL) , ulWeightForXmlOperation(0) , ulWeightForManifestOperation(0) @@ -74,7 +76,12 @@ struct Appliance::Data LocationInfo locInfo; // location info for the currently processed OVF bool fManifest; // Create a manifest file on export bool fSha256; // true = SHA256 (OVF 2.0), false = SHA1 (OVF 1.0) - RTCList<ImportOptions_T> optList; + Utf8Str strOVFSHADigest;//SHA digest of OVf file. It is stored here after reading OVF file (before import) + + bool fExportISOImages;// when 1 the ISO images are exported + + RTCList<ImportOptions_T> optListImport; + RTCList<ExportOptions_T> optListExport; ovf::OVFReader *pReader; @@ -87,7 +94,6 @@ struct Appliance::Data ULONG ulWeightForManifestOperation; ULONG ulTotalDisksMB; ULONG cDisks; - Utf8Str strOVFSHADigest; std::list<Guid> llGuidsMachinesCreated; }; @@ -115,7 +121,7 @@ struct Appliance::TaskOVF taskType(aType), locInfo(aLocInfo), pProgress(aProgress), - enFormat(unspecified), + enFormat(ovf::OVFVersion_unknown), rc(S_OK) {} @@ -128,7 +134,7 @@ struct Appliance::TaskOVF const LocationInfo locInfo; ComObjPtr<Progress> pProgress; - OVFFormat enFormat; + ovf::OVFVersion_T enFormat; HRESULT rc; }; @@ -221,10 +227,11 @@ struct VirtualSystemDescription::Data void convertCIMOSType2VBoxOSType(Utf8Str &strType, ovf::CIMOSType_T c, const Utf8Str &cStr); -ovf::CIMOSType_T convertVBoxOSType2CIMOSType(const char *pcszVbox); +ovf::CIMOSType_T convertVBoxOSType2CIMOSType(const char *pcszVBox, BOOL fLongMode); Utf8Str convertNetworkAttachmentTypeToString(NetworkAttachmentType_T type); + typedef struct SHASTORAGE { PVDINTERFACE pVDImageIfaces; @@ -238,6 +245,7 @@ PVDINTERFACEIO FileCreateInterface(); PVDINTERFACEIO TarCreateInterface(); int ShaReadBuf(const char *pcszFilename, void **ppvBuf, size_t *pcbSize, PVDINTERFACEIO pIfIo, void *pvUser); int ShaWriteBuf(const char *pcszFilename, void *pvBuf, size_t cbSize, PVDINTERFACEIO pIfIo, void *pvUser); - -#endif // ____H_APPLIANCEIMPLPRIVATE +int decompressImageAndSave(const char *pcszFullFilenameIn, const char *pcszFullFilenameOut, PVDINTERFACEIO pIfIo, void *pvUser); +int copyFileAndCalcShaDigest(const char *pcszSourceFilename, const char *pcszTargetFilename, PVDINTERFACEIO pIfIo, void *pvUser); +#endif // !____H_APPLIANCEIMPLPRIVATE |
