/** @file
* VirtualBox Appliance private data definitions
*/
/*
* 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;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ____H_APPLIANCEIMPLPRIVATE
#define ____H_APPLIANCEIMPLPRIVATE
#include "ovfreader.h"
#include "SecretKeyStore.h"
#include <map>
#include <vector>
////////////////////////////////////////////////////////////////////////////////
//
// Appliance data definition
//
////////////////////////////////////////////////////////////////////////////////
* local hard disk or a remote target based on the supported inet protocols. */
struct LocationInfo
{
: storageType(VFSType_File) {}
};
// opaque private instance data of Appliance class
{
Data()
, fManifest(true)
, fSha256(false)
, fExportISOImages(false)
, ulTotalDisksMB(0)
, cDisks(0)
, m_cPwProvided(0)
{
}
~Data()
{
if (pReader)
{
}
}
Utf8Str strOVFSHADigest;//SHA digest of OVf file. It is stored here after reading OVF file (before import)
/** Sequence of password identifiers to encrypt disk images during export. */
/** Secret key store used to hold the passwords during export. */
/** Number of passwords provided. */
};
{
};
{
enum TaskType
{
Read,
};
: pAppliance(aThat),
{}
};
struct MyHardDiskAttachment
{
};
/**
* Used by Appliance::importMachineGeneric() to store
* input parameters and rollback information.
*/
{
// input pointers
// input parameters from VirtualSystemDescriptions
#ifdef VBOX_WITH_USB
bool fUSBEnabled;
#endif
// representation of the audio adapter (should always be "0" for AC97 presently)
// session (not initially created)
// and will be cleaned up on errors
cCPUs(1),
fForceHWVirt(false),
fForceIOAPIC(false),
ulMemorySizeMB(0),
fSessionOpen(false)
{
// disk images have to be on the same place as the OVF file. So
// strip the filename out of the full file path
}
};
////////////////////////////////////////////////////////////////////////////////
//
// VirtualSystemDescription data definition
//
////////////////////////////////////////////////////////////////////////////////
{
};
////////////////////////////////////////////////////////////////////////////////
//
// Internal helpers
//
////////////////////////////////////////////////////////////////////////////////
typedef struct SHASTORAGE
{
bool fCreateDigest;
/** Pointer to the instance data for the fssRdOnly_ methods. */
int readFileIntoBuffer(const char *pcszFilename, void **ppvBuf, size_t *pcbSize, PVDINTERFACEIO pIfIo, void *pvUser);
int writeBufferToFile(const char *pcszFilename, void *pvBuf, size_t cbSize, PVDINTERFACEIO pIfIo, void *pvUser);
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