ApplianceImpl.h revision c7a378ed2fbad681c0b674351d698ef20a368935
/* $Id$ */
/** @file
*
* VirtualBox COM class implementation
*/
/*
* Copyright (C) 2006-2009 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_APPLIANCEIMPL
#define ____H_APPLIANCEIMPL
/* VBox includes */
#include "VirtualBoxBase.h"
/* Todo: This file needs massive cleanup. Split IAppliance in a public and
* private classes. */
/* VBox forward declarations */
struct VirtualSystemDescriptionEntry;
struct LocationInfo;
typedef struct VDINTERFACE *PVDINTERFACE;
typedef struct VDINTERFACEIO *PVDINTERFACEIO;
typedef struct SHA1STORAGE *PSHA1STORAGE;
{
struct HardDiskController;
struct VirtualSystem;
struct DiskImage;
}
{
}
{
}
{
enum OVFFormat
{
};
// public initializer/uninitializer for internal purposes only
void uninit();
/* IAppliance properties */
STDMETHOD(COMGETTER(VirtualSystemDescriptions))(ComSafeArrayOut(IVirtualSystemDescription*, aVirtualSystemDescriptions));
/* IAppliance methods */
/* Import methods */
/* Export methods */
/* public methods only for internal purposes */
{
return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
}
/* private instance data */
/** weak VirtualBox parent */
VirtualBox* const mVirtualBox;
struct ImportStack;
struct TaskOVF;
struct Data; // opaque, defined in ApplianceImpl.cpp
Data *m;
/*******************************************************************************
* General stuff
******************************************************************************/
bool isApplianceIdle();
const Bstr &bstrDescription,
void addWarning(const char* aWarning, ...);
void disksWeight();
/*******************************************************************************
* Read stuff
******************************************************************************/
/*******************************************************************************
* Import stuff
******************************************************************************/
HRESULT readManifestFile(const Utf8Str &strFile, void **ppvBuf, size_t *pcbSize, PVDINTERFACEIO pCallbacks, PSHA1STORAGE pStorage);
HRESULT readTarManifestFile(RTTAR tar, const Utf8Str &strFile, void **ppvBuf, size_t *pcbSize, PVDINTERFACEIO pCallbacks, PSHA1STORAGE pStorage);
const Utf8Str &strTargetPath,
/*******************************************************************************
* Write stuff
******************************************************************************/
HRESULT writeFSImpl(TaskOVF *pTask, AutoWriteLockBase& writeLock, PVDINTERFACEIO pCallbacks, PSHA1STORAGE pStorage);
struct XMLStack;
void buildXML(AutoWriteLockBase& writeLock, xml::Document &doc, XMLStack &stack, const Utf8Str &strPath, OVFFormat enFormat);
};
{
Utf8Str strVboxSuggested; // configuration value (type-dependent); original value suggested by interpret()
Utf8Str strVboxCurrent; // configuration value (type-dependent); current value, either from interpret() or setFinalValue()
Utf8Str strExtraConfigSuggested; // extra configuration key=value strings (type-dependent); original value suggested by interpret()
Utf8Str strExtraConfigCurrent; // extra configuration key=value strings (type-dependent); current value, either from interpret() or setFinalValue()
};
{
// public initializer/uninitializer for internal purposes only
void uninit();
/* IVirtualSystemDescription properties */
/* IVirtualSystemDescription methods */
/* public methods only for internal purposes */
const Utf8Str &aVboxValue,
/* private instance data */
struct Data;
Data *m;
};
#endif // ____H_APPLIANCEIMPL
/* vi: set tabstop=4 shiftwidth=4 expandtab: */