MediumImpl.h revision ad9723bdd9a951b0ba2f4338f03cad23c7ff7f3d
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox COM class implementation
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Copyright (C) 2008-2010 Oracle Corporation
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * available from http://www.virtualbox.org. This file is free software;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * you can redistribute it and/or modify it under the terms of the GNU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * General Public License (GPL) as published by the Free Software
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync////////////////////////////////////////////////////////////////////////////////
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Medium component class for all media types.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync // have to use a special enum for the overloaded init() below;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync // can't use AccessMode_T from XIDL because that's mapped to an int
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync // and would be ambiguous
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync // public initializer/uninitializer for internal purposes only
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync // initializer used when loading settings
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync // initializer for host floppy/DVD
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync // IMedium properties
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(COMGETTER(Description))(BSTR *aDescription);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync STDMETHOD(COMSETTER(Description))(IN_BSTR aDescription);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(COMGETTER(State))(MediumState_T *aState);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(COMGETTER(DeviceType))(DeviceType_T *aDeviceType);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(COMGETTER(MediumFormat))(IMediumFormat **aMediumFormat);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync STDMETHOD(COMGETTER(Children))(ComSafeArrayOut(IMedium *, aChildren));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(COMGETTER(LogicalSize))(ULONG64 *aLogicalSize);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(COMGETTER(LastAccessError))(BSTR *aLastAccessError);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(COMGETTER(MachineIds))(ComSafeArrayOut(BSTR, aMachineIds));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync // IMedium methods
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync STDMETHOD(GetProperty)(IN_BSTR aName, BSTR *aValue);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(SetProperty)(IN_BSTR aName, IN_BSTR aValue);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(SetProperties)(ComSafeArrayIn(IN_BSTR, aNames),
a2179871c3ee5a00079f273fbc72b6e2d704c68dvboxsync STDMETHOD(MergeTo)(IMedium *aTarget, IProgress **aProgress);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STDMETHOD(CloneTo)(IMedium *aTarget, MediumVariant_T aVariant,
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync STDMETHOD(Resize)(ULONG64 aLogicalSize, IProgress **aProgress);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync // public methods for internal purposes only
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync // unsafe methods for internal purposes only (ensure there is
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync // a caller and a read lock before calling them!)
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync const ComObjPtr<MediumFormat> & getMediumFormat() const;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const Guid* getFirstMachineBackrefSnapshotId() const;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync HRESULT updatePath(const char *aOldPath, const char *aNewPath);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync void updatePaths(const char *aOldPath, const char *aNewPath);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync ComObjPtr<Medium> getBase(uint32_t *aLevel = NULL);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync HRESULT compareLocationTo(const char *aLocation, int &aResult);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync HRESULT createMediumLockList(bool fFailIfInaccessible,
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync HRESULT createDiffStorage(ComObjPtr<Medium> &aTarget,
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync HRESULT deleteStorage(ComObjPtr<Progress> *aProgress, bool aWait, bool *pfNeedsSaveSettings);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync HRESULT prepareMergeTo(const ComObjPtr<Medium> &pTarget,
7220367ea1944fa8a7694534401321ad86eb70c6vboxsync void cancelMergeTo(const MediaList &aChildrenToReparent,
const char *pszzValid);
Data *m;