0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync/** @file
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * VirtualBox Appliance private data definitions
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync */
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
1fc4561a433b348111f6943d9bcf8ac784a2b3b0vboxsync/*
1fc4561a433b348111f6943d9bcf8ac784a2b3b0vboxsync * Copyright (C) 2006-2013 Oracle Corporation
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync *
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * available from http://www.virtualbox.org. This file is free software;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * you can redistribute it and/or modify it under the terms of the GNU
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * General Public License (GPL) as published by the Free Software
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync */
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync#ifndef ____H_APPLIANCEIMPLPRIVATE
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync#define ____H_APPLIANCEIMPLPRIVATE
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
4651430e55b9df9726347e3e3968618e540fe729vboxsyncclass VirtualSystemDescription;
4651430e55b9df9726347e3e3968618e540fe729vboxsync
d5bf937d132098565e18a0d1fc408fb777c5e5b6vboxsync#include "ovfreader.h"
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync#include "SecretKeyStore.h"
37e4655312fa6433c756cfa05a4db6b72e0c4344vboxsync#include <map>
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync#include <vector>
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsync#include <iprt/vfs.h>
d5bf937d132098565e18a0d1fc408fb777c5e5b6vboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync////////////////////////////////////////////////////////////////////////////////
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync//
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync// Appliance data definition
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync//
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync////////////////////////////////////////////////////////////////////////////////
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
382dd16193dd5770e53a99d3e3f3bc4e96f1ddd8vboxsynctypedef std::pair<Utf8Str, Utf8Str> STRPAIR;
382dd16193dd5770e53a99d3e3f3bc4e96f1ddd8vboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync/* Describe a location for the import/export. The location could be a file on a
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * local hard disk or a remote target based on the supported inet protocols. */
76f5d3db08b007661ae4af93200838d24683af52vboxsyncstruct LocationInfo
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync{
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync LocationInfo()
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync : storageType(VFSType_File) {}
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync VFSType_T storageType; /* Which type of storage should be handled */
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync Utf8Str strPath; /* File path for the import/export */
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync Utf8Str strHostname; /* Hostname on remote storage locations (could be empty) */
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync Utf8Str strUsername; /* Username on remote storage locations (could be empty) */
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync Utf8Str strPassword; /* Password on remote storage locations (could be empty) */
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync};
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync// opaque private instance data of Appliance class
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsyncstruct Appliance::Data
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync{
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync enum ApplianceState { ApplianceIdle, ApplianceImporting, ApplianceExporting };
a536b4958564d95ba9fb795645a7b876e6b409edvboxsync enum digest_T {SHA1, SHA256};
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync Data()
231051c77670a4142b7545d51bd2251ae603189dvboxsync : state(ApplianceIdle)
231051c77670a4142b7545d51bd2251ae603189dvboxsync , fManifest(true)
454ac5c6ef4960887035ceea6b5247789d3272davboxsync , fSha256(false)
89d62ba649bc933540aa6fecf95712eed480bcd2vboxsync , fExportISOImages(false)
231051c77670a4142b7545d51bd2251ae603189dvboxsync , pReader(NULL)
76f5d3db08b007661ae4af93200838d24683af52vboxsync , ulWeightForXmlOperation(0)
76f5d3db08b007661ae4af93200838d24683af52vboxsync , ulWeightForManifestOperation(0)
76f5d3db08b007661ae4af93200838d24683af52vboxsync , ulTotalDisksMB(0)
76f5d3db08b007661ae4af93200838d24683af52vboxsync , cDisks(0)
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync , m_cPwProvided(0)
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync {
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync }
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync ~Data()
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync {
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync if (pReader)
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync {
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync delete pReader;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync pReader = NULL;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync }
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync }
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync ApplianceState state;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync LocationInfo locInfo; // location info for the currently processed OVF
231051c77670a4142b7545d51bd2251ae603189dvboxsync bool fManifest; // Create a manifest file on export
454ac5c6ef4960887035ceea6b5247789d3272davboxsync bool fSha256; // true = SHA256 (OVF 2.0), false = SHA1 (OVF 1.0)
8dfc5e89cd3421bb0602f33768f00c1f1d40b1d2vboxsync Utf8Str strOVFSHADigest;//SHA digest of OVf file. It is stored here after reading OVF file (before import)
a536b4958564d95ba9fb795645a7b876e6b409edvboxsync
89d62ba649bc933540aa6fecf95712eed480bcd2vboxsync bool fExportISOImages;// when 1 the ISO images are exported
e96d318f28bf3515ea62273df31c0212313fa5abvboxsync bool fX509;// wether X509 is used or not
89d62ba649bc933540aa6fecf95712eed480bcd2vboxsync
17b671c398282d40167af7a32adf2d51f2ad0ef0vboxsync RTCList<ImportOptions_T> optListImport;
17b671c398282d40167af7a32adf2d51f2ad0ef0vboxsync RTCList<ExportOptions_T> optListExport;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync ovf::OVFReader *pReader;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync std::list< ComObjPtr<VirtualSystemDescription> >
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync virtualSystemDescriptions;
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync std::list<Utf8Str> llWarnings;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync ULONG ulWeightForXmlOperation;
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync ULONG ulWeightForManifestOperation;
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync ULONG ulTotalDisksMB;
b2a9ade0eaa3c7b26c02cc05f83c352cafb9e03avboxsync ULONG cDisks;
22ea904a6fe5c95f54c4374502747cc844ce8204vboxsync
22ea904a6fe5c95f54c4374502747cc844ce8204vboxsync std::list<Guid> llGuidsMachinesCreated;
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync /** Sequence of password identifiers to encrypt disk images during export. */
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync std::vector<com::Utf8Str> m_vecPasswordIdentifiers;
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync /** Secret key store used to hold the passwords during export. */
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync SecretKeyStore *m_pSecretKeyStore;
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync /** Number of passwords provided. */
20281e6ab7ca197da1faf8f339be13d2f0e39b6dvboxsync uint32_t m_cPwProvided;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync};
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsyncstruct Appliance::XMLStack
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync{
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync std::map<Utf8Str, const VirtualSystemDescriptionEntry*> mapDisks;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync std::map<Utf8Str, bool> mapNetworks;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync};
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsyncstruct Appliance::TaskOVF
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync{
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync enum TaskType
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync {
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync Read,
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync Import,
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync Write
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync };
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync TaskOVF(Appliance *aThat,
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync TaskType aType,
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync LocationInfo aLocInfo,
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync ComObjPtr<Progress> &aProgress)
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync : pAppliance(aThat),
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync taskType(aType),
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync locInfo(aLocInfo),
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync pProgress(aProgress),
62c8fef246519d59ee7ad41dd71de75b96b3552bvboxsync enFormat(ovf::OVFVersion_unknown),
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync rc(S_OK)
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync {}
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync static int updateProgress(unsigned uPercent, void *pvUser);
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync
70f440c36dd35f51548b0052babb3c4412c3f054vboxsync HRESULT startThread();
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync Appliance *pAppliance;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync TaskType taskType;
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync const LocationInfo locInfo;
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync ComObjPtr<Progress> pProgress;
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync
62c8fef246519d59ee7ad41dd71de75b96b3552bvboxsync ovf::OVFVersion_T enFormat;
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync HRESULT rc;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync};
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsyncstruct MyHardDiskAttachment
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync{
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync ComPtr<IMachine> pMachine;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync Bstr controllerType;
15760030457c4d8548d42a9d543646b27eae7040vboxsync int32_t lControllerPort; // 0-29 for SATA
15760030457c4d8548d42a9d543646b27eae7040vboxsync int32_t lDevice; // IDE: 0 or 1, otherwise 0 always
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync};
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
fbf482cad760a830bc8789ad639162019954ba80vboxsync/**
fbf482cad760a830bc8789ad639162019954ba80vboxsync * Used by Appliance::importMachineGeneric() to store
fbf482cad760a830bc8789ad639162019954ba80vboxsync * input parameters and rollback information.
fbf482cad760a830bc8789ad639162019954ba80vboxsync */
fbf482cad760a830bc8789ad639162019954ba80vboxsyncstruct Appliance::ImportStack
fbf482cad760a830bc8789ad639162019954ba80vboxsync{
fbf482cad760a830bc8789ad639162019954ba80vboxsync // input pointers
fbf482cad760a830bc8789ad639162019954ba80vboxsync const LocationInfo &locInfo; // ptr to location info from Appliance::importFS()
fbf482cad760a830bc8789ad639162019954ba80vboxsync Utf8Str strSourceDir; // directory where source files reside
fbf482cad760a830bc8789ad639162019954ba80vboxsync const ovf::DiskImagesMap &mapDisks; // ptr to disks map in OVF
fbf482cad760a830bc8789ad639162019954ba80vboxsync ComObjPtr<Progress> &pProgress; // progress object passed into Appliance::importFS()
fbf482cad760a830bc8789ad639162019954ba80vboxsync
fbf482cad760a830bc8789ad639162019954ba80vboxsync // input parameters from VirtualSystemDescriptions
fbf482cad760a830bc8789ad639162019954ba80vboxsync Utf8Str strNameVBox; // VM name
9ff5b937cfc7a0832f0d8f52ab642193c2a0670avboxsync Utf8Str strMachineFolder; // FQ host folder where the VirtualBox machine would be created
fbf482cad760a830bc8789ad639162019954ba80vboxsync Utf8Str strOsTypeVBox; // VirtualBox guest OS type as string
96eb45983d3cdab98da24ba9a31ef0c6e6021a77vboxsync Utf8Str strDescription;
fbf482cad760a830bc8789ad639162019954ba80vboxsync uint32_t cCPUs; // CPU count
fbf482cad760a830bc8789ad639162019954ba80vboxsync bool fForceHWVirt; // if true, we force enabling hardware virtualization
fbf482cad760a830bc8789ad639162019954ba80vboxsync bool fForceIOAPIC; // if true, we force enabling the IOAPIC
382dd16193dd5770e53a99d3e3f3bc4e96f1ddd8vboxsync uint32_t ulMemorySizeMB; // virtual machine RAM in megabytes
fbf482cad760a830bc8789ad639162019954ba80vboxsync#ifdef VBOX_WITH_USB
fbf482cad760a830bc8789ad639162019954ba80vboxsync bool fUSBEnabled;
fbf482cad760a830bc8789ad639162019954ba80vboxsync#endif
fbf482cad760a830bc8789ad639162019954ba80vboxsync Utf8Str strAudioAdapter; // if not empty, then the guest has audio enabled, and this is the decimal
fbf482cad760a830bc8789ad639162019954ba80vboxsync // representation of the audio adapter (should always be "0" for AC97 presently)
fbf482cad760a830bc8789ad639162019954ba80vboxsync
fbf482cad760a830bc8789ad639162019954ba80vboxsync // session (not initially created)
fbf482cad760a830bc8789ad639162019954ba80vboxsync ComPtr<ISession> pSession; // session opened in Appliance::importFS() for machine manipulation
fbf482cad760a830bc8789ad639162019954ba80vboxsync bool fSessionOpen; // true if the pSession is currently open and needs closing
fbf482cad760a830bc8789ad639162019954ba80vboxsync
fbf482cad760a830bc8789ad639162019954ba80vboxsync // a list of images that we created/imported; this is initially empty
fbf482cad760a830bc8789ad639162019954ba80vboxsync // and will be cleaned up on errors
fbf482cad760a830bc8789ad639162019954ba80vboxsync std::list<MyHardDiskAttachment> llHardDiskAttachments; // disks that were attached
382dd16193dd5770e53a99d3e3f3bc4e96f1ddd8vboxsync std::list<STRPAIR> llSrcDisksDigest; // Digests of the source disks
e96d318f28bf3515ea62273df31c0212313fa5abvboxsync std::map<Utf8Str , Utf8Str> mapNewUUIDsToOriginalUUIDs;
fbf482cad760a830bc8789ad639162019954ba80vboxsync
fbf482cad760a830bc8789ad639162019954ba80vboxsync ImportStack(const LocationInfo &aLocInfo,
fbf482cad760a830bc8789ad639162019954ba80vboxsync const ovf::DiskImagesMap &aMapDisks,
fbf482cad760a830bc8789ad639162019954ba80vboxsync ComObjPtr<Progress> &aProgress)
fbf482cad760a830bc8789ad639162019954ba80vboxsync : locInfo(aLocInfo),
fbf482cad760a830bc8789ad639162019954ba80vboxsync mapDisks(aMapDisks),
fbf482cad760a830bc8789ad639162019954ba80vboxsync pProgress(aProgress),
fbf482cad760a830bc8789ad639162019954ba80vboxsync cCPUs(1),
fbf482cad760a830bc8789ad639162019954ba80vboxsync fForceHWVirt(false),
fbf482cad760a830bc8789ad639162019954ba80vboxsync fForceIOAPIC(false),
fbf482cad760a830bc8789ad639162019954ba80vboxsync ulMemorySizeMB(0),
fbf482cad760a830bc8789ad639162019954ba80vboxsync fSessionOpen(false)
fbf482cad760a830bc8789ad639162019954ba80vboxsync {
fbf482cad760a830bc8789ad639162019954ba80vboxsync // disk images have to be on the same place as the OVF file. So
fbf482cad760a830bc8789ad639162019954ba80vboxsync // strip the filename out of the full file path
fbf482cad760a830bc8789ad639162019954ba80vboxsync strSourceDir = aLocInfo.strPath;
fbf482cad760a830bc8789ad639162019954ba80vboxsync strSourceDir.stripFilename();
fbf482cad760a830bc8789ad639162019954ba80vboxsync }
e96d318f28bf3515ea62273df31c0212313fa5abvboxsync
e96d318f28bf3515ea62273df31c0212313fa5abvboxsync HRESULT restoreOriginalUUIDOfAttachedDevice(settings::MachineConfigFile *config);
e96d318f28bf3515ea62273df31c0212313fa5abvboxsync HRESULT saveOriginalUUIDOfAttachedDevice(settings::AttachedDevice &device,
e96d318f28bf3515ea62273df31c0212313fa5abvboxsync const Utf8Str &newlyUuid);
fbf482cad760a830bc8789ad639162019954ba80vboxsync};
fbf482cad760a830bc8789ad639162019954ba80vboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync////////////////////////////////////////////////////////////////////////////////
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync//
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync// VirtualSystemDescription data definition
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync//
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync////////////////////////////////////////////////////////////////////////////////
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsyncstruct VirtualSystemDescription::Data
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync{
4b8518be25a866f7de85889a2d827d7a479e1411vboxsync std::vector<VirtualSystemDescriptionEntry>
4b8518be25a866f7de85889a2d827d7a479e1411vboxsync maDescriptions; // item descriptions
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync ComPtr<Machine> pMachine; // VirtualBox machine this description was exported from (export only)
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync settings::MachineConfigFile
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync *pConfig; // machine config created from <vbox:Machine> element if found (import only)
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync};
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync////////////////////////////////////////////////////////////////////////////////
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync//
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync// Internal helpers
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync//
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync////////////////////////////////////////////////////////////////////////////////
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
d5bf937d132098565e18a0d1fc408fb777c5e5b6vboxsyncvoid convertCIMOSType2VBoxOSType(Utf8Str &strType, ovf::CIMOSType_T c, const Utf8Str &cStr);
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
3455d9b135d41903504b9be3f4eeaa038f6ee03avboxsyncovf::CIMOSType_T convertVBoxOSType2CIMOSType(const char *pcszVBox, BOOL fLongMode);
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync
7fa9b0ac0a9faf4aedbd3b53aa0cb2b81be99ee6vboxsyncUtf8Str convertNetworkAttachmentTypeToString(NetworkAttachmentType_T type);
7fa9b0ac0a9faf4aedbd3b53aa0cb2b81be99ee6vboxsync
37e4655312fa6433c756cfa05a4db6b72e0c4344vboxsync
454ac5c6ef4960887035ceea6b5247789d3272davboxsynctypedef struct SHASTORAGE
8a99522dee886d4ed00c8cd18788e9e722febd71vboxsync{
8a99522dee886d4ed00c8cd18788e9e722febd71vboxsync PVDINTERFACE pVDImageIfaces;
8a99522dee886d4ed00c8cd18788e9e722febd71vboxsync bool fCreateDigest;
454ac5c6ef4960887035ceea6b5247789d3272davboxsync bool fSha256; /* false = SHA1 (OVF 1.x), true = SHA256 (OVF 2.0) */
8a99522dee886d4ed00c8cd18788e9e722febd71vboxsync Utf8Str strDigest;
454ac5c6ef4960887035ceea6b5247789d3272davboxsync} SHASTORAGE, *PSHASTORAGE;
badc6d0a88e64de11285f73127a7e1651b69a00bvboxsync
454ac5c6ef4960887035ceea6b5247789d3272davboxsyncPVDINTERFACEIO ShaCreateInterface();
badc6d0a88e64de11285f73127a7e1651b69a00bvboxsyncPVDINTERFACEIO FileCreateInterface();
002d7ae66604b9988f5d9d926bb6e07d7b8752d5vboxsyncPVDINTERFACEIO tarWriterCreateInterface(void);
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsync
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsync/** Pointer to the instance data for the fssRdOnly_ methods. */
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsynctypedef struct FSSRDONLYINTERFACEIO *PFSSRDONLYINTERFACEIO;
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsync
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsyncint fssRdOnlyCreateInterfaceForTarFile(const char *pszFilename, PFSSRDONLYINTERFACEIO *pTarIo);
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsyncvoid fssRdOnlyDestroyInterface(PFSSRDONLYINTERFACEIO pFssIo);
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsyncint fssRdOnlyGetCurrentName(PFSSRDONLYINTERFACEIO pFssIo, const char **ppszName);
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsyncint fssRdOnlySkipCurrent(PFSSRDONLYINTERFACEIO pFssIo);
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsyncbool fssRdOnlyIsCurrentDirectory(PFSSRDONLYINTERFACEIO pFssIo);
10d107ae26d5e0a2293a693fe270427c6d96ba7dvboxsync
b05c756b0ff8732063fb867b843dc8bb4d1b940cvboxsyncint readFileIntoBuffer(const char *pcszFilename, void **ppvBuf, size_t *pcbSize, PVDINTERFACEIO pIfIo, void *pvUser);
b05c756b0ff8732063fb867b843dc8bb4d1b940cvboxsyncint writeBufferToFile(const char *pcszFilename, void *pvBuf, size_t cbSize, PVDINTERFACEIO pIfIo, void *pvUser);
ceec11f70ccba5b30ce0a34c66116a09155aeb6evboxsyncint decompressImageAndSave(const char *pcszFullFilenameIn, const char *pcszFullFilenameOut, PVDINTERFACEIO pIfIo, void *pvUser);
f1402a86e0083817dc2a063eeaf8388a221ff326vboxsyncint copyFileAndCalcShaDigest(const char *pcszSourceFilename, const char *pcszTargetFilename, PVDINTERFACEIO pIfIo, void *pvUser);
a232d881522e92876b3870985382aee4d2d4f211vboxsync#endif // !____H_APPLIANCEIMPLPRIVATE
8a99522dee886d4ed00c8cd18788e9e722febd71vboxsync