Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

Medium Class Reference

#include <MediumImpl.h>

Inheritance diagram for Medium:

VirtualBoxBaseWithTypedChildren< Medium > com::SupportErrorInfoImpl< Medium, IMedium > VirtualBoxSupportTranslation< Medium > com::SupportErrorInfoDerived< B, C, I > VirtualBoxSupportTranslationBase VirtualBoxBaseProto util::Lockable

List of all members.

Detailed Description

Medium component class for all media types.

Definition at line 44 of file MediumImpl.h.

Public Types

typedef AutoCallerBase< false > AutoCaller
typedef AutoCallerBase< true > AutoLimitedCaller
typedef std::list< ComObjPtr
< Medium > > 
enum  HDDOpenMode { OpenReadWrite, OpenReadOnly }
< Medium >::DependentChildren 
enum  State {
  NotReady, Ready, InInit, InUninit,
  InitFailed, Limited, MayUninit, WillUninit

Public Member Functions

virtual HRESULT addCaller (State *aState=NULL, bool aLimited=false)
void addDependentChild (Medium *aChild)
HRESULT addLimitedCaller (State *aState=NULL)
HRESULT attachTo (const Guid &aMachineId, const Guid &aSnapshotId=Guid::Empty)
void cancelDiscard (MergeChain *aChain)
void cancelMergeTo (MergeChain *aChain)
STDMETHOD() CloneTo (IMedium *aTarget, MediumVariant_T aVariant, IMedium *aParent, IProgress **aProgress)
STDMETHOD() Close ()
STDMETHOD() Compact (IProgress **aProgress)
HRESULT compareLocationTo (const char *aLocation, int &aResult)
STDMETHOD() CreateBaseStorage (ULONG64 aLogicalSize, MediumVariant_T aVariant, IProgress **aProgress)
STDMETHOD() CreateDiffStorage (IMedium *aTarget, MediumVariant_T aVariant, IProgress **aProgress)
HRESULT createDiffStorageAndWait (ComObjPtr< Medium > &aTarget, MediumVariant_T aVariant, ComObjPtr< Progress > *aProgress=NULL)
HRESULT createDiffStorageNoWait (ComObjPtr< Medium > &aTarget, MediumVariant_T aVariant, ComObjPtr< Progress > &aProgress)
STDMETHOD() DeleteStorage (IProgress **aProgress)
HRESULT deleteStorageAndWait (ComObjPtr< Progress > *aProgress=NULL)
HRESULT deleteStorageNoWait (ComObjPtr< Progress > &aProgress)
HRESULT detachFrom (const Guid &aMachineId, const Guid &aSnapshotId=Guid::Empty)
HRESULT discard (ComObjPtr< Progress > &aProgress, ULONG ulWeight, MergeChain *aChain)
HRESULT FinalConstruct ()
void FinalRelease ()
ComObjPtr< MediumgetBase (uint32_t *aLevel=NULL)
const List & getChildren () const
const GuidgetFirstMachineBackrefId () const
const GuidgetFirstMachineBackrefSnapshotId () const
const GuidgetId () const
const Utf8StrgetLocation () const
const Utf8StrgetLocationFull () const
Utf8Str getName ()
ComObjPtr< MediumgetParent () const
STDMETHOD() GetProperties (IN_BSTR aNames, ComSafeArrayOut(BSTR, aReturnNames), ComSafeArrayOut(BSTR, aReturnValues))
STDMETHOD() GetProperty (IN_BSTR aName, BSTR *aValue)
uint64_t getSize () const
STDMETHOD() GetSnapshotIds (IN_BSTR aMachineId, ComSafeArrayOut(BSTR, aSnapshotIds))
MediumState_T getState () const
MediumType_T getType () const
HRESULT init (VirtualBox *aVirtualBox, DeviceType_T aDeviceType, CBSTR aLocation, CBSTR aDescription=NULL)
HRESULT init (VirtualBox *aVirtualBox, Medium *aParent, DeviceType_T aDeviceType, const settings::Medium &data)
HRESULT init (VirtualBox *aVirtualBox, CBSTR aLocation, HDDOpenMode enOpenMode, DeviceType_T aDeviceType, BOOL aSetImageId, const Guid &aImageId, BOOL aSetParentId, const Guid &aParentId)
HRESULT init (VirtualBox *aVirtualBox, CBSTR aFormat, CBSTR aLocation)
STDMETHOD() InterfaceSupportsErrorInfo (REFIID aIID)
bool isLockedOnCurrentThread ()
bool isReadOnly ()
bool isReady ()
bool isWriteLockOnCurrentThread ()
void lock ()
virtual RWLockHandlelockHandle () const
STDMETHOD() LockRead (MediumState_T *aState)
STDMETHOD() LockWrite (MediumState_T *aState)
STDMETHOD() MergeTo (IN_BSTR aTargetId, IProgress **aProgress)
HRESULT mergeToAndWait (MergeChain *aChain, ComObjPtr< Progress > *aProgress=NULL)
HRESULT mergeToNoWait (MergeChain *aChain, ComObjPtr< Progress > &aProgress)
Bstr preferredDiffFormat ()
HRESULT prepareDiscard (MergeChain *&aChain)
HRESULT prepareMergeTo (Medium *aTarget, MergeChain *&aChain, bool aIgnoreAttachments=false)
STDMETHOD() RefreshState (MediumState_T *aState)
virtual void releaseCaller ()
void removeDependentChild (Medium *aChild)
STDMETHOD() Reset (IProgress **aProgress)
STDMETHOD() Resize (ULONG64 aLogicalSize, IProgress **aProgress)
LockOps * rlock ()
HRESULT saveSettings (settings::Medium &data)
STDMETHOD() SetProperties (ComSafeArrayIn(IN_BSTR, aNames), ComSafeArrayIn(IN_BSTR, aValues))
STDMETHOD() SetProperty (IN_BSTR aName, IN_BSTR aValue)
void setReady (bool isReady)
 STDMETHOD (COMGETTER(LastAccessError))(BSTR *aLastAccessError)
 STDMETHOD (COMGETTER(LogicalSize))(ULONG64 *aLogicalSize)
 STDMETHOD (COMGETTER(Base))(IMedium **aBase)
 STDMETHOD (COMGETTER(Children))(ComSafeArrayOut(IMedium *
 STDMETHOD (COMGETTER(Parent))(IMedium **aParent)
 STDMETHOD (COMSETTER(Type))(MediumType_T aType)
 STDMETHOD (COMGETTER(Type))(MediumType_T *aType)
 STDMETHOD (COMGETTER(DeviceType))(DeviceType_T *aDeviceType)
 STDMETHOD (COMGETTER(Location))(BSTR *aLocation)
 STDMETHOD (COMGETTER(State))(MediumState_T *aState)
 STDMETHOD (COMSETTER(Description))(IN_BSTR aDescription)
 STDMETHOD (COMGETTER(Description))(BSTR *aDescription)
void uninit ()
void unlock ()
STDMETHOD() UnlockRead (MediumState_T *aState)
STDMETHOD() UnlockWrite (MediumState_T *aState)
HRESULT updatePath (const char *aOldPath, const char *aNewPath)
void updatePaths (const char *aOldPath, const char *aNewPath)
LockOps * wlock ()

Static Public Member Functions

static const char * ComponentName ()
static const char * tr (const char *aSourceText, const char *aComment=NULL)
static const char * translate (const char *context, const char *sourceText, const char *comment=0)
static const char * translate (const char *context, const char *sourceText, const char *comment=0)

Public Attributes


Protected Member Functions

RWLockHandlechildrenLock ()
virtual const char * componentName () const
const DependentChildren & dependentChildren () const
RWLockHandlegetTreeLock ()
virtual const GUID & mainInterfaceID () const
void removeDependentChildren ()
WriteLockHandlestateLockHandle ()
void uninitDependentChildren ()

Static Protected Member Functions

static const char * className ()
static bool cutClassNameFrom__PRETTY_FUNCTION__ (char *aPrettyFunctionName)

Private Member Functions

HRESULT canClose ()
HRESULT createDiffStorage (ComObjPtr< Medium > &aTarget, MediumVariant_T aVariant, ComObjPtr< Progress > *aProgress, bool aWait)
HRESULT deleteStorage (ComObjPtr< Progress > *aProgress, bool aWait)
HRESULT mergeTo (MergeChain *aChain, ComObjPtr< Progress > *aProgress, bool aWait)
HRESULT queryInfo ()
HRESULT setFormat (CBSTR aFormat)
HRESULT setLocation (const Utf8Str &aLocation, const Utf8Str &aFormat=Utf8Str())
HRESULT setStateError ()
HRESULT unregisterWithVirtualBox ()
Utf8Str vdError (int aVRC)

Static Private Member Functions

static DECLCALLBACK (int) taskThread(RTTHREAD thread
static DECLCALLBACK (int) vdConfigQuery(void *pvUser
static DECLCALLBACK (int) vdConfigQuerySize(void *pvUser
static DECLCALLBACK (bool) vdConfigAreKeysValid(void *pvUser
static DECLCALLBACK (int) vdProgressCall(VM *
static DECLCALLBACK (void) vdErrorCall(void *pvUser

Private Attributes

static const char char size_t cchValue
Data * m
ComObjPtr< Medium, ComWeakRefmParent
const ComObjPtr< VirtualBox,
static const char size_t * pcbValue
static int const char * pszFormat
static const char * pszName
static const char char * pszValue
static const char * pszzValid
static void * pvUser
static unsigned void * pvUser
static int rc
static int RT_SRC_POS_DECL
static unsigned uPercent
static int const char va_list va


struct Task


struct  Data
class  ImageChain
class  MergeChain
struct  Task

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index