MachineImpl.h revision 6d86d195ceaf02539230689a2163bb5e0f8fb6cd
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * VirtualBox COM class implementation
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * Copyright (C) 2006-2010 Oracle Corporation
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * available from http://www.virtualbox.org. This file is free software;
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * you can redistribute it and/or modify it under the terms of the GNU
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * General Public License (GPL) as published by the Free Software
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync#include "StorageControllerImpl.h" // required for MachineImpl.h to compile on Windows
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync#endif /* VBOX_WITH_RESOURCE_USAGE_API */
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync// generated header
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync////////////////////////////////////////////////////////////////////////////////
b304856b23107864c9c594a80cebca6006623f31vboxsync// helper declarations
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync////////////////////////////////////////////////////////////////////////////////
9353e321b583ed6f2b42414257a5212885575b5cvboxsync// Machine class
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync////////////////////////////////////////////////////////////////////////////////
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync public VirtualBoxSupportErrorInfoImpl<Machine, IMachine>,
2a5e5a032e6f23f8937718e4ee4d6979188bdd19vboxsync AnyStateDep = 0, MutableStateDep, MutableOrSavedStateDep
2a5e5a032e6f23f8937718e4ee4d6979188bdd19vboxsync * Internal machine data.
2a5e5a032e6f23f8937718e4ee4d6979188bdd19vboxsync * Only one instance of this data exists per every machine -- it is shared
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync * by the Machine, SessionMachine and all SnapshotMachine instances
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync * associated with the given machine using the util::Shareable template
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync * through the mData variable.
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync * @note |const| members are persistent during lifetime so can be
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync * accessed without locking.
13d1fd6f43e9a245a4f2b4fc6845bdaa5d0f4134vboxsync * @note There is no need to lock anything inside init() or uninit()
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync * methods, because they are always serialized (see AutoCaller).
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync * Data structure to hold information about sessions opened for the
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync * given machine.
62a515eec8de1b7804ec6997c0f2013fef5c5a6bvboxsync /** Control of the direct session opened by openSession() */
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync typedef std::list<ComPtr<IInternalSessionControl> > RemoteControlList;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync /** list of controls of all opened remote sessions */
19cb1f8699e352d590c4946caee33863a5157241vboxsync /** openRemoteSession() and OnSessionEnd() progress indicator */
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync * PID of the session object that must be passed to openSession() to
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync * finalize the openRemoteSession() request (i.e., PID of the
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync * process created by openRemoteSession())
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync /** Current session state */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync /** Session type string (for indirect sessions) */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync /** Session machine object */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync /** Medium object lock collection. */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync /** Flag indicating that the config file is read-only. */
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync // machine settings XML file
a9315925c69e4c3bb342bb317ca5b6d29e1ee467vboxsync /* Note: These are guarded by VirtualBoxBase::stateLockHandle() */
40dce69ff1c2949a489337922f30f1021d62d864vboxsync /** Guest properties have been modified and need saving since the
40dce69ff1c2949a489337922f30f1021d62d864vboxsync * machine was started, or there are transient properties which need
40dce69ff1c2949a489337922f30f1021d62d864vboxsync * deleting and the machine is being shut down. */
5a41049c24bcf93e3dc63c76bee23db645867e0cvboxsync * Saved state data.
62ab017295981c81484e5a5f93ff8b5f85f7defbvboxsync * It's actually only the state file path string, but it needs to be
7708252d252a55417a6a817041e4356797e34255vboxsync * separate from Data, because Machine and SessionMachine instances
7708252d252a55417a6a817041e4356797e34255vboxsync * share it, while SnapshotMachine does not.
3f00104a87d8a725dfa0348b69cbdac901062a4avboxsync * The data variable is |mSSData|.
3f00104a87d8a725dfa0348b69cbdac901062a4avboxsync * User changeable machine data.
904810c4c6668233349b025cc58013cb7c11c701vboxsync * This data is common for all machine snapshots, i.e. it is shared
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * by all SnapshotMachine instances associated with the given machine
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * using the util::Backupable template through the |mUserData| variable.
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * SessionMachine instances can alter this data and discard changes.
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync * @note There is no need to lock anything inside init() or uninit()
e59069cf1c98c1c2e90a18ec76fbc2e9907fb917vboxsync * methods, because they are always serialized (see AutoCaller).
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync * Hardware data.
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync * This data is unique for a machine and for every machine snapshot.
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync * Stored using the util::Backupable template in the |mHWData| variable.
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync * SessionMachine instances can alter this data and discard changes.
9353e321b583ed6f2b42414257a5212885575b5cvboxsync * Data structure to hold information about a guest property.
fc5f879e9508f333e20b37c63db9189a33059308vboxsync /** Property name */
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync /** Property value */
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync /** Property timestamp */
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync /** Property flags */
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync Guid mHardwareUUID; /**< If Null, use mData.mUuid. */
62a515eec8de1b7804ec6997c0f2013fef5c5a6bvboxsync DeviceType_T mBootOrder[SchemaDefs::MaxBootPosition];
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync typedef std::list< ComObjPtr<SharedFolder> > SharedFolderList;
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync typedef std::list<GuestProperty> GuestPropertyList;
3933885bc0c2c93436d858a14564c6179ec72872vboxsync * Hard disk and other media data.
3933885bc0c2c93436d858a14564c6179ec72872vboxsync * The usage policy is the same as for HWData, but a separate structure
3933885bc0c2c93436d858a14564c6179ec72872vboxsync * is necessary because hard disk data requires different procedures when
3933885bc0c2c93436d858a14564c6179ec72872vboxsync * taking or deleting snapshots, etc.
060f7ec6ae5c99df18341ef2e1f3e91f4b0c89f1vboxsync * The data variable is |mMediaData|.
3933885bc0c2c93436d858a14564c6179ec72872vboxsync typedef std::list< ComObjPtr<MediumAttachment> > AttachmentList;
4090390866c02d5d0ad061151cdb298b9a173e86vboxsync // public initializer/uninitializer for internal purposes only:
40dce69ff1c2949a489337922f30f1021d62d864vboxsync // initializer for creating a new, empty machine
3f00104a87d8a725dfa0348b69cbdac901062a4avboxsync // initializer for loading existing machine XML (either registered or not)
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync // initializer for machine config in memory (OVF import)
7708252d252a55417a6a817041e4356797e34255vboxsync HRESULT tryCreateMachineConfigFile(BOOL aOverride);
3933885bc0c2c93436d858a14564c6179ec72872vboxsync // IMachine properties
3933885bc0c2c93436d858a14564c6179ec72872vboxsync STDMETHOD(COMGETTER(Parent))(IVirtualBox **aParent);
3933885bc0c2c93436d858a14564c6179ec72872vboxsync STDMETHOD(COMGETTER(Accessible))(BOOL *aAccessible);
3933885bc0c2c93436d858a14564c6179ec72872vboxsync STDMETHOD(COMGETTER(AccessError))(IVirtualBoxErrorInfo **aAccessError);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMGETTER(Description))(BSTR *aDescription);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMSETTER(Description))(IN_BSTR aDescription);
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync STDMETHOD(COMGETTER(HardwareVersion))(BSTR *aVersion);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMSETTER(HardwareVersion))(IN_BSTR aVersion);
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync STDMETHOD(COMGETTER(MemorySize))(ULONG *memorySize);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMSETTER(MemorySize))(ULONG memorySize);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMGETTER(CPUHotPlugEnabled))(BOOL *enabled);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMSETTER(CPUHotPlugEnabled))(BOOL enabled);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMGETTER(MemoryBalloonSize))(ULONG *memoryBalloonSize);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMSETTER(MemoryBalloonSize))(ULONG memoryBalloonSize);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync STDMETHOD(COMGETTER(PageFusionEnabled))(BOOL *enabled);
3933885bc0c2c93436d858a14564c6179ec72872vboxsync STDMETHOD(COMSETTER(PageFusionEnabled))(BOOL enabled);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(MonitorCount))(ULONG *monitorCount);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMSETTER(MonitorCount))(ULONG monitorCount);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(Accelerate3DEnabled))(BOOL *enabled);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMSETTER(Accelerate3DEnabled))(BOOL enabled);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(Accelerate2DVideoEnabled))(BOOL *enabled);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMSETTER(Accelerate2DVideoEnabled))(BOOL enabled);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(SnapshotFolder))(BSTR *aSavedStateFolder);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMSETTER(SnapshotFolder))(IN_BSTR aSavedStateFolder);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(MediumAttachments))(ComSafeArrayOut(IMediumAttachment *, aAttachments));
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(VRDPServer))(IVRDPServer **vrdpServer);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(AudioAdapter))(IAudioAdapter **audioAdapter);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(USBController))(IUSBController * *aUSBController);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(SettingsFilePath))(BSTR *aFilePath);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(SettingsModified))(BOOL *aModified);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(COMGETTER(SessionState))(SessionState_T *aSessionState);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(SessionType))(BSTR *aSessionType);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(SessionPid))(ULONG *aSessionPid);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(State))(MachineState_T *machineState);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(LastStateChange))(LONG64 *aLastStateChange);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(StateFilePath))(BSTR *aStateFilePath);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(CurrentSnapshot))(ISnapshot **aCurrentSnapshot);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(SnapshotCount))(ULONG *aSnapshotCount);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(CurrentStateModified))(BOOL *aCurrentStateModified);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(SharedFolders))(ComSafeArrayOut(ISharedFolder *, aSharedFolders));
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(ClipboardMode))(ClipboardMode_T *aClipboardMode);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMSETTER(ClipboardMode))(ClipboardMode_T aClipboardMode);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(GuestPropertyNotificationPatterns))(BSTR *aPattern);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMSETTER(GuestPropertyNotificationPatterns))(IN_BSTR aPattern);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(StorageControllers))(ComSafeArrayOut(IStorageController *, aStorageControllers));
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(TeleporterEnabled))(BOOL *aEnabled);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMSETTER(TeleporterEnabled))(BOOL aEnabled);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(TeleporterPort))(ULONG *aPort);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(TeleporterAddress))(BSTR *aAddress);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMSETTER(TeleporterAddress))(IN_BSTR aAddress);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMGETTER(TeleporterPassword))(BSTR *aPassword);
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync STDMETHOD(COMSETTER(TeleporterPassword))(IN_BSTR aPassword);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(COMGETTER(FirmwareType)) (FirmwareType_T *aFirmware);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(COMSETTER(FirmwareType)) (FirmwareType_T aFirmware);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(COMGETTER(KeyboardHidType)) (KeyboardHidType_T *aKeyboardHidType);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(COMSETTER(KeyboardHidType)) (KeyboardHidType_T aKeyboardHidType);
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync STDMETHOD(COMGETTER(PointingHidType)) (PointingHidType_T *aPointingHidType);
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync STDMETHOD(COMSETTER(PointingHidType)) (PointingHidType_T aPointingHidType);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(COMGETTER(IoCacheEnabled)) (BOOL *aEnabled);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(COMSETTER(IoCacheEnabled)) (BOOL aEnabled);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(COMGETTER(IoCacheSize)) (ULONG *aIoCacheSize);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(COMSETTER(IoCacheSize)) (ULONG aIoCacheSize);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(COMGETTER(IoBandwidthMax)) (ULONG *aIoBandwidthMax);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(COMSETTER(IoBandwidthMax)) (ULONG aIoBandwidthMax);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync // IMachine methods
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(SetBootOrder)(ULONG aPosition, DeviceType_T aDevice);
508452243fd3328f7b9e0405d39fb9dc004e31b8vboxsync STDMETHOD(GetBootOrder)(ULONG aPosition, DeviceType_T *aDevice);
508452243fd3328f7b9e0405d39fb9dc004e31b8vboxsync STDMETHOD(AttachDevice)(IN_BSTR aControllerName, LONG aControllerPort,
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync STDMETHOD(DetachDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice);
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync STDMETHOD(PassthroughDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aPassthrough);
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync STDMETHOD(MountMedium)(IN_BSTR aControllerName, LONG aControllerPort,
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(GetMedium)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(GetSerialPort)(ULONG slot, ISerialPort **port);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(GetParallelPort)(ULONG slot, IParallelPort **port);
f4e792b5d6ee04e9d93499b747cce21510c3cdb3vboxsync STDMETHOD(GetNetworkAdapter)(ULONG slot, INetworkAdapter **adapter);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(GetExtraDataKeys)(ComSafeArrayOut(BSTR, aKeys));
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(GetExtraData)(IN_BSTR aKey, BSTR *aValue);
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync STDMETHOD(SetExtraData)(IN_BSTR aKey, IN_BSTR aValue);
fb1975a6972d89de9e515bed0248db93f04ec9d8vboxsync STDMETHOD(GetCPUProperty)(CPUPropertyType_T property, BOOL *aVal);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(SetCPUProperty)(CPUPropertyType_T property, BOOL aVal);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(GetCPUIDLeaf)(ULONG id, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx);
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync STDMETHOD(SetCPUIDLeaf)(ULONG id, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(GetHWVirtExProperty)(HWVirtExPropertyType_T property, BOOL *aVal);
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync STDMETHOD(SetHWVirtExProperty)(HWVirtExPropertyType_T property, BOOL aVal);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(Export)(IAppliance *aAppliance, IVirtualSystemDescription **aDescription);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(GetSnapshot)(IN_BSTR aId, ISnapshot **aSnapshot);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(FindSnapshot)(IN_BSTR aName, ISnapshot **aSnapshot);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync STDMETHOD(CreateSharedFolder)(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable);
e59069cf1c98c1c2e90a18ec76fbc2e9907fb917vboxsync STDMETHOD(GetGuestProperty)(IN_BSTR aName, BSTR *aValue, ULONG64 *aTimestamp, BSTR *aFlags);
e59069cf1c98c1c2e90a18ec76fbc2e9907fb917vboxsync STDMETHOD(GetGuestPropertyValue)(IN_BSTR aName, BSTR *aValue);
e59069cf1c98c1c2e90a18ec76fbc2e9907fb917vboxsync STDMETHOD(GetGuestPropertyTimestamp)(IN_BSTR aName, ULONG64 *aTimestamp);
e59069cf1c98c1c2e90a18ec76fbc2e9907fb917vboxsync STDMETHOD(SetGuestProperty)(IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags);
e59069cf1c98c1c2e90a18ec76fbc2e9907fb917vboxsync STDMETHOD(SetGuestPropertyValue)(IN_BSTR aName, IN_BSTR aValue);
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync STDMETHOD(EnumerateGuestProperties)(IN_BSTR aPattern, ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(BSTR, aValues), ComSafeArrayOut(ULONG64, aTimestamps), ComSafeArrayOut(BSTR, aFlags));
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(GetMediumAttachmentsOfController)(IN_BSTR aName, ComSafeArrayOut(IMediumAttachment *, aAttachments));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync STDMETHOD(GetMediumAttachment)(IN_BSTR aConstrollerName, LONG aControllerPort, LONG aDevice, IMediumAttachment **aAttachment);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync STDMETHOD(AddStorageController)(IN_BSTR aName, StorageBus_T aConnectionType, IStorageController **controller);
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync STDMETHOD(GetStorageControllerByName(IN_BSTR aName, IStorageController **storageController));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(GetStorageControllerByInstance(ULONG aInstance, IStorageController **storageController));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync STDMETHOD(QuerySavedThumbnailSize)(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync STDMETHOD(ReadSavedThumbnailToArray)(ULONG aScreenId, BOOL aBGR, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync STDMETHOD(QuerySavedScreenshotPNGSize)(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync STDMETHOD(ReadSavedScreenshotPNGToArray)(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(GetCPUStatus(ULONG aCpu, BOOL *aCpuAttached));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(QueryLogFilename(ULONG aIdx, BSTR *aName));
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(ReadLog(ULONG aIdx, ULONG64 aOffset, ULONG64 aSize, ComSafeArrayOut(BYTE, aData)));
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync // public methods only for internal purposes
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * Simple run-time type identification without having to enable C++ RTTI.
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * The class IDs are defined in VirtualBoxBase.h.
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * Override of the default locking class to be used for validating lock
6efcf94383d6e48c764c6518cf1b4069ad34e210vboxsync * order with the standard member lock handle.
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /// @todo (dmik) add lock and make non-inlined after revising classes
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync // that use it. Note: they should enter Machine lock to keep the returned
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync // information valid!
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync bool isRegistered() { return !!mData->mRegistered; }
3a0bc95d0adf57baefd303e94b8f1b7b31a8f080vboxsync // unsafe inline public methods for internal purposes only (ensure there is
3a0bc95d0adf57baefd303e94b8f1b7b31a8f080vboxsync // a caller and a read lock before calling them!)
21ddd8aa21b8d7ad25b18ab341ede34c1cb4a125vboxsync * Returns the VirtualBox object this machine belongs to.
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync * @note This method doesn't check this object's readiness. Intended to be
21ddd8aa21b8d7ad25b18ab341ede34c1cb4a125vboxsync * used by ready Machine children (whose readiness is bound to the parent's
21ddd8aa21b8d7ad25b18ab341ede34c1cb4a125vboxsync * one) or after doing addCaller() manually.
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync VirtualBox* getVirtualBox() const { return mParent; }
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync * Returns this machine ID.
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync * @note This method doesn't check this object's readiness. Intended to be
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync * used by ready Machine children (whose readiness is bound to the parent's
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync * one) or after adding a caller manually.
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync * Returns the snapshot ID this machine represents or an empty UUID if this
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * instance is not SnapshotMachine.
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * @note This method doesn't check this object's readiness. Intended to be
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * used by ready Machine children (whose readiness is bound to the parent's
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * one) or after adding a caller manually.
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * Returns this machine's full settings file path.
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync * @note This method doesn't lock this object or check its readiness.
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * Intended to be used only after doing addCaller() manually and locking it
f31ac84c1c57e23801423b5bd184fadabe6456f3vboxsync * for reading.
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync const Utf8Str& getSettingsFileFull() const { return mData->m_strConfigFileFull; }
8fdb854581fe3cb394d84835dc09b02e6e18d4edvboxsync * Returns this machine name.
8fdb854581fe3cb394d84835dc09b02e6e18d4edvboxsync * @note This method doesn't lock this object or check its readiness.
8fdb854581fe3cb394d84835dc09b02e6e18d4edvboxsync * Intended to be used only after doing addCaller() manually and locking it
8fdb854581fe3cb394d84835dc09b02e6e18d4edvboxsync * for reading.
36929067a9d3cba77fd78f1e8fa042ed3a8ae2d6vboxsync const Bstr& getName() const { return mUserData->mName; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync // callback handlers
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onNetworkAdapterChange(INetworkAdapter * /* networkAdapter */, BOOL /* changeAdapter */) { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onSerialPortChange(ISerialPort * /* serialPort */) { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onParallelPortChange(IParallelPort * /* parallelPort */) { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onVRDPServerChange(BOOL /* aRestart */) { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onUSBControllerChange() { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onStorageControllerChange() { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onCPUChange(ULONG /* aCPU */, BOOL /* aRemove */) { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onMediumChange(IMediumAttachment * /* mediumAttachment */, BOOL /* force */) { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync virtual HRESULT onSharedFolderChange() { return S_OK; }
121568d0a1e932e6f6acd49376827a0e593815favboxsync HRESULT saveRegistryEntry(settings::MachineRegistryEntry &data);
121568d0a1e932e6f6acd49376827a0e593815favboxsync int calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult);
121568d0a1e932e6f6acd49376827a0e593815favboxsync void calculateRelativePath(const Utf8Str &strPath, Utf8Str &aResult);
db0ecde8f28fdb4525bc6d94056166c70b02ebb8vboxsync HRESULT openSession(IInternalSessionControl *aControl);
db0ecde8f28fdb4525bc6d94056166c70b02ebb8vboxsync HRESULT openRemoteSession(IInternalSessionControl *aControl,
db0ecde8f28fdb4525bc6d94056166c70b02ebb8vboxsync HRESULT openExistingSession(IInternalSessionControl *aControl);
db0ecde8f28fdb4525bc6d94056166c70b02ebb8vboxsync HRESULT getDirectControl(ComPtr<IInternalSessionControl> *directControl)
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync bool isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync HANDLE *aIPCSem = NULL, bool aAllowClosing = false);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync bool isSessionOpenOrClosing(ComObjPtr<SessionMachine> &aMachine,
1bf151411167b02ebdc6d6a18de8b97030341e1fvboxsync { return isSessionOpen(aMachine, aControl, aIPCSem, true /* aAllowClosing */); }
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync bool isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
e2760cdc84c692bc46cfaf5018d313db2f122acavboxsync bool isSessionOpenOrClosing(ComObjPtr<SessionMachine> &aMachine,
e2760cdc84c692bc46cfaf5018d313db2f122acavboxsync { return isSessionOpen(aMachine, aControl, aIPCSem, true /* aAllowClosing */); }
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync bool isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync bool aAllowClosing = false);
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync bool isSessionOpenOrClosing(ComObjPtr<SessionMachine> &aMachine,
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync { return isSessionOpen(aMachine, aControl, true /* aAllowClosing */); }
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync bool aSetError = false)
d6f9950e2cf4ba7fd217c083400d9812ff745374vboxsync return findSharedFolder(aName, aSharedFolder, aSetError);
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync HRESULT addStateDependency(StateDependency aDepType = AnyStateDep,
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync // for VirtualBoxSupportErrorInfoImpl
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync static const wchar_t *getComponentName() { return L"Machine"; }
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync HRESULT checkStateDependency(StateDependency aDepType);
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync virtual HRESULT setMachineState(MachineState_T aMachineState);
6efcf94383d6e48c764c6518cf1b4069ad34e210vboxsync bool aSetError = false);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT loadMachineDataFromSettings(const settings::MachineConfigFile &config);
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync HRESULT loadSnapshot(const settings::Snapshot &data,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT loadHardware(const settings::Hardware &data);
49e54e2ffe0c10864d06e9d1ebe24a8eb1327a6bvboxsync HRESULT loadStorageControllers(const settings::Storage &data,
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync HRESULT loadStorageDevices(StorageController *aStorageController,
49e54e2ffe0c10864d06e9d1ebe24a8eb1327a6bvboxsync HRESULT findSnapshot(const Guid &aId, ComObjPtr<Snapshot> &aSnapshot,
49e54e2ffe0c10864d06e9d1ebe24a8eb1327a6bvboxsync bool aSetError = false);
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync HRESULT findSnapshot(IN_BSTR aName, ComObjPtr<Snapshot> &aSnapshot,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync bool aSetError = false);
91f8453d16b48876deddaba298c211071d0ca3a5vboxsync HRESULT getStorageControllerByName(const Utf8Str &aName,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync bool aSetError = false);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT getMediumAttachmentsOfController(CBSTR aName,
91f8453d16b48876deddaba298c211071d0ca3a5vboxsync /* flags for #saveSettings() */
fc5f879e9508f333e20b37c63db9189a33059308vboxsync /* flags for #saveStateSettings() */
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync HRESULT prepareSaveSettings(bool *pfNeedsGlobalSaveSettings);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT saveSettings(bool *pfNeedsGlobalSaveSettings, int aFlags = 0);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync void copyMachineDataToSettings(settings::MachineConfigFile &config);
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync HRESULT saveAllSnapshots(settings::MachineConfigFile &config);
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync HRESULT saveStorageControllers(settings::Storage &data);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT saveStorageDevices(ComObjPtr<StorageController> aStorageController,
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync HRESULT deleteImplicitDiffs(bool *pfNeedsSaveSettings);
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync MediumAttachment* findAttachment(const MediaData::AttachmentList &ll,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync MediumAttachment* findAttachment(const MediaData::AttachmentList &ll,
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync MediumAttachment* findAttachment(const MediaData::AttachmentList &ll,
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync bool isInOwnDir(Utf8Str *aSettingsDir = NULL) const;
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT getGuestPropertyFromService(IN_BSTR aName, BSTR *aValue,
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync HRESULT getGuestPropertyFromVM(IN_BSTR aName, BSTR *aValue,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT setGuestPropertyToService(IN_BSTR aName, IN_BSTR aValue,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT setGuestPropertyToVM(IN_BSTR aName, IN_BSTR aValue,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync#endif /* VBOX_WITH_GUEST_PROPS */
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync void registerMetrics(PerformanceCollector *aCollector, Machine *aMachine, RTPROCESS pid);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync void unregisterMetrics(PerformanceCollector *aCollector, Machine *aMachine);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync#endif /* VBOX_WITH_RESOURCE_USAGE_API */
4a0e2f51aaf27c0bca61ff0f1adb91106264f0dbvboxsync // the following fields need special backup/rollback/commit handling,
4a0e2f51aaf27c0bca61ff0f1adb91106264f0dbvboxsync // so they cannot be a part of HWData
4a0e2f51aaf27c0bca61ff0f1adb91106264f0dbvboxsync const ComObjPtr<SerialPort> mSerialPorts[SchemaDefs::SerialPortCount];
4a0e2f51aaf27c0bca61ff0f1adb91106264f0dbvboxsync const ComObjPtr<ParallelPort> mParallelPorts[SchemaDefs::ParallelPortCount];
4a0e2f51aaf27c0bca61ff0f1adb91106264f0dbvboxsync const ComObjPtr<NetworkAdapter> mNetworkAdapters[SchemaDefs::NetworkAdapterCount];
4a0e2f51aaf27c0bca61ff0f1adb91106264f0dbvboxsync typedef std::list< ComObjPtr<StorageController> > StorageControllerList;
4a0e2f51aaf27c0bca61ff0f1adb91106264f0dbvboxsync Backupable<StorageControllerList> mStorageControllers;
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync// SessionMachine class
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync////////////////////////////////////////////////////////////////////////////////
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * @note Notes on locking objects of this class:
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * SessionMachine shares some data with the primary Machine instance (pointed
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * to by the |mPeer| member). In order to provide data consistency it also
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * shares its lock handle. This means that whenever you lock a SessionMachine
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync * instance using Auto[Reader]Lock or AutoMultiLock, the corresponding Machine
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync * instance is also locked in the same lock mode. Keep it in mind.
67e7d53d62514401efcd0e7a34f5faf772a3fe04vboxsync public VirtualBoxSupportTranslation<SessionMachine>,
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync VIRTUALBOXSUPPORTTRANSLATION_OVERRIDE(SessionMachine)
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync // public initializer/uninitializer for internal purposes only
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync // util::Lockable interface
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync // IInternalMachineControl methods
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(UpdateState)(MachineState_T machineState);
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync STDMETHOD(SetPowerUpInfo)(IVirtualBoxErrorInfo *aError);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(RunUSBDeviceFilters)(IUSBDevice *aUSBDevice, BOOL *aMatched, ULONG *aMaskedIfs);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(DetachUSBDevice)(IN_BSTR aId, BOOL aDone);
2a5e5a032e6f23f8937718e4ee4d6979188bdd19vboxsync STDMETHOD(OnSessionEnd)(ISession *aSession, IProgress **aProgress);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync STDMETHOD(BeginSavingState)(IProgress *aProgress, BSTR *aStateFilePath);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync STDMETHOD(AdoptSavedState)(IN_BSTR aSavedStateFile);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync STDMETHOD(BeginTakingSnapshot)(IConsole *aInitiator,
2a5e5a032e6f23f8937718e4ee4d6979188bdd19vboxsync STDMETHOD(DeleteSnapshot)(IConsole *aInitiator, IN_BSTR aId,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync MachineState_T *aMachineState, IProgress **aProgress);
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync STDMETHOD(FinishOnlineMergeMedium)(IMediumAttachment *aMediumAttachment,
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync STDMETHOD(PullGuestProperties)(ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(BSTR, aValues),
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync ComSafeArrayOut(ULONG64, aTimestamps), ComSafeArrayOut(BSTR, aFlags));
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync STDMETHOD(PushGuestProperty)(IN_BSTR aName, IN_BSTR aValue,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync STDMETHOD(UnlockMedia)() { unlockMedia(); return S_OK; }
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync // public methods only for internal purposes
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync * Simple run-time type identification without having to enable C++ RTTI.
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync * The class IDs are defined in VirtualBoxBase.h.
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync HRESULT onNetworkAdapterChange(INetworkAdapter *networkAdapter, BOOL changeAdapter);
67e7d53d62514401efcd0e7a34f5faf772a3fe04vboxsync HRESULT onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce);
b7a8ce033b32a429def2feb142bc1bdd1b5dffa2vboxsync HRESULT onSerialPortChange(ISerialPort *serialPort);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT onParallelPortChange(IParallelPort *parallelPort);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync bool hasMatchingUSBFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync // used when taking snapshot
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync // used when saving state
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync typedef std::map<ComObjPtr<Machine>, MachineState_T> AffectedMachines;
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync void deleteSnapshotHandler(DeleteSnapshotTask &aTask);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync void restoreSnapshotHandler(RestoreSnapshotTask &aTask);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT prepareDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync void cancelDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT onlineMergeMedium(const ComObjPtr<MediumAttachment> &aMediumAttachment,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync HRESULT setMachineState(MachineState_T aMachineState);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync /** interprocess semaphore handle for this machine */
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync friend bool Machine::isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync friend bool Machine::isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync# endif /*VBOX_WITH_NEW_SYS_V_KEYGEN */
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync static DECLCALLBACK(int) taskHandler(RTTHREAD thread, void *pvUser);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync// SnapshotMachine class
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync////////////////////////////////////////////////////////////////////////////////
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * @note Notes on locking objects of this class:
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * SnapshotMachine shares some data with the primary Machine instance (pointed
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * to by the |mPeer| member). In order to provide data consistency it also
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * shares its lock handle. This means that whenever you lock a SessionMachine
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * instance using Auto[Reader]Lock or AutoMultiLock, the corresponding Machine
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync * instance is also locked in the same lock mode. Keep it in mind.
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync public VirtualBoxSupportTranslation<SnapshotMachine>,
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync VIRTUALBOXSUPPORTTRANSLATION_OVERRIDE(SnapshotMachine)
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync // public initializer/uninitializer for internal purposes only
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync // util::Lockable interface
1871985cb4854e5bfb2ead8174ee28dbfce74df5vboxsync // public methods only for internal purposes
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * Simple run-time type identification without having to enable C++ RTTI.
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync * The class IDs are defined in VirtualBoxBase.h.
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync // unsafe inline public methods for internal purposes only (ensure there is
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync // a caller and a read lock before calling them!)
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync const Guid& getSnapshotId() const { return mSnapshotId; }
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync// third party methods that depend on SnapshotMachine definiton
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync : static_cast<const SnapshotMachine*>(this)->getSnapshotId();
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync#endif // ____H_MACHINEIMPL
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync/* vi: set tabstop=4 shiftwidth=4 expandtab: */