MachineImpl.h revision 76ec2e155b8747bfb23fdd9cb156835cdf500631
1N/A * available from http://www.virtualbox.org. This file is free software;
1N/A#ifndef ____H_MACHINEIMPL
1N/A#define ____H_MACHINEIMPL
1N/A#include "VirtualBoxBase.h"
1N/A#include "SnapshotImpl.h"
1N/A#include "ProgressImpl.h"
1N/A#include "VRDEServerImpl.h"
1N/A#include "MediumAttachmentImpl.h"
1N/A#include "PciDeviceAttachmentImpl.h"
1N/A#include "MediumLock.h"
1N/A#include "NetworkAdapterImpl.h"
1N/A#include "AudioAdapterImpl.h"
1N/A#include "SerialPortImpl.h"
1N/A#include "ParallelPortImpl.h"
1N/A#include "BIOSSettingsImpl.h"
1N/A#include "BandwidthControlImpl.h"
1N/A#include "BandwidthGroupImpl.h"
1N/A#include "VBox/settings.h"
1N/A#include "Performance.h"
1N/A#include "PerformanceImpl.h"
1N/A#include "SchemaDefs.h"
1N/A#include "VBox/com/ErrorInfo.h"
#include <vector>
struct Snapshot;
struct Hardware;
struct Storage;
struct StorageController;
struct MachineRegistryEntry;
enum StateDependency
AnyStateDep = 0,
struct Data
struct Session
Data();
~Data();
struct SSData
struct UserData
struct HWData
struct GuestProperty {
HWData();
~HWData();
struct MediaData
MediaData();
~MediaData();
void FinalRelease();
// public initializer/uninitializer for internal purposes only:
bool fForceOverwrite);
void uninit();
#ifdef VBOX_WITH_RESOURCE_USAGE_API
void uninitDataAndChildObjects();
STDMETHOD(COMGETTER(StorageControllers))(ComSafeArrayOut(IStorageController *, aStorageControllers));
STDMETHOD(LaunchVMProcess)(ISession *aSession, IN_BSTR aType, IN_BSTR aEnvironment, IProgress **aProgress);
STDMETHOD(PassthroughDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aPassthrough);
STDMETHOD(TemporaryEjectDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aTempEject);
STDMETHOD(NonRotationalDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aNonRotational);
STDMETHOD(SetAutoDiscardForDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aDiscard);
STDMETHOD(Export)(IAppliance *aAppliance, IN_BSTR location, IVirtualSystemDescription **aDescription);
STDMETHOD(EnumerateGuestProperties)(IN_BSTR aPattern, ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(BSTR, aValues), ComSafeArrayOut(LONG64, aTimestamps), ComSafeArrayOut(BSTR, aFlags));
STDMETHOD(GetMediumAttachmentsOfController)(IN_BSTR aName, ComSafeArrayOut(IMediumAttachment *, aAttachments));
STDMETHOD(GetMediumAttachment)(IN_BSTR aConstrollerName, LONG aControllerPort, LONG aDevice, IMediumAttachment **aAttachment);
STDMETHOD(AddStorageController)(IN_BSTR aName, StorageBus_T aConnectionType, IStorageController **controller);
STDMETHOD(QuerySavedGuestScreenInfo)(ULONG uScreenId, ULONG *puOriginX, ULONG *puOriginY, ULONG *puWidth, ULONG *puHeight, BOOL *pfEnabled);
STDMETHOD(ReadSavedThumbnailToArray)(ULONG aScreenId, BOOL aBGR, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
STDMETHOD(ReadSavedThumbnailPNGToArray)(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
STDMETHOD(QuerySavedScreenshotPNGSize)(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
STDMETHOD(ReadSavedScreenshotPNGToArray)(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
STDMETHOD(CloneTo(IMachine *pTarget, CloneMode_T mode, ComSafeArrayIn(CloneOptions_T, options), IProgress **pProgress));
return LOCKCLASS_MACHINEOBJECT;
virtual HRESULT onNetworkAdapterChange(INetworkAdapter * /* networkAdapter */, BOOL /* changeAdapter */) { return S_OK; }
NATProtocol_T /* protocol */, IN_BSTR /* host ip */, LONG /* host port */, IN_BSTR /* guest port */, LONG /* guest port */ ) { return S_OK; }
virtual HRESULT onMediumChange(IMediumAttachment * /* mediumAttachment */, BOOL /* force */) { return S_OK; }
virtual HRESULT onStorageDeviceChange(IMediumAttachment * /* mediumAttachment */, BOOL /* remove */) { return S_OK; }
if (!*directControl)
return rc;
#if defined(RT_OS_WINDOWS)
bool aAllowClosing = false);
bool isSessionSpawning();
bool checkForSpawnFailure();
bool aSetError = false)
void releaseStateDependency();
bool fSetError = false)
void ensureNoStateDependencies();
bool aSetError = false);
bool aSetError = false);
bool aSetError = false);
bool aSetError = false);
bool aOnline);
void rollbackMedia();
void commit();
struct DeleteTask;
#ifdef VBOX_WITH_GUEST_PROPS
#ifdef VBOX_WITH_RESOURCE_USAGE_API
void FinalRelease();
// public initializer/uninitializer for internal purposes only
bool checkForDeath();
struct ConsoleTaskData
struct Uninit
struct SnapshotTask;
struct DeleteSnapshotTask;
struct RestoreSnapshotTask;
bool fOnlineMergePossible,
bool &fMergeForward,
bool &fNeedOnlineMerge,
bool fNeedsOnlineMerge,
bool fMergeForward,
bool *pfNeedsMachineSaveSettings);
void unlockMedia();
#if defined(RT_OS_WINDOWS)
int mIPCSem;
# ifdef VBOX_WITH_NEW_SYS_V_KEYGEN
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
return (isSnapshotMachine())