ApplianceImplPrivate.h revision 8ae161fca703d669e1306fafee128914f831f72b
af062818b47340eef15700d2f0211576ba3506eevboxsync * VirtualBox Appliance private data definitions
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright (C) 2006-2010 Oracle Corporation
af062818b47340eef15700d2f0211576ba3506eevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync * available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync * you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync * General Public License (GPL) as published by the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
af062818b47340eef15700d2f0211576ba3506eevboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync////////////////////////////////////////////////////////////////////////////////
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync// Appliance data definition
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync////////////////////////////////////////////////////////////////////////////////
af062818b47340eef15700d2f0211576ba3506eevboxsync/* Describe a location for the import/export. The location could be a file on a
af062818b47340eef15700d2f0211576ba3506eevboxsync * local hard disk or a remote target based on the supported inet protocols. */
af062818b47340eef15700d2f0211576ba3506eevboxsync VFSType_T storageType; /* Which type of storage should be handled */
af062818b47340eef15700d2f0211576ba3506eevboxsync Utf8Str strPath; /* File path for the import/export */
af062818b47340eef15700d2f0211576ba3506eevboxsync Utf8Str strHostname; /* Hostname on remote storage locations (could be empty) */
af062818b47340eef15700d2f0211576ba3506eevboxsync Utf8Str strUsername; /* Username on remote storage locations (could be empty) */
af062818b47340eef15700d2f0211576ba3506eevboxsync Utf8Str strPassword; /* Password on remote storage locations (could be empty) */
af062818b47340eef15700d2f0211576ba3506eevboxsync// opaque private instance data of Appliance class
af062818b47340eef15700d2f0211576ba3506eevboxsync enum ApplianceState { ApplianceIdle, ApplianceImporting, ApplianceExporting };
af062818b47340eef15700d2f0211576ba3506eevboxsync LocationInfo locInfo; // location info for the currently processed OVF
af062818b47340eef15700d2f0211576ba3506eevboxsync bool fManifest; // Create a manifest file on export
af062818b47340eef15700d2f0211576ba3506eevboxsync std::map<Utf8Str, const VirtualSystemDescriptionEntry*> mapDisks;
af062818b47340eef15700d2f0211576ba3506eevboxsync static int updateProgress(unsigned uPercent, void *pvUser);
af062818b47340eef15700d2f0211576ba3506eevboxsync int32_t lDevice; // IDE: 0 or 1, otherwise 0 always
af062818b47340eef15700d2f0211576ba3506eevboxsync * Used by Appliance::importMachineGeneric() to store
af062818b47340eef15700d2f0211576ba3506eevboxsync * input parameters and rollback information.
af062818b47340eef15700d2f0211576ba3506eevboxsync // input pointers
af062818b47340eef15700d2f0211576ba3506eevboxsync const LocationInfo &locInfo; // ptr to location info from Appliance::importFS()
af062818b47340eef15700d2f0211576ba3506eevboxsync Utf8Str strSourceDir; // directory where source files reside
af062818b47340eef15700d2f0211576ba3506eevboxsync const ovf::DiskImagesMap &mapDisks; // ptr to disks map in OVF
af062818b47340eef15700d2f0211576ba3506eevboxsync ComObjPtr<Progress> &pProgress; // progress object passed into Appliance::importFS()
af062818b47340eef15700d2f0211576ba3506eevboxsync // input parameters from VirtualSystemDescriptions
af062818b47340eef15700d2f0211576ba3506eevboxsync Utf8Str strMachineFolder; // FQ host folder where the VirtualBox machine would be created
af062818b47340eef15700d2f0211576ba3506eevboxsync Utf8Str strOsTypeVBox; // VirtualBox guest OS type as string
af062818b47340eef15700d2f0211576ba3506eevboxsync bool fForceHWVirt; // if true, we force enabling hardware virtualization
af062818b47340eef15700d2f0211576ba3506eevboxsync bool fForceIOAPIC; // if true, we force enabling the IOAPIC
af062818b47340eef15700d2f0211576ba3506eevboxsync uint32_t ulMemorySizeMB; // virtual machine RAM in megabytes
af062818b47340eef15700d2f0211576ba3506eevboxsync Utf8Str strAudioAdapter; // if not empty, then the guest has audio enabled, and this is the decimal
af062818b47340eef15700d2f0211576ba3506eevboxsync // representation of the audio adapter (should always be "0" for AC97 presently)
af062818b47340eef15700d2f0211576ba3506eevboxsync // session (not initially created)
af062818b47340eef15700d2f0211576ba3506eevboxsync ComPtr<ISession> pSession; // session opened in Appliance::importFS() for machine manipulation
af062818b47340eef15700d2f0211576ba3506eevboxsync bool fSessionOpen; // true if the pSession is currently open and needs closing
fForceHWVirt(false),
fForceIOAPIC(false),
ulMemorySizeMB(0),
fSessionOpen(false)
typedef struct SHA1STORAGE
bool fCreateDigest;
int Sha1ReadBuf(const char *pcszFilename, void **ppvBuf, size_t *pcbSize, PVDINTERFACEIO pCallbacks, void *pvUser);
int Sha1WriteBuf(const char *pcszFilename, void *pvBuf, size_t cbSize, PVDINTERFACEIO pCallbacks, void *pvUser);