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

HardDisk2 Class Reference

#include <HardDisk2Impl.h>

Inheritance diagram for HardDisk2:

com::SupportErrorInfoDerived< MediumBase, HardDisk2, IHardDisk2 > VirtualBoxBaseWithTypedChildrenNEXT< HardDisk2 > VirtualBoxSupportTranslation< HardDisk2 > MediumBase VirtualBoxBaseNEXT VirtualBoxSupportTranslationBase VirtualBoxBaseProto com::SupportErrorInfoBase VirtualBoxSupportTranslation< MediumBase > VirtualBoxBase util::Lockable VirtualBoxSupportTranslationBase VirtualBoxBaseProto util::Lockable

List of all members.

Detailed Description

The HardDisk2 component class implements the IHardDisk2 interface.

Definition at line 46 of file HardDisk2Impl.h.

Public Types

typedef AutoCallerBase< false > AutoCaller
typedef AutoCallerBase< true > AutoLimitedCaller
typedef std::list< BackRefBackRefList
typedef std::list< ComObjPtr
< HardDisk2 > > 
< HardDisk2 >
enum  State {
  NotReady, Ready, InInit, InUninit,
  InitFailed, Limited, MayUninit, WillUninit

Public Member Functions

virtual HRESULT addCaller (State *aState=NULL, bool aLimited=false)
void addDependentChild (HardDisk2 *aChild)
HRESULT addLimitedCaller (State *aState=NULL)
HRESULT attachTo (const Guid &aMachineId, const Guid &aSnapshotId=Guid::Empty)
const BackRefList & backRefs () const
void cancelDiscard (MergeChain *aChain)
void cancelMergeTo (MergeChain *aChain)
const List & children () const
STDMETHOD() CloneTo (IHardDisk2 *aTarget, IProgress **aProgress)
STDMETHOD() Close ()
STDMETHOD() Compact (IProgress **aProgress)
HRESULT compareLocationTo (const char *aLocation, int &aResult)
STDMETHOD() CreateDiffStorage (IHardDisk2 *aTarget, IProgress **aProgress)
HRESULT createDiffStorageAndWait (ComObjPtr< HardDisk2 > &aTarget, ComObjPtr< Progress > *aProgress=NULL)
HRESULT createDiffStorageNoWait (ComObjPtr< HardDisk2 > &aTarget, ComObjPtr< Progress > &aProgress)
STDMETHOD() CreateDynamicStorage (ULONG64 aLogicalSize, IProgress **aProgress)
STDMETHOD() CreateFixedStorage (ULONG64 aLogicalSize, IProgress **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, MergeChain *aChain)
void FinalRelease ()
STDMETHOD() FlattenTo (IHardDisk2 *aTarget, IProgress **aProgress)
STDMETHOD() GetProperties (IN_BSTR aNames, ComSafeArrayOut(BSTR, aReturnNames), ComSafeArrayOut(BSTR, aReturnValues))
STDMETHOD() GetProperty (IN_BSTR aName, BSTR *aValue)
STDMETHOD() GetSnapshotIds (IN_GUID aMachineId, ComSafeGUIDArrayOut(aSnapshotIds))
const Guidid () const
HRESULT init (VirtualBox *aVirtualBox, HardDisk2 *aParent, const settings::Key &aNode)
HRESULT init (VirtualBox *aVirtualBox, CBSTR aLocation)
HRESULT init (VirtualBox *aVirtualBox, CBSTR aFormat, CBSTR aLocation)
STDMETHOD() InterfaceSupportsErrorInfo (REFIID aIID)
bool isAttachedTo (const Guid &aMachineId)
bool isLockedOnCurrentThread ()
bool isReadOnly ()
bool isWriteLockOnCurrentThread ()
const Bstrlocation () const
const BstrlocationFull () const
virtual RWLockHandlelockHandle () const
STDMETHOD() LockRead (MediaState_T *aState)
STDMETHOD() LockWrite (MediaState_T *aState)
STDMETHOD() MergeTo (IN_GUID aTargetId, IProgress **aProgress)
HRESULT mergeToAndWait (MergeChain *aChain, ComObjPtr< Progress > *aProgress=NULL)
HRESULT mergeToNoWait (MergeChain *aChain, ComObjPtr< Progress > &aProgress)
Utf8Str name ()
ComObjPtr< HardDisk2parent () const
Bstr preferredDiffFormat ()
HRESULT prepareDiscard (MergeChain *&aChain)
HRESULT prepareMergeTo (HardDisk2 *aTarget, MergeChain *&aChain, bool aIgnoreAttachments=false)
virtual void releaseCaller ()
void removeDependentChild (HardDisk2 *aChild)
LockOps * rlock ()
ComObjPtr< HardDisk2root (uint32_t *aLevel=NULL)
HRESULT saveSettings (settings::Key &aParentNode)
STDMETHOD() SetProperties (ComSafeArrayIn(IN_BSTR, aNames), ComSafeArrayIn(IN_BSTR, aValues))
STDMETHOD() SetProperty (IN_BSTR aName, IN_BSTR aValue)
MediaState_T state () const
 STDMETHOD (COMGETTER(MachineIds))(ComSafeGUIDArrayOut(aMachineIds))
 STDMETHOD (COMGETTER(LastAccessError))(BSTR *aLastAccessError)
 STDMETHOD (COMGETTER(Location))(BSTR *aLocation)
 STDMETHOD (COMGETTER(State))(MediaState_T *aState)
 STDMETHOD (COMSETTER(Description))(IN_BSTR aDescription)
 STDMETHOD (COMGETTER(Description))(BSTR *aDescription)
 STDMETHOD (COMGETTER(LogicalSize))(ULONG64 *aLogicalSize)
 STDMETHOD (COMGETTER(Root))(IHardDisk2 **aRoot)
 STDMETHOD (COMGETTER(Children))(ComSafeArrayOut(IHardDisk2 *
 STDMETHOD (COMGETTER(Parent))(IHardDisk2 **aParent)
 STDMETHOD (COMSETTER(Type))(HardDiskType_T aType)
 STDMETHOD (COMGETTER(Type))(HardDiskType_T *aType)
HardDiskType_T type () const
void uninit ()
STDMETHOD() UnlockRead (MediaState_T *aState)
STDMETHOD() UnlockWrite (MediaState_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 * 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
HRESULT createDiffStorage (ComObjPtr< HardDisk2 > &aTarget, ComObjPtr< Progress > *aProgress, bool aWait)
HRESULT deleteStorage (ComObjPtr< Progress > *aProgress, bool aWait)
const DependentChildren & dependentChildren () const
virtual const GUID & mainInterfaceID () const
HRESULT mergeTo (MergeChain *aChain, ComObjPtr< Progress > *aProgress, bool aWait)
void removeDependentChildren ()
HRESULT setError (HRESULT aResultCode, const GUID &aIID, const char *aText,...)
HRESULT setError (HRESULT aResultCode, const char *aText,...)
HRESULT setErrorV (HRESULT aResultCode, const char *aText, va_list aArgs)
HRESULT setStateError ()
HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const char *aText,...)
HRESULT setWarning (HRESULT aResultCode, const char *aText,...)
HRESULT setWarningV (HRESULT aResultCode, const char *aText, va_list aArgs)
WriteLockHandlestateLockHandle ()
RWLockHandletreeLock ()
void uninitDependentChildren ()

Static Protected Member Functions

static const char * className ()
static const char * className ()
static bool cutClassNameFrom__PRETTY_FUNCTION__ (char *aPrettyFunctionName)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const char *aComponent, const char *aText,...)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const char *aComponent, const char *aText)
static HRESULT setErrorInfo (IVirtualBoxErrorInfo *aInfo)
static HRESULT setErrorV (HRESULT aResultCode, const GUID &aIID, const char *aComponent, const char *aText, va_list aArgs)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const char *aComponent, const char *aText,...)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const char *aComponent, const char *aText)
static HRESULT setWarningV (HRESULT aResultCode, const GUID &aIID, const char *aComponent, const char *aText, va_list aArgs)

Protected Attributes

Data m
const ComObjPtr< VirtualBox,

Private Member Functions

HRESULT canAttach (const Guid &aMachineId, const Guid &aSnapshotId)
HRESULT canClose ()
HRESULT queryInfo ()
HRESULT setFormat (CBSTR aFormat)
HRESULT setLocation (CBSTR aLocation)
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(PVM
static DECLCALLBACK (void) vdErrorCall(void *pvUser

Private Attributes

static const char char size_t cchValue
Data mm
ComObjPtr< HardDisk2, ComWeakRefmParent
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  MergeChain
struct  Task

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

Generated by  Doxygen 1.6.0   Back to index