Index: /trunk/src/VBox/Main/include/HostUSBDeviceImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/HostUSBDeviceImpl.h	(revision 49959)
+++ /trunk/src/VBox/Main/include/HostUSBDeviceImpl.h	(revision 49960)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2013 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -26,4 +26,5 @@
 #include <VBox/usb.h>
 #include "Logging.h"
+#include "HostUSBDeviceWrap.h"
 
 class SessionMachine;
@@ -169,21 +170,8 @@
  */
 class ATL_NO_VTABLE HostUSBDevice :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IHostUSBDevice)
+    public HostUSBDeviceWrap
 {
 public:
-
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(HostUSBDevice, IHostUSBDevice)
-
-    DECLARE_NOT_AGGREGATABLE(HostUSBDevice)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(HostUSBDevice)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(IHostUSBDevice)
-        COM_INTERFACE_ENTRY(IUSBDevice)
-    END_COM_MAP()
-
-    DECLARE_EMPTY_CTOR_DTOR (HostUSBDevice)
+    DECLARE_EMPTY_CTOR_DTOR(HostUSBDevice)
 
     HRESULT FinalConstruct();
@@ -194,34 +182,17 @@
     void uninit();
 
-    // IUSBDevice properties
-    STDMETHOD(COMGETTER(Id))(BSTR *aId);
-    STDMETHOD(COMGETTER(VendorId))(USHORT *aVendorId);
-    STDMETHOD(COMGETTER(ProductId))(USHORT *aProductId);
-    STDMETHOD(COMGETTER(Revision))(USHORT *aRevision);
-    STDMETHOD(COMGETTER(Manufacturer))(BSTR *aManufacturer);
-    STDMETHOD(COMGETTER(Product))(BSTR *aProduct);
-    STDMETHOD(COMGETTER(SerialNumber))(BSTR *aSerialNumber);
-    STDMETHOD(COMGETTER(Address))(BSTR *aAddress);
-    STDMETHOD(COMGETTER(Port))(USHORT *aPort);
-    STDMETHOD(COMGETTER(Version))(USHORT *aVersion);
-    STDMETHOD(COMGETTER(PortVersion))(USHORT *aPortVersion);
-    STDMETHOD(COMGETTER(Remote))(BOOL *aRemote);
-
-    // IHostUSBDevice properties
-    STDMETHOD(COMGETTER(State))(USBDeviceState_T *aState);
-
     // public methods only for internal purposes
 
     /** @note Must be called from under the object read lock. */
-    const Guid& getId() const { return mId; }
-
-    /** @note Must be called from under the object read lock. */
-    HostUSBDeviceState getUnistate() const { return mUniState; }
-
-    /** @note Must be called from under the object read lock. */
-    const char *getStateName() { return stateName (mUniState, mPendingUniState, mUniSubState); }
-
-    /** @note Must be called from under the object read lock. */
-    bool isCapturableOrHeld()
+    const Guid& i_getId() const { return mId; }
+
+    /** @note Must be called from under the object read lock. */
+    HostUSBDeviceState i_getUnistate() const { return mUniState; }
+
+    /** @note Must be called from under the object read lock. */
+    const char *i_getStateName() { return i_stateName (mUniState, mPendingUniState, mUniSubState); }
+
+    /** @note Must be called from under the object read lock. */
+    bool i_isCapturableOrHeld()
     {
         return mUniState == kHostUSBDeviceState_Unused
@@ -231,44 +202,62 @@
 
     /** @note Must be called from under the object read lock. */
-    ComObjPtr<SessionMachine> &getMachine() { return mMachine; }
-
-    /** @note Must be called from under the object read lock. */
-    PCUSBDEVICE getUsbData() const { return mUsb; }
-
-    Utf8Str getName();
-
-    HRESULT requestCaptureForVM(SessionMachine *aMachine, bool aSetError, ULONG aMaskedIfs = 0);
-    HRESULT onDetachFromVM(SessionMachine *aMachine, bool aDone, bool *aRunFilters, bool aAbnormal = false);
-    HRESULT requestReleaseToHost();
-    HRESULT requestHold();
-    bool wasActuallyDetached();
-    void onPhysicalDetached();
-
-    bool isMatch(const USBDeviceFilter::Data &aData);
-    int compare(PCUSBDEVICE aDev2);
-    static int compare(PCUSBDEVICE aDev1, PCUSBDEVICE aDev2, bool aIsAwaitingReAttach = false);
-
-    bool updateState(PCUSBDEVICE aDev, bool *aRunFilters, SessionMachine **aIgnoreMachine);
-    bool updateStateFake(PCUSBDEVICE aDev, bool *aRunFilters, SessionMachine **aIgnoreMachine);
-
-    static const char *stateName(HostUSBDeviceState aState,
-                                 HostUSBDeviceState aPendingState = kHostUSBDeviceState_Invalid,
-                                 HostUSBDeviceSubState aSubState = kHostUSBDeviceSubState_Default);
+    ComObjPtr<SessionMachine> &i_getMachine() { return mMachine; }
+
+    /** @note Must be called from under the object read lock. */
+    PCUSBDEVICE i_getUsbData() const { return mUsb; }
+
+    com::Utf8Str i_getName();
+
+    HRESULT i_requestCaptureForVM(SessionMachine *aMachine, bool aSetError, ULONG aMaskedIfs = 0);
+    HRESULT i_onDetachFromVM(SessionMachine *aMachine, bool aDone, bool *aRunFilters, bool aAbnormal = false);
+    HRESULT i_requestReleaseToHost();
+    HRESULT i_requestHold();
+    bool i_wasActuallyDetached();
+    void i_onPhysicalDetached();
+
+    bool i_isMatch(const USBDeviceFilter::Data &aData);
+    int i_compare(PCUSBDEVICE aDev2);
+    static int i_compare(PCUSBDEVICE aDev1, PCUSBDEVICE aDev2, bool aIsAwaitingReAttach = false);
+
+    bool i_updateState(PCUSBDEVICE aDev, bool *aRunFilters, SessionMachine **aIgnoreMachine);
+    bool i_updateStateFake(PCUSBDEVICE aDev, bool *aRunFilters, SessionMachine **aIgnoreMachine);
+
+    static const char *i_stateName(HostUSBDeviceState aState,
+                                   HostUSBDeviceState aPendingState = kHostUSBDeviceState_Invalid,
+                                   HostUSBDeviceSubState aSubState = kHostUSBDeviceSubState_Default);
 
 protected:
-    HRESULT attachToVM(SessionMachine *aMachine, ULONG aMaskedIfs = 0);
-    void detachFromVM(HostUSBDeviceState aFinalState);
-    void onPhysicalDetachedInternal();
-    bool hasAsyncOperationTimedOut() const;
-
-    bool setState (HostUSBDeviceState aNewState, HostUSBDeviceState aNewPendingState = kHostUSBDeviceState_Invalid,
-                   HostUSBDeviceSubState aNewSubState = kHostUSBDeviceSubState_Default);
-    bool startTransition (HostUSBDeviceState aNewState, HostUSBDeviceState aFinalState,
-                          HostUSBDeviceSubState aNewSubState = kHostUSBDeviceSubState_Default);
-    bool advanceTransition(bool aSkipReAttach = false);
-    bool failTransition();
-    USBDeviceState_T canonicalState() const;
+
+    HRESULT i_attachToVM(SessionMachine *aMachine, ULONG aMaskedIfs = 0);
+    void i_detachFromVM(HostUSBDeviceState aFinalState);
+    void i_onPhysicalDetachedInternal();
+    bool i_hasAsyncOperationTimedOut() const;
+
+    bool i_setState (HostUSBDeviceState aNewState, HostUSBDeviceState aNewPendingState = kHostUSBDeviceState_Invalid,
+                     HostUSBDeviceSubState aNewSubState = kHostUSBDeviceSubState_Default);
+    bool i_startTransition (HostUSBDeviceState aNewState, HostUSBDeviceState aFinalState,
+                            HostUSBDeviceSubState aNewSubState = kHostUSBDeviceSubState_Default);
+    bool i_advanceTransition(bool aSkipReAttach = false);
+    bool i_failTransition();
+    USBDeviceState_T i_canonicalState() const;
 
 private:
+
+    // wrapped IUSBDevice properties
+    HRESULT getId(com::Guid &aId);
+    HRESULT getVendorId(USHORT *aVendorId);
+    HRESULT getProductId(USHORT *aProductId);
+    HRESULT getRevision(USHORT *aRevision);
+    HRESULT getManufacturer(com::Utf8Str &aManufacturer);
+    HRESULT getProduct(com::Utf8Str &aProduct);
+    HRESULT getSerialNumber(com::Utf8Str &aSerialNumber);
+    HRESULT getAddress(com::Utf8Str &aAddress);
+    HRESULT getPort(USHORT *aPort);
+    HRESULT getVersion(USHORT *aVersion);
+    HRESULT getPortVersion(USHORT *aPortVersion);
+    HRESULT getRemote(BOOL *aRemote);
+    HRESULT getName(com::Utf8Str &aName);
+    HRESULT getState(USBDeviceState_T *aState);
+
 
     const Guid mId;
Index: /trunk/src/VBox/Main/include/SnapshotImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/SnapshotImpl.h	(revision 49959)
+++ /trunk/src/VBox/Main/include/SnapshotImpl.h	(revision 49960)
@@ -7,5 +7,5 @@
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2013 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -21,7 +21,5 @@
 #define ____H_SNAPSHOTIMPL
 
-#include "VirtualBoxBase.h"
-
-#include <iprt/time.h>
+#include "SnapshotWrap.h"
 
 class SnapshotMachine;
@@ -33,23 +31,8 @@
 
 class ATL_NO_VTABLE Snapshot :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(ISnapshot)
+    public SnapshotWrap
 {
 public:
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(Snapshot, ISnapshot)
-
-    DECLARE_NOT_AGGREGATABLE(Snapshot)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(Snapshot)
-        VBOX_DEFAULT_INTERFACE_ENTRIES (ISnapshot)
-    END_COM_MAP()
-
-    Snapshot()
-        : m(NULL)
-    { };
-    ~Snapshot()
-    { };
+    DECLARE_EMPTY_CTOR_DTOR(Snapshot)
 
     HRESULT FinalConstruct();
@@ -66,22 +49,7 @@
     void uninit();
 
-    void beginSnapshotDelete();
+    void i_beginSnapshotDelete();
 
-    void deparent();
-
-    // ISnapshot properties
-    STDMETHOD(COMGETTER(Id))(BSTR *aId);
-    STDMETHOD(COMGETTER(Name))(BSTR *aName);
-    STDMETHOD(COMSETTER(Name))(IN_BSTR aName);
-    STDMETHOD(COMGETTER(Description))(BSTR *aDescription);
-    STDMETHOD(COMSETTER(Description))(IN_BSTR aDescription);
-    STDMETHOD(COMGETTER(TimeStamp))(LONG64 *aTimeStamp);
-    STDMETHOD(COMGETTER(Online))(BOOL *aOnline);
-    STDMETHOD(COMGETTER(Machine))(IMachine **aMachine);
-    STDMETHOD(COMGETTER(Parent))(ISnapshot **aParent);
-    STDMETHOD(COMGETTER(Children))(ComSafeArrayOut(ISnapshot *, aChildren));
-
-    // ISnapshot methods
-    STDMETHOD(GetChildrenCount)(ULONG* count);
+    void i_deparent();
 
     // public methods only for internal purposes
@@ -91,47 +59,65 @@
      * order with the standard member lock handle.
      */
-    virtual VBoxLockingClass getLockingClass() const
+    virtual VBoxLockingClass i_getLockingClass() const
     {
         return LOCKCLASS_SNAPSHOTOBJECT;
     }
 
-    const ComObjPtr<Snapshot>& getParent() const;
-    const ComObjPtr<Snapshot> getFirstChild() const;
+    const ComObjPtr<Snapshot>& i_getParent() const;
+    const ComObjPtr<Snapshot> i_getFirstChild() const;
 
-    const Utf8Str& getStateFilePath() const;
+    const Utf8Str& i_getStateFilePath() const;
 
-    uint32_t getDepth();
+    uint32_t i_getDepth();
 
-    ULONG getChildrenCount();
-    ULONG getAllChildrenCount();
-    ULONG getAllChildrenCountImpl();
+    ULONG i_getChildrenCount();
+    ULONG i_getAllChildrenCount();
+    ULONG i_getAllChildrenCountImpl();
 
-    const ComObjPtr<SnapshotMachine>& getSnapshotMachine() const;
+    const ComObjPtr<SnapshotMachine>& i_getSnapshotMachine() const;
 
-    Guid getId() const;
-    const Utf8Str& getName() const;
-    RTTIMESPEC getTimeStamp() const;
+    Guid i_getId() const;
+    const Utf8Str& i_getName() const;
+    RTTIMESPEC i_getTimeStamp() const;
 
-    ComObjPtr<Snapshot> findChildOrSelf(IN_GUID aId);
-    ComObjPtr<Snapshot> findChildOrSelf(const Utf8Str &aName);
+    ComObjPtr<Snapshot> i_findChildOrSelf(IN_GUID aId);
+    ComObjPtr<Snapshot> i_findChildOrSelf(const Utf8Str &aName);
 
-    void updateSavedStatePaths(const Utf8Str &strOldPath,
-                               const Utf8Str &strNewPath);
-    void updateSavedStatePathsImpl(const Utf8Str &strOldPath,
-                                   const Utf8Str &strNewPath);
+    void i_updateSavedStatePaths(const Utf8Str &strOldPath,
+                                 const Utf8Str &strNewPath);
+    void i_updateSavedStatePathsImpl(const Utf8Str &strOldPath,
+                                     const Utf8Str &strNewPath);
 
-    bool sharesSavedStateFile(const Utf8Str &strPath,
-                              Snapshot *pSnapshotToIgnore);
+    bool i_sharesSavedStateFile(const Utf8Str &strPath,
+                                Snapshot *pSnapshotToIgnore);
 
-    HRESULT saveSnapshot(settings::Snapshot &data, bool aAttrsOnly);
-    HRESULT saveSnapshotImpl(settings::Snapshot &data, bool aAttrsOnly);
+    HRESULT i_saveSnapshot(settings::Snapshot &data, bool aAttrsOnly);
+    HRESULT i_saveSnapshotImpl(settings::Snapshot &data, bool aAttrsOnly);
 
-    HRESULT uninitRecursively(AutoWriteLock &writeLock,
-                              CleanupMode_T cleanupMode,
-                              MediaList &llMedia,
-                              std::list<Utf8Str> &llFilenames);
+    HRESULT i_uninitRecursively(AutoWriteLock &writeLock,
+                                CleanupMode_T cleanupMode,
+                                MediaList &llMedia,
+                                std::list<Utf8Str> &llFilenames);
+
 
 private:
+
     struct Data;            // opaque, defined in SnapshotImpl.cpp
+
+    // wrapped ISnapshot properties
+    HRESULT getId(com::Guid &aId);
+    HRESULT getName(com::Utf8Str &aName);
+    HRESULT setName(const com::Utf8Str &aName);
+    HRESULT getDescription(com::Utf8Str &aDescription);
+    HRESULT setDescription(const com::Utf8Str &aDescription);
+    HRESULT getTimeStamp(LONG64 *aTimeStamp);
+    HRESULT getOnline(BOOL *aOnline);
+    HRESULT getMachine(ComPtr<IMachine> &aMachine);
+    HRESULT getParent(ComPtr<ISnapshot> &aParent);
+    HRESULT getChildren(std::vector<ComPtr<ISnapshot> > &aChildren);
+
+    // wrapped ISnapshot methods
+    HRESULT getChildrenCount(ULONG *aChildrenCount);
+
     Data *m;
 };
Index: /trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp	(revision 49960)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2005-2012 Oracle Corporation
+ * Copyright (C) 2005-2013 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -15,4 +15,5 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 
 #include <iprt/types.h> /* for UINT64_C */
@@ -92,5 +93,5 @@
 
     /* Set the name. */
-    mNameObj = getName();
+    mNameObj = i_getName();
     mName = mNameObj.c_str();
 
@@ -122,27 +123,17 @@
 }
 
-// IUSBDevice properties
+// Wrapped IUSBDevice properties
 /////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP HostUSBDevice::COMGETTER(Id)(BSTR *aId)
-{
-    CheckComArgOutPointerValid(aId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDevice::getId(com::Guid &aId)
+{
     /* mId is constant during life time, no need to lock */
-    mId.toUtf16().cloneTo(aId);
+    aId = mId;
 
     return S_OK;
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(VendorId)(USHORT *aVendorId)
-{
-    CheckComArgOutPointerValid(aVendorId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDevice::getVendorId(USHORT *aVendorId)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -152,11 +143,6 @@
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(ProductId)(USHORT *aProductId)
-{
-    CheckComArgOutPointerValid(aProductId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDevice::getProductId(USHORT *aProductId)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -166,11 +152,7 @@
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(Revision)(USHORT *aRevision)
-{
-    CheckComArgOutPointerValid(aRevision);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDevice::getRevision(USHORT *aRevision)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -180,67 +162,43 @@
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(Manufacturer)(BSTR *aManufacturer)
-{
-    CheckComArgOutPointerValid(aManufacturer);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDevice::getManufacturer(com::Utf8Str &aManufacturer)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Bstr(mUsb->pszManufacturer).cloneTo(aManufacturer);
+    aManufacturer = mUsb->pszManufacturer;
 
     return S_OK;
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(Product)(BSTR *aProduct)
-{
-    CheckComArgOutPointerValid(aProduct);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDevice::getProduct(com::Utf8Str &aProduct)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Bstr(mUsb->pszProduct).cloneTo(aProduct);
+    aProduct = mUsb->pszProduct;
 
     return S_OK;
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(SerialNumber)(BSTR *aSerialNumber)
-{
-    CheckComArgOutPointerValid(aSerialNumber);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDevice::getSerialNumber(com::Utf8Str &aSerialNumber)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Bstr(mUsb->pszSerialNumber).cloneTo(aSerialNumber);
+    aSerialNumber = mUsb->pszSerialNumber;
 
     return S_OK;
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(Address)(BSTR *aAddress)
-{
-    CheckComArgOutPointerValid(aAddress);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDevice::getAddress(com::Utf8Str &aAddress)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    Bstr(mUsb->pszAddress).cloneTo(aAddress);
-
+    aAddress = mUsb->pszAddress;
     return S_OK;
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(Port)(USHORT *aPort)
-{
-    CheckComArgOutPointerValid(aPort);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDevice::getPort(USHORT *aPort)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -254,11 +212,7 @@
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(Version)(USHORT *aVersion)
-{
-    CheckComArgOutPointerValid(aVersion);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDevice::getVersion(USHORT *aVersion)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -268,13 +222,7 @@
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(PortVersion)(USHORT *aPortVersion)
-{
-    CheckComArgOutPointerValid(aPortVersion);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDevice::getPortVersion(USHORT *aPortVersion)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
     /* Port version is 2 (EHCI) if and only if the device runs at high speed;
      * if speed is unknown, fall back to the old and inaccurate method.
@@ -288,11 +236,7 @@
 }
 
-STDMETHODIMP HostUSBDevice::COMGETTER(Remote)(BOOL *aRemote)
-{
-    CheckComArgOutPointerValid(aRemote);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDevice::getRemote(BOOL *aRemote)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -302,17 +246,10 @@
 }
 
-// IHostUSBDevice properties
-/////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP HostUSBDevice::COMGETTER(State)(USBDeviceState_T *aState)
-{
-    CheckComArgOutPointerValid(aState);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDevice::getState(USBDeviceState_T *aState)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aState = canonicalState();
+    *aState = i_canonicalState();
 
     return S_OK;
@@ -326,5 +263,5 @@
  * @note Locks this object for reading.
  */
-Utf8Str HostUSBDevice::getName()
+com::Utf8Str HostUSBDevice::i_getName()
 {
     Utf8Str name;
@@ -366,5 +303,5 @@
  * @retval  E_* as appropriate.
  */
-HRESULT HostUSBDevice::requestCaptureForVM(SessionMachine *aMachine, bool aSetError, ULONG aMaskedIfs /* = 0*/)
+HRESULT HostUSBDevice::i_requestCaptureForVM(SessionMachine *aMachine, bool aSetError, ULONG aMaskedIfs /* = 0*/)
 {
     /*
@@ -406,5 +343,5 @@
             return setError(E_INVALIDARG,
                             tr("USB device '%s' with UUID {%RTuuid} is not in the right state for capturing (%s)"),
-                            mName, mId.raw(), getStateName());
+                            mName, mId.raw(), i_getStateName());
     }
 
@@ -422,5 +359,5 @@
     {
         alock.release();
-        HRESULT hrc = attachToVM(aMachine, aMaskedIfs);
+        HRESULT hrc = i_attachToVM(aMachine, aMaskedIfs);
         return SUCCEEDED(hrc);
     }
@@ -435,7 +372,7 @@
 #if (defined(RT_OS_DARWIN) && defined(VBOX_WITH_NEW_USB_CODE_ON_DARWIN)) /* PORTME */ \
  || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS)
-    setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM, kHostUSBDeviceSubState_AwaitingDetach);
+    i_setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM, kHostUSBDeviceSubState_AwaitingDetach);
 #else
-    setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM);
+    i_setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM);
 #endif
     mMachine = aMachine;
@@ -446,5 +383,5 @@
     {
         alock.acquire();
-        failTransition();
+        i_failTransition();
         mMachine.setNull();
         if (rc == VERR_SHARING_VIOLATION)
@@ -475,5 +412,5 @@
  * @param   aMaskedIfs      The interfaces to hide from the guest.
  */
-HRESULT HostUSBDevice::attachToVM(SessionMachine *aMachine, ULONG aMaskedIfs /* = 0*/)
+HRESULT HostUSBDevice::i_attachToVM(SessionMachine *aMachine, ULONG aMaskedIfs /* = 0*/)
 {
     AssertReturn(!isWriteLockOnCurrentThread(), E_FAIL);
@@ -486,5 +423,5 @@
                  || mUniState == kHostUSBDeviceState_AttachingToVM,
                  E_UNEXPECTED);
-    setState(kHostUSBDeviceState_AttachingToVM, kHostUSBDeviceState_UsedByVM);
+    i_setState(kHostUSBDeviceState_AttachingToVM, kHostUSBDeviceState_UsedByVM);
 
     /*
@@ -515,9 +452,9 @@
         mMachine = aMachine;
         if (!mIsPhysicallyDetached)
-            setState(kHostUSBDeviceState_UsedByVM);
+            i_setState(kHostUSBDeviceState_UsedByVM);
         else
         {
             alock.release();
-            detachFromVM(kHostUSBDeviceState_PhysDetached);
+            i_detachFromVM(kHostUSBDeviceState_PhysDetached);
             hrc = E_UNEXPECTED;
         }
@@ -528,5 +465,5 @@
         if (!mIsPhysicallyDetached)
         {
-            setState(kHostUSBDeviceState_HeldByProxy);
+            i_setState(kHostUSBDeviceState_HeldByProxy);
             if (hrc == E_UNEXPECTED)
                 hrc = E_FAIL; /* No confusion. */
@@ -535,5 +472,5 @@
         {
             alock.release();
-            onPhysicalDetachedInternal();
+            i_onPhysicalDetachedInternal();
             hrc = E_UNEXPECTED;
         }
@@ -551,5 +488,5 @@
  * @param   aFinalState     The final state (PhysDetached).
  */
-void HostUSBDevice::detachFromVM(HostUSBDeviceState aFinalState)
+void HostUSBDevice::i_detachFromVM(HostUSBDeviceState aFinalState)
 {
     NOREF(aFinalState);
@@ -570,5 +507,5 @@
      * so, it's not a bit issue here.
      */
-    setState(kHostUSBDeviceState_PhysDetachingFromVM, kHostUSBDeviceState_PhysDetached);
+    i_setState(kHostUSBDeviceState_PhysDetachingFromVM, kHostUSBDeviceState_PhysDetached);
 
     /*
@@ -589,5 +526,5 @@
      */
     alock.acquire();
-    advanceTransition();
+    i_advanceTransition();
 }
 
@@ -612,7 +549,7 @@
  * @note    Must be called from under the object write lock.
  */
-HRESULT HostUSBDevice::onDetachFromVM(SessionMachine *aMachine, bool aDone, bool *aRunFilters, bool aAbnormal /*= true*/)
-{
-    LogFlowThisFunc(("{%s} state=%s aDone=%RTbool aAbnormal=%RTbool\n", mName, getStateName(), aDone, aAbnormal));
+HRESULT HostUSBDevice::i_onDetachFromVM(SessionMachine *aMachine, bool aDone, bool *aRunFilters, bool aAbnormal /*= true*/)
+{
+    LogFlowThisFunc(("{%s} state=%s aDone=%RTbool aAbnormal=%RTbool\n", mName, i_getStateName(), aDone, aAbnormal));
 
     /*
@@ -626,10 +563,10 @@
             return setError(E_INVALIDARG,
                             tr("USB device '%s' with UUID {%RTuuid} is busy (state '%s'). Please try again later"),
-                            mName, mId.raw(), getStateName());
+                            mName, mId.raw(), i_getStateName());
     }
     else
         AssertMsgReturn(    mUniState == kHostUSBDeviceState_DetachingFromVM /** @todo capturing for VM ends up here on termination. */
                         ||  (mUniState == kHostUSBDeviceState_UsedByVM && aAbnormal),
-                        ("{%s} %s\n", mName, getStateName()), E_UNEXPECTED);
+                        ("{%s} %s\n", mName, i_getStateName()), E_UNEXPECTED);
     AssertMsgReturn((mMachine == aMachine), ("%p != %p\n", (void *)mMachine, aMachine), E_FAIL);
 
@@ -639,5 +576,5 @@
     if (!aDone)
     {
-        *aRunFilters = startTransition(kHostUSBDeviceState_DetachingFromVM, kHostUSBDeviceState_HeldByProxy);
+        *aRunFilters = i_startTransition(kHostUSBDeviceState_DetachingFromVM, kHostUSBDeviceState_HeldByProxy);
         /* PORTME: This might require host specific changes if you re-enumerate the device. */
     }
@@ -646,6 +583,6 @@
         /* Fast forward thru the DetachingFromVM state and on to HeldByProxy. */
         /** @todo need to update the state machine to handle crashed VMs. */
-        startTransition(kHostUSBDeviceState_DetachingFromVM, kHostUSBDeviceState_HeldByProxy);
-        *aRunFilters = advanceTransition();
+        i_startTransition(kHostUSBDeviceState_DetachingFromVM, kHostUSBDeviceState_HeldByProxy);
+        *aRunFilters = i_advanceTransition();
         mMachine.setNull();
         /* PORTME: ditto / trouble if you depend on the VM process to do anything. */
@@ -655,5 +592,5 @@
         /* normal completion. */
         Assert(mUniSubState == kHostUSBDeviceSubState_Default); /* PORTME: ditto */
-        *aRunFilters = advanceTransition();
+        *aRunFilters = i_advanceTransition();
         mMachine.setNull();
     }
@@ -675,5 +612,5 @@
  * @note Must be called without holding the object lock.
  */
-HRESULT HostUSBDevice::requestReleaseToHost()
+HRESULT HostUSBDevice::i_requestReleaseToHost()
 {
     /*
@@ -688,5 +625,5 @@
         ||  mUniState == kHostUSBDeviceState_Capturable)
         return S_OK;
-    AssertMsgReturn(mUniState == kHostUSBDeviceState_HeldByProxy, ("{%s} %s\n", mName, getStateName()), E_UNEXPECTED);
+    AssertMsgReturn(mUniState == kHostUSBDeviceState_HeldByProxy, ("{%s} %s\n", mName, i_getStateName()), E_UNEXPECTED);
 
     /*
@@ -695,7 +632,7 @@
 #if (defined(RT_OS_DARWIN) && defined(VBOX_WITH_NEW_USB_CODE_ON_DARWIN)) /* PORTME */ \
  || defined(RT_OS_WINDOWS)
-    startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused, kHostUSBDeviceSubState_AwaitingDetach);
+    i_startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused, kHostUSBDeviceSubState_AwaitingDetach);
 #else
-    startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused);
+    i_startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused);
 #endif
     alock.release();
@@ -704,5 +641,5 @@
     {
         alock.acquire();
-        failTransition();
+        i_failTransition();
         return E_FAIL;
     }
@@ -724,5 +661,5 @@
  * @note Must be called without holding the object lock.
  */
-HRESULT HostUSBDevice::requestHold()
+HRESULT HostUSBDevice::i_requestHold()
 {
     /*
@@ -735,5 +672,5 @@
                     || mUniState == kHostUSBDeviceState_Capturable
                     || mUniState == kHostUSBDeviceState_HeldByProxy,
-                    ("{%s} %s\n", mName, getStateName()),
+                    ("{%s} %s\n", mName, i_getStateName()),
                     E_UNEXPECTED);
 
@@ -749,7 +686,7 @@
 #if (defined(RT_OS_DARWIN) && defined(VBOX_WITH_NEW_USB_CODE_ON_DARWIN)) /* PORTME */ \
  || defined(RT_OS_WINDOWS)
-    startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy, kHostUSBDeviceSubState_AwaitingDetach);
+    i_startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy, kHostUSBDeviceSubState_AwaitingDetach);
 #else
-    startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy);
+    i_startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy);
 #endif
     alock.release();
@@ -758,5 +695,5 @@
     {
         alock.acquire();
-        failTransition();
+        i_failTransition();
         return E_FAIL;
     }
@@ -774,5 +711,5 @@
  * @returns true if it was actually detached, false if it's just a re-enumeration.
  */
-bool HostUSBDevice::wasActuallyDetached()
+bool HostUSBDevice::i_wasActuallyDetached()
 {
     /*
@@ -792,5 +729,5 @@
                  */
                 case kHostUSBDeviceSubState_AwaitingDetach:
-                    advanceTransition();
+                    i_advanceTransition();
                     return false; /* not physically detached. */
 
@@ -804,6 +741,6 @@
                     if (elapsedNanoseconds > UINT64_C(60000000000)) /* 60 seconds */
                     {
-                        LogRel(("USB: Async operation timed out for device %s (state: %s)\n", mName, getStateName()));
-                        failTransition();
+                        LogRel(("USB: Async operation timed out for device %s (state: %s)\n", mName, i_getStateName()));
+                        i_failTransition();
                     }
 #endif
@@ -829,5 +766,5 @@
 
         default:
-            AssertLogRelMsgFailed(("this=%p %s\n", this, getStateName()));
+            AssertLogRelMsgFailed(("this=%p %s\n", this, i_getStateName()));
             break;
     }
@@ -847,5 +784,5 @@
  * reset.
  */
-void HostUSBDevice::onPhysicalDetached()
+void HostUSBDevice::i_onPhysicalDetached()
 {
     AssertReturnVoid(!isWriteLockOnCurrentThread());
@@ -857,5 +794,5 @@
     {
         alock.release();
-        onPhysicalDetachedInternal();
+        i_onPhysicalDetachedInternal();
     }
 }
@@ -868,5 +805,5 @@
  * See onPhysicalDetach() for details.
  */
-void HostUSBDevice::onPhysicalDetachedInternal()
+void HostUSBDevice::i_onPhysicalDetachedInternal()
 {
     AssertReturnVoid(!isWriteLockOnCurrentThread());
@@ -883,9 +820,9 @@
     {
         alock.release();
-        detachFromVM(kHostUSBDeviceState_PhysDetached);
+        i_detachFromVM(kHostUSBDeviceState_PhysDetached);
         alock.acquire();
     }
     else
-        AssertMsg(mMachine.isNull(), ("%s\n", getStateName()));
+        AssertMsg(mMachine.isNull(), ("%s\n", i_getStateName()));
 
     /*
@@ -893,5 +830,5 @@
      */
     mMachine.setNull();
-    setState(kHostUSBDeviceState_PhysDetached);
+    i_setState(kHostUSBDeviceState_PhysDetached);
 }
 
@@ -910,5 +847,5 @@
  *  @note Locks this object for reading.
  */
-bool HostUSBDevice::isMatch(const USBDeviceFilter::Data &aData)
+bool HostUSBDevice::i_isMatch(const USBDeviceFilter::Data &aData)
 {
     AutoCaller autoCaller(this);
@@ -950,11 +887,11 @@
  * @note Must be called from under the object write lock.
  */
-int HostUSBDevice::compare(PCUSBDEVICE aDev2)
+int HostUSBDevice::i_compare(PCUSBDEVICE aDev2)
 {
     AssertReturn(isWriteLockOnCurrentThread(), -1);
     //Log3(("%Rfn: %p {%s}\n", __PRETTY_FUNCTION__, this, mName));
-    return compare(mUsb, aDev2,
-                      mUniSubState == kHostUSBDeviceSubState_AwaitingDetach /* (In case we don't get the detach notice.) */
-                   || mUniSubState == kHostUSBDeviceSubState_AwaitingReAttach);
+    return i_compare(mUsb, aDev2,
+                        mUniSubState == kHostUSBDeviceSubState_AwaitingDetach /* (In case we don't get the detach notice.) */
+                     || mUniSubState == kHostUSBDeviceSubState_AwaitingReAttach);
 }
 
@@ -972,5 +909,5 @@
  */
 /*static*/
-int HostUSBDevice::compare(PCUSBDEVICE aDev1, PCUSBDEVICE aDev2, bool aIsAwaitingReAttach /*= false */)
+int HostUSBDevice::i_compare(PCUSBDEVICE aDev1, PCUSBDEVICE aDev2, bool aIsAwaitingReAttach /*= false */)
 {
     /*
@@ -1075,5 +1012,5 @@
  *          works by state change. Using 3 return codes/parameters is just plain ugly.
  */
-bool HostUSBDevice::updateState(PCUSBDEVICE aDev, bool *aRunFilters, SessionMachine **aIgnoreMachine)
+bool HostUSBDevice::i_updateState(PCUSBDEVICE aDev, bool *aRunFilters, SessionMachine **aIgnoreMachine)
 {
     *aRunFilters = false;
@@ -1167,5 +1104,5 @@
     if (enmOldState != mUsb->enmState)
     {
-        LogFlowThisFunc(("%p {%s} %s\n", this, mName, getStateName()));
+        LogFlowThisFunc(("%p {%s} %s\n", this, mName, i_getStateName()));
         switch (mUsb->enmState)
         {
@@ -1179,6 +1116,6 @@
                     case kHostUSBDeviceState_Capturable:
                     case kHostUSBDeviceState_Unused:
-                        LogThisFunc(("{%s} %s -> %s\n", mName, getStateName(), stateName(kHostUSBDeviceState_UsedByHost)));
-                        *aRunFilters = setState(kHostUSBDeviceState_UsedByHost);
+                        LogThisFunc(("{%s} %s -> %s\n", mName, i_getStateName(), i_stateName(kHostUSBDeviceState_UsedByHost)));
+                        *aRunFilters = i_setState(kHostUSBDeviceState_UsedByHost);
                         break;
                     case kHostUSBDeviceState_UsedByHost:
@@ -1189,5 +1126,5 @@
                         LogThisFunc(("{%s} capture failed!\n", mName));
                         mUSBProxyService->captureDeviceCompleted(this, false /* aSuccess */);
-                        *aRunFilters = failTransition();
+                        *aRunFilters = i_failTransition();
                         mMachine.setNull();
                         break;
@@ -1195,7 +1132,7 @@
                     /* Guess we've successfully released it. */
                     case kHostUSBDeviceState_ReleasingToHost:
-                        LogThisFunc(("{%s} %s -> %s\n", mName, getStateName(), stateName(kHostUSBDeviceState_UsedByHost)));
+                        LogThisFunc(("{%s} %s -> %s\n", mName, i_getStateName(), i_stateName(kHostUSBDeviceState_UsedByHost)));
                         mUSBProxyService->releaseDeviceCompleted(this, true /* aSuccess */);
-                        *aRunFilters = setState(kHostUSBDeviceState_UsedByHost);
+                        *aRunFilters = i_setState(kHostUSBDeviceState_UsedByHost);
                         break;
 
@@ -1204,5 +1141,5 @@
                     case kHostUSBDeviceState_DetachingFromVM:
                     case kHostUSBDeviceState_PhysDetachingFromVM:
-                        LogThisFunc(("{%s} %s - changed to USED_BY_HOST...\n", mName, getStateName()));
+                        LogThisFunc(("{%s} %s - changed to USED_BY_HOST...\n", mName, i_getStateName()));
                         break;
 
@@ -1210,6 +1147,6 @@
                     /* Fake: We can't prevent anyone from grabbing it. */
                     case kHostUSBDeviceState_HeldByProxy:
-                        LogThisFunc(("{%s} %s -> %s!\n", mName, getStateName(), stateName(kHostUSBDeviceState_UsedByHost)));
-                        *aRunFilters = setState(kHostUSBDeviceState_UsedByHost);
+                        LogThisFunc(("{%s} %s -> %s!\n", mName, i_getStateName(), i_stateName(kHostUSBDeviceState_UsedByHost)));
+                        *aRunFilters = i_setState(kHostUSBDeviceState_UsedByHost);
                         break;
                     //case kHostUSBDeviceState_UsedByVM:
@@ -1225,5 +1162,5 @@
                     case kHostUSBDeviceState_Unsupported:
                     default:
-                        AssertMsgFailed(("{%s} %s\n", mName, getStateName()));
+                        AssertMsgFailed(("{%s} %s\n", mName, i_getStateName()));
                         break;
                 }
@@ -1249,6 +1186,6 @@
                         fIsImportant = true;
                     case kHostUSBDeviceState_Unused:
-                        LogThisFunc(("{%s} %s -> %s\n", mName, getStateName(), stateName(kHostUSBDeviceState_Capturable)));
-                        *aRunFilters = setState(kHostUSBDeviceState_Capturable);
+                        LogThisFunc(("{%s} %s -> %s\n", mName, i_getStateName(), i_stateName(kHostUSBDeviceState_Capturable)));
+                        *aRunFilters = i_setState(kHostUSBDeviceState_Capturable);
                         break;
 
@@ -1257,5 +1194,5 @@
                         LogThisFunc(("{%s} capture failed!\n", mName));
                         mUSBProxyService->captureDeviceCompleted(this, false /* aSuccess */);
-                        *aRunFilters = failTransition();
+                        *aRunFilters = i_failTransition();
                         mMachine.setNull();
                         break;
@@ -1263,7 +1200,7 @@
                     /* Guess we've successfully released it. */
                     case kHostUSBDeviceState_ReleasingToHost:
-                        LogThisFunc(("{%s} %s -> %s\n", mName, getStateName(), stateName(kHostUSBDeviceState_Capturable)));
+                        LogThisFunc(("{%s} %s -> %s\n", mName, i_getStateName(), i_stateName(kHostUSBDeviceState_Capturable)));
                         mUSBProxyService->releaseDeviceCompleted(this, true /* aSuccess */);
-                        *aRunFilters = setState(kHostUSBDeviceState_Capturable);
+                        *aRunFilters = i_setState(kHostUSBDeviceState_Capturable);
                         break;
 
@@ -1272,5 +1209,5 @@
                     case kHostUSBDeviceState_DetachingFromVM:
                     case kHostUSBDeviceState_PhysDetachingFromVM:
-                        LogThisFunc(("{%s} %s - changed to USED_BY_HOST_CAPTURABLE...\n", mName, getStateName()));
+                        LogThisFunc(("{%s} %s - changed to USED_BY_HOST_CAPTURABLE...\n", mName, i_getStateName()));
                         break;
 
@@ -1283,5 +1220,5 @@
                     case kHostUSBDeviceState_PhysDetached:
                     default:
-                        AssertMsgFailed(("{%s} %s\n", mName, getStateName()));
+                        AssertMsgFailed(("{%s} %s\n", mName, i_getStateName()));
                         break;
                 }
@@ -1308,6 +1245,6 @@
                     case kHostUSBDeviceState_Capturable:
                         fIsImportant = true;
-                        LogThisFunc(("{%s} %s -> %s\n", mName, getStateName(), stateName(kHostUSBDeviceState_Unused)));
-                        *aRunFilters = setState(kHostUSBDeviceState_Unused);
+                        LogThisFunc(("{%s} %s -> %s\n", mName, i_getStateName(), i_stateName(kHostUSBDeviceState_Unused)));
+                        *aRunFilters = i_setState(kHostUSBDeviceState_Unused);
                         break;
 
@@ -1318,5 +1255,5 @@
                         {
                             LogThisFunc(("{%s} capture advancing thru UNUSED...\n", mName));
-                            *aRunFilters = advanceTransition();
+                            *aRunFilters = i_advanceTransition();
                         }
                         else
@@ -1325,5 +1262,5 @@
                             LogThisFunc(("{%s} capture failed!\n", mName));
                             mUSBProxyService->captureDeviceCompleted(this, false /* aSuccess */);
-                            *aRunFilters = failTransition();
+                            *aRunFilters = i_failTransition();
                             mMachine.setNull();
                         }
@@ -1332,7 +1269,7 @@
                     /* Guess we've successfully released it. */
                     case kHostUSBDeviceState_ReleasingToHost:
-                        LogThisFunc(("{%s} %s -> %s\n", mName, getStateName(), stateName(kHostUSBDeviceState_Unused)));
+                        LogThisFunc(("{%s} %s -> %s\n", mName, i_getStateName(), i_stateName(kHostUSBDeviceState_Unused)));
                         mUSBProxyService->releaseDeviceCompleted(this, true /* aSuccess */);
-                        *aRunFilters = setState(kHostUSBDeviceState_Unused);
+                        *aRunFilters = i_setState(kHostUSBDeviceState_Unused);
                         break;
 
@@ -1341,5 +1278,5 @@
                     case kHostUSBDeviceState_DetachingFromVM:
                     case kHostUSBDeviceState_PhysDetachingFromVM:
-                        LogThisFunc(("{%s} %s - changed to UNUSED...\n", mName, getStateName()));
+                        LogThisFunc(("{%s} %s - changed to UNUSED...\n", mName, i_getStateName()));
                         break;
 
@@ -1352,5 +1289,5 @@
                     case kHostUSBDeviceState_PhysDetached:
                     default:
-                        AssertMsgFailed(("{%s} %s\n", mName, getStateName()));
+                        AssertMsgFailed(("{%s} %s\n", mName, i_getStateName()));
                         break;
                 }
@@ -1368,5 +1305,5 @@
                         break;
                     case kHostUSBDeviceState_UsedByVM:
-                        LogThisFunc(("{%s} %s - changed to HELD_BY_PROXY...\n", mName, getStateName()));
+                        LogThisFunc(("{%s} %s - changed to HELD_BY_PROXY...\n", mName, i_getStateName()));
                         break;
 
@@ -1375,5 +1312,5 @@
                         LogThisFunc(("{%s} capture succeeded!\n", mName));
                         mUSBProxyService->captureDeviceCompleted(this, true /* aSuccess */);
-                        *aRunFilters = advanceTransition(true /* fast forward thru re-attach */);
+                        *aRunFilters = i_advanceTransition(true /* fast forward thru re-attach */);
 
                         /* Take action if we're supposed to attach it to a VM. */
@@ -1381,5 +1318,5 @@
                         {
                             alock.release();
-                            attachToVM(mMachine, mMaskedIfs);
+                            i_attachToVM(mMachine, mMaskedIfs);
                             alock.acquire();
                         }
@@ -1388,7 +1325,7 @@
                     /* Can only mean that we've failed capturing it. */
                     case kHostUSBDeviceState_ReleasingToHost:
-                        LogThisFunc(("{%s} %s failed!\n", mName, getStateName()));
+                        LogThisFunc(("{%s} %s failed!\n", mName, i_getStateName()));
                         mUSBProxyService->releaseDeviceCompleted(this, false /* aSuccess */);
-                        *aRunFilters = setState(kHostUSBDeviceState_HeldByProxy);
+                        *aRunFilters = i_setState(kHostUSBDeviceState_HeldByProxy);
                         break;
 
@@ -1397,5 +1334,5 @@
                     case kHostUSBDeviceState_DetachingFromVM:
                     case kHostUSBDeviceState_PhysDetachingFromVM:
-                        LogThisFunc(("{%s} %s - changed to HELD_BY_PROXY...\n", mName, getStateName()));
+                        LogThisFunc(("{%s} %s - changed to HELD_BY_PROXY...\n", mName, i_getStateName()));
                         break;
 
@@ -1407,5 +1344,5 @@
                     case kHostUSBDeviceState_PhysDetached:
                     default:
-                        AssertMsgFailed(("{%s} %s\n", mName, getStateName()));
+                        AssertMsgFailed(("{%s} %s\n", mName, i_getStateName()));
                         break;
                 }
@@ -1420,5 +1357,5 @@
                     /* No change. */
                     case kHostUSBDeviceState_HeldByProxy:
-                        LogThisFunc(("{%s} %s - changed to USED_BY_GUEST...\n", mName, getStateName()));
+                        LogThisFunc(("{%s} %s - changed to USED_BY_GUEST...\n", mName, i_getStateName()));
                         break;
                     case kHostUSBDeviceState_UsedByVM:
@@ -1429,5 +1366,5 @@
                     case kHostUSBDeviceState_DetachingFromVM:
                     case kHostUSBDeviceState_PhysDetachingFromVM:
-                        LogThisFunc(("{%s} %s - changed to USED_BY_GUEST...\n", mName, getStateName()));
+                        LogThisFunc(("{%s} %s - changed to USED_BY_GUEST...\n", mName, i_getStateName()));
                         break;
 
@@ -1441,5 +1378,5 @@
                     case kHostUSBDeviceState_Capturing:
                     default:
-                        AssertMsgFailed(("{%s} %s\n", mName, getStateName()));
+                        AssertMsgFailed(("{%s} %s\n", mName, i_getStateName()));
                         break;
                 }
@@ -1450,22 +1387,22 @@
              */
             case USBDEVICESTATE_UNSUPPORTED:
-                AssertMsgFailed(("enmOldState=%d {%s} %s\n", enmOldState, mName, getStateName()));
+                AssertMsgFailed(("enmOldState=%d {%s} %s\n", enmOldState, mName, i_getStateName()));
                 break;
             default:
-                AssertMsgFailed(("enmState=%d {%s} %s\n", mUsb->enmState, mName, getStateName()));
+                AssertMsgFailed(("enmState=%d {%s} %s\n", mUsb->enmState, mName, i_getStateName()));
                 break;
         }
     }
     else if (   mUniSubState == kHostUSBDeviceSubState_AwaitingDetach
-             && hasAsyncOperationTimedOut())
+             && i_hasAsyncOperationTimedOut())
     {
         LogRel(("USB: timeout in %s for {%RTuuid} / {%s}\n",
-                getStateName(), mId.raw(), mName));
-        *aRunFilters = failTransition();
+                i_getStateName(), mId.raw(), mName));
+        *aRunFilters = i_failTransition();
         fIsImportant = true;
     }
     else
     {
-        LogFlowThisFunc(("%p {%s} %s - no change %d\n", this, mName, getStateName(), enmOldState));
+        LogFlowThisFunc(("%p {%s} %s - no change %d\n", this, mName, i_getStateName(), enmOldState));
         /** @todo might have to handle some stuff here too if we cannot make the release/capture handling deal with that above ... */
     }
@@ -1486,5 +1423,5 @@
  * @returns See HostUSBDevice::updateState()
  */
-bool HostUSBDevice::updateStateFake(PCUSBDEVICE aDev, bool *aRunFilters, SessionMachine **aIgnoreMachine)
+bool HostUSBDevice::i_updateStateFake(PCUSBDEVICE aDev, bool *aRunFilters, SessionMachine **aIgnoreMachine)
 {
     Assert(!isWriteLockOnCurrentThread());
@@ -1497,6 +1434,6 @@
         {
             *aIgnoreMachine = mUniState == kHostUSBDeviceState_ReleasingToHost ? mMachine : NULL;
-            *aRunFilters = advanceTransition();
-            LogThisFunc(("{%s} %s\n", mName, getStateName()));
+            *aRunFilters = i_advanceTransition();
+            LogThisFunc(("{%s} %s\n", mName, i_getStateName()));
 
             if (mUsb != aDev)
@@ -1518,5 +1455,5 @@
             {
                 alock.release();
-                attachToVM(mMachine, mMaskedIfs);
+                i_attachToVM(mMachine, mMaskedIfs);
             }
             return true;
@@ -1525,5 +1462,5 @@
         default:
             alock.release();
-            return updateState(aDev, aRunFilters, aIgnoreMachine);
+            return i_updateState(aDev, aRunFilters, aIgnoreMachine);
     }
 }
@@ -1538,5 +1475,5 @@
  * @note    Caller must have read or write locked the object before calling.
  */
-bool HostUSBDevice::hasAsyncOperationTimedOut() const
+bool HostUSBDevice::i_hasAsyncOperationTimedOut() const
 {
     switch (mUniSubState)
@@ -1564,7 +1501,7 @@
  * @param   aPendingState
  */
-/*static*/ const char *HostUSBDevice::stateName(HostUSBDeviceState aState,
-                                                HostUSBDeviceState aPendingState /*= kHostUSBDeviceState_Invalid*/,
-                                                HostUSBDeviceSubState aSubState /*= kHostUSBDeviceSubState_Default*/)
+/*static*/ const char *HostUSBDevice::i_stateName(HostUSBDeviceState aState,
+                                                  HostUSBDeviceState aPendingState /*= kHostUSBDeviceState_Invalid*/,
+                                                  HostUSBDeviceSubState aSubState /*= kHostUSBDeviceSubState_Default*/)
 {
     switch (aState)
@@ -1762,5 +1699,5 @@
  * @note    The caller must own the write lock for this object.
  */
-bool HostUSBDevice::setState(HostUSBDeviceState aNewState, HostUSBDeviceState aNewPendingState /*= kHostUSBDeviceState_Invalid*/,
+bool HostUSBDevice::i_setState(HostUSBDeviceState aNewState, HostUSBDeviceState aNewPendingState /*= kHostUSBDeviceState_Invalid*/,
                              HostUSBDeviceSubState aNewSubState /*= kHostUSBDeviceSubState_Default*/)
 {
@@ -1782,5 +1719,5 @@
      * Welcome to the switch orgies!
      * You're welcome to check out the ones in startTransition(),
-     * advanceTransition(), failTransition() and getStateName() too. Enjoy!
+     * advanceTransition(), failTransition() and i_getStateName() too. Enjoy!
      */
 
@@ -1800,6 +1737,6 @@
                     break;
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -1820,6 +1757,6 @@
                     break;
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -1848,11 +1785,11 @@
                             break;
                         default:
-                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                         stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                         i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
                     }
                     break;
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -1877,11 +1814,11 @@
                             break;
                         default:
-                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                         stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                         i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
                     }
                     break;
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -1906,6 +1843,6 @@
                             break;
                         default:
-                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                         stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                         i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
                     }
                     break;
@@ -1916,11 +1853,11 @@
                             break;
                         default:
-                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                         stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                         i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
                     }
                     break;
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -1944,11 +1881,11 @@
                             break;
                         default:
-                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                         stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                            AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                         i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
                     }
                     break;
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -1974,6 +1911,6 @@
                 case kHostUSBDeviceState_UsedByVM:
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -2026,6 +1963,6 @@
 
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -2070,6 +2007,6 @@
 
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -2099,6 +2036,6 @@
 
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -2135,6 +2072,6 @@
 
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -2152,6 +2089,6 @@
                     break;
                 default:
-                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, getStateName(),
-                                                 stateName(aNewState, aNewPendingState, aNewSubState)), false);
+                    AssertLogRelMsgFailedReturn(("this=%p %s -X-> %s\n", this, i_getStateName(),
+                                                 i_stateName(aNewState, aNewPendingState, aNewSubState)), false);
             }
             break;
@@ -2166,9 +2103,9 @@
     if (NewPrevState != mPrevUniState)
         LogFlowThisFunc(("%s -> %s (prev: %s -> %s) [%s]\n",
-                         getStateName(), stateName(aNewState, aNewPendingState, aNewSubState),
-                         stateName(mPrevUniState), stateName(NewPrevState), mName));
+                         i_getStateName(), i_stateName(aNewState, aNewPendingState, aNewSubState),
+                         i_stateName(mPrevUniState), i_stateName(NewPrevState), mName));
     else
         LogFlowThisFunc(("%s -> %s (prev: %s) [%s]\n",
-                         getStateName(), stateName(aNewState, aNewPendingState, aNewSubState), stateName(NewPrevState), mName));
+                         i_getStateName(), i_stateName(aNewState, aNewPendingState, aNewSubState), i_stateName(NewPrevState), mName));
     mPrevUniState = NewPrevState;
     mUniState = aNewState;
@@ -2192,6 +2129,6 @@
  * @note    The caller must own the write lock for this object.
  */
-bool HostUSBDevice::startTransition(HostUSBDeviceState aNewState, HostUSBDeviceState aFinalState,
-                                    HostUSBDeviceSubState aNewSubState /*= kHostUSBDeviceSubState_Default*/)
+bool HostUSBDevice::i_startTransition(HostUSBDeviceState aNewState, HostUSBDeviceState aFinalState,
+                                      HostUSBDeviceSubState aNewSubState /*= kHostUSBDeviceSubState_Default*/)
 {
     AssertReturn(isWriteLockOnCurrentThread(), false);
@@ -2215,5 +2152,5 @@
         case kHostUSBDeviceState_AttachingToVM:
         case kHostUSBDeviceState_PhysDetachingFromVM:
-            AssertMsgFailedReturn(("this=%p %s is a transitional state.\n", this, getStateName()), false);
+            AssertMsgFailedReturn(("this=%p %s is a transitional state.\n", this, i_getStateName()), false);
 
         case kHostUSBDeviceState_PhysDetached:
@@ -2222,5 +2159,5 @@
     }
 
-    return setState(aNewState, aFinalState, aNewSubState);
+    return i_setState(aNewState, aFinalState, aNewSubState);
 }
 
@@ -2236,5 +2173,5 @@
  * @note    The caller must own the write lock for this object.
  */
-bool HostUSBDevice::advanceTransition(bool aSkipReAttach /* = false */)
+bool HostUSBDevice::i_advanceTransition(bool aSkipReAttach /* = false */)
 {
     AssertReturn(isWriteLockOnCurrentThread(), false);
@@ -2264,5 +2201,5 @@
                             break;
                         default:
-                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, getStateName()), false);
+                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, i_getStateName()), false);
                     }
                     break;
@@ -2292,5 +2229,5 @@
                             break;
                         default:
-                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, getStateName()), false);
+                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, i_getStateName()), false);
                     }
                     break;
@@ -2317,5 +2254,5 @@
                             break;
                         default:
-                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, getStateName()), false);
+                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, i_getStateName()), false);
                     }
                     break;
@@ -2345,5 +2282,5 @@
                             break;
                         default:
-                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, getStateName()), false);
+                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, i_getStateName()), false);
                     }
                     break;
@@ -2364,5 +2301,5 @@
                             break;
                         default:
-                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, getStateName()), false);
+                            AssertMsgFailedReturn(("this=%p invalid pending state %d: %s\n", this, enmPending, i_getStateName()), false);
                     }
                     break;
@@ -2378,5 +2315,5 @@
         case kHostUSBDeviceState_HeldByProxy:
         case kHostUSBDeviceState_UsedByVM:
-            AssertMsgFailedReturn(("this=%p %s is not transitional\n", this, getStateName()), false);
+            AssertMsgFailedReturn(("this=%p %s is not transitional\n", this, i_getStateName()), false);
         case kHostUSBDeviceState_PhysDetached:
         default:
@@ -2385,7 +2322,7 @@
     }
 
-    bool fRc = setState(enmState, enmPending, enmSub);
+    bool fRc = i_setState(enmState, enmPending, enmSub);
     if (aSkipReAttach && mUniSubState == kHostUSBDeviceSubState_AwaitingReAttach)
-        fRc |= advanceTransition(false /* don't fast forward re-attach */);
+        fRc |= i_advanceTransition(false /* don't fast forward re-attach */);
     return fRc;
 }
@@ -2398,5 +2335,5 @@
  * @note    The caller must own the write lock for this object.
  */
-bool HostUSBDevice::failTransition()
+bool HostUSBDevice::i_failTransition()
 {
     AssertReturn(isWriteLockOnCurrentThread(), false);
@@ -2432,5 +2369,5 @@
 
         case kHostUSBDeviceState_PhysDetachingFromVM:
-            AssertMsgFailedReturn(("this=%p %s shall not fail\n", this, getStateName()), false);
+            AssertMsgFailedReturn(("this=%p %s shall not fail\n", this, i_getStateName()), false);
 
         case kHostUSBDeviceState_Unsupported:
@@ -2440,5 +2377,5 @@
         case kHostUSBDeviceState_HeldByProxy:
         case kHostUSBDeviceState_UsedByVM:
-            AssertMsgFailedReturn(("this=%p %s is not transitional\n", this, getStateName()), false);
+            AssertMsgFailedReturn(("this=%p %s is not transitional\n", this, i_getStateName()), false);
         case kHostUSBDeviceState_PhysDetached:
         default:
@@ -2447,5 +2384,5 @@
     }
 
-    return setState(enmState, kHostUSBDeviceState_Invalid, enmSub);
+    return i_setState(enmState, kHostUSBDeviceState_Invalid, enmSub);
 }
 
@@ -2458,5 +2395,5 @@
  * @note    The caller must own the read (or write) lock for this object.
  */
-USBDeviceState_T HostUSBDevice::canonicalState() const
+USBDeviceState_T HostUSBDevice::i_canonicalState() const
 {
     switch (mUniState)
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 49960)
@@ -2911,5 +2911,5 @@
     *aSnapshotCount = mData->mFirstSnapshot.isNull()
                           ? 0
-                          : mData->mFirstSnapshot->getAllChildrenCount() + 1;
+                          : mData->mFirstSnapshot->i_getAllChildrenCount() + 1;
 
     return S_OK;
@@ -4348,5 +4348,5 @@
                 AutoReadLock snapLock(snap COMMA_LOCKVAL_SRC_POS);
 
-                const MediaData::AttachmentList &snapAtts = snap->getSnapshotMachine()->mMediaData->mAttachments;
+                const MediaData::AttachmentList &snapAtts = snap->i_getSnapshotMachine()->mMediaData->mAttachments;
 
                 MediumAttachment *pAttachFound = NULL;
@@ -4395,5 +4395,5 @@
                 }
 
-                snap = snap->getParent();
+                snap = snap->i_getParent();
             }
 
@@ -5475,5 +5475,5 @@
     size_t cSnapshots = 0;
     if (mData->mFirstSnapshot)
-        cSnapshots = mData->mFirstSnapshot->getAllChildrenCount() + 1;
+        cSnapshots = mData->mFirstSnapshot->i_getAllChildrenCount() + 1;
     if (cSnapshots && cleanupMode == CleanupMode_UnregisterOnly)
         // fail now before we start detaching media
@@ -5525,5 +5525,5 @@
 
         // GO!
-        pFirstSnapshot->uninitRecursively(alock, cleanupMode, llMedia, mData->llFilesToDelete);
+        pFirstSnapshot->i_uninitRecursively(alock, cleanupMode, llMedia, mData->llFilesToDelete);
 
         mData->mMachineState = oldState;
@@ -9201,5 +9201,5 @@
     /* memorize the current snapshot when appropriate */
     if (    !mData->mCurrentSnapshot
-         && pSnapshot->getId() == aCurSnapshotId
+         && pSnapshot->i_getId() == aCurSnapshotId
        )
         mData->mCurrentSnapshot = pSnapshot;
@@ -9865,5 +9865,5 @@
         aSnapshot = mData->mFirstSnapshot;
     else
-        aSnapshot = mData->mFirstSnapshot->findChildOrSelf(aId.ref());
+        aSnapshot = mData->mFirstSnapshot->i_findChildOrSelf(aId.ref());
 
     if (!aSnapshot)
@@ -9902,5 +9902,5 @@
     }
 
-    aSnapshot = mData->mFirstSnapshot->findChildOrSelf(strName);
+    aSnapshot = mData->mFirstSnapshot->i_findChildOrSelf(strName);
 
     if (!aSnapshot)
@@ -10192,6 +10192,6 @@
             // and do the same thing for the saved state file paths of all the online snapshots
             if (mData->mFirstSnapshot)
-                mData->mFirstSnapshot->updateSavedStatePaths(configDir.c_str(),
-                                                             newConfigDir.c_str());
+                mData->mFirstSnapshot->i_updateSavedStatePaths(configDir.c_str(),
+                                                               newConfigDir.c_str());
         }
         while (0);
@@ -10461,5 +10461,5 @@
 
     if (mData->mCurrentSnapshot)
-        config.uuidCurrentSnapshot = mData->mCurrentSnapshot->getId();
+        config.uuidCurrentSnapshot = mData->mCurrentSnapshot->i_getId();
     else
         config.uuidCurrentSnapshot.clear();
@@ -10517,5 +10517,5 @@
             settings::Snapshot &snap = config.llFirstSnapshot.front();
 
-            rc = mData->mFirstSnapshot->saveSnapshot(snap, false /*aAttrsOnly*/);
+            rc = mData->mFirstSnapshot->i_saveSnapshot(snap, false /*aAttrsOnly*/);
             if (FAILED(rc)) throw rc;
         }
@@ -11638,5 +11638,5 @@
         // if this is from a snapshot, do not defer detachment to commitMedia()
         if (pSnapshot)
-            oldmedium->i_removeBackReference(mData->mUuid, pSnapshot->getId());
+            oldmedium->i_removeBackReference(mData->mUuid, pSnapshot->i_getId());
         // else if non-hard disk media, do not defer detachment to commitMedia() either
         else if (mediumType != DeviceType_HardDisk)
@@ -13042,5 +13042,5 @@
         // AFTER killing the snapshot so that releaseSavedStateFile() won't
         // think it's still in use
-        Utf8Str strStateFile = mConsoleTaskData.mSnapshot->getStateFilePath();
+        Utf8Str strStateFile = mConsoleTaskData.mSnapshot->i_getStateFilePath();
         mConsoleTaskData.mSnapshot->uninit();
         releaseSavedStateFile(strStateFile, NULL /* pSnapshotToIgnore */ );
@@ -14671,5 +14671,5 @@
         // ... and it must also not be shared with other snapshots
         if (    !mData->mFirstSnapshot
-             || !mData->mFirstSnapshot->sharesSavedStateFile(strStateFile, pSnapshotToIgnore)
+             || !mData->mFirstSnapshot->i_sharesSavedStateFile(strStateFile, pSnapshotToIgnore)
                                 // this checks the SnapshotMachine's state file paths
            )
@@ -14937,5 +14937,5 @@
             // it is safe to delete the saved state file if ...
             if (    !mData->mFirstSnapshot      // ... we have no snapshots or
-                 || !mData->mFirstSnapshot->sharesSavedStateFile(mSSData->strStateFilePath, NULL /* pSnapshotToIgnore */)
+                 || !mData->mFirstSnapshot->i_sharesSavedStateFile(mSSData->strStateFilePath, NULL /* pSnapshotToIgnore */)
                                                 // ... none of the snapshots share the saved state file
                )
Index: /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 49960)
@@ -43,5 +43,4 @@
 #include <VBox/settings.h>
 
-
 ////////////////////////////////////////////////////////////////////////////////
 //
@@ -82,4 +81,5 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
+DEFINE_EMPTY_CTOR_DTOR(Snapshot)
 
 HRESULT Snapshot::FinalConstruct()
@@ -176,5 +176,5 @@
 
     if (m->pParent)
-        deparent();
+        i_deparent();
 
     if (m->pMachine)
@@ -200,5 +200,5 @@
  *  lock in write mode AND the machine state must be DeletingSnapshot.
  */
-void Snapshot::beginSnapshotDelete()
+void Snapshot::i_beginSnapshotDelete()
 {
     AutoCaller autoCaller(this);
@@ -266,5 +266,5 @@
  * The caller must hold the machine lock in write mode (which protects the snapshots tree)!
  */
-void Snapshot::deparent()
+void Snapshot::i_deparent()
 {
     Assert(m->pMachine->isWriteLockOnCurrentThread());
@@ -292,27 +292,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 
-STDMETHODIMP Snapshot::COMGETTER(Id)(BSTR *aId)
-{
-    CheckComArgOutPointerValid(aId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Snapshot::getId(com::Guid &aId)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    m->uuid.toUtf16().cloneTo(aId);
+    aId = m->uuid;
+
     return S_OK;
 }
 
-STDMETHODIMP Snapshot::COMGETTER(Name)(BSTR *aName)
-{
-    CheckComArgOutPointerValid(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Snapshot::getName(com::Utf8Str &aName)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    m->strName.cloneTo(aName);
+    aName = m->strName;
     return S_OK;
 }
@@ -322,8 +312,7 @@
  *  (see its lock requirements).
  */
-STDMETHODIMP Snapshot::COMSETTER(Name)(IN_BSTR aName)
+HRESULT Snapshot::setName(const com::Utf8Str &aName)
 {
     HRESULT rc = S_OK;
-    CheckComArgStrNotEmptyOrNull(aName);
 
     // prohibit setting a UUID only as the machine name, or else it can
@@ -334,14 +323,9 @@
         return setError(E_INVALIDARG,  tr("A machine cannot have a UUID as its name"));
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    Utf8Str strName(aName);
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    if (m->strName != strName)
-    {
-        m->strName = strName;
+    if (m->strName != aName)
+    {
+        m->strName = aName;
         alock.release(); /* Important! (child->parent locks are forbidden) */
         rc = m->pMachine->onSnapshotChange(this);
@@ -351,30 +335,19 @@
 }
 
-STDMETHODIMP Snapshot::COMGETTER(Description)(BSTR *aDescription)
-{
-    CheckComArgOutPointerValid(aDescription);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Snapshot::getDescription(com::Utf8Str &aDescription)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    m->strDescription.cloneTo(aDescription);
+    aDescription = m->strDescription;
     return S_OK;
 }
 
-STDMETHODIMP Snapshot::COMSETTER(Description)(IN_BSTR aDescription)
+HRESULT Snapshot::setDescription(const com::Utf8Str &aDescription)
 {
     HRESULT rc = S_OK;
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    Utf8Str strDescription(aDescription);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    if (m->strDescription != strDescription)
-    {
-        m->strDescription = strDescription;
+    if (m->strDescription != aDescription)
+    {
+        m->strDescription = aDescription;
         alock.release(); /* Important! (child->parent locks are forbidden) */
         rc = m->pMachine->onSnapshotChange(this);
@@ -384,11 +357,6 @@
 }
 
-STDMETHODIMP Snapshot::COMGETTER(TimeStamp)(LONG64 *aTimeStamp)
-{
-    CheckComArgOutPointerValid(aTimeStamp);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Snapshot::getTimeStamp(LONG64 *aTimeStamp)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -397,64 +365,45 @@
 }
 
-STDMETHODIMP Snapshot::COMGETTER(Online)(BOOL *aOnline)
-{
-    CheckComArgOutPointerValid(aOnline);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Snapshot::getOnline(BOOL *aOnline)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aOnline = getStateFilePath().isNotEmpty();
+    *aOnline = i_getStateFilePath().isNotEmpty();
     return S_OK;
 }
 
-STDMETHODIMP Snapshot::COMGETTER(Machine)(IMachine **aMachine)
-{
-    CheckComArgOutPointerValid(aMachine);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Snapshot::getMachine(ComPtr<IMachine> &aMachine)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    m->pMachine.queryInterfaceTo(aMachine);
+    m->pMachine.queryInterfaceTo(aMachine.asOutParam());
+
     return S_OK;
 }
 
-STDMETHODIMP Snapshot::COMGETTER(Parent)(ISnapshot **aParent)
-{
-    CheckComArgOutPointerValid(aParent);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT Snapshot::getParent(ComPtr<ISnapshot> &aParent)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    m->pParent.queryInterfaceTo(aParent);
+    m->pParent.queryInterfaceTo(aParent.asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP Snapshot::COMGETTER(Children)(ComSafeArrayOut(ISnapshot *, aChildren))
-{
-    CheckComArgOutSafeArrayPointerValid(aChildren);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Snapshot::getChildren(std::vector<ComPtr<ISnapshot> > &aChildren)
+{
     // snapshots tree is protected by machine lock
     AutoReadLock alock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-
-    SafeIfaceArray<ISnapshot> collection(m->llChildren);
-    collection.detachTo(ComSafeArrayOutArg(aChildren));
-
+    aChildren.resize(0);
+    for (SnapshotsList::const_iterator it = m->llChildren.begin();
+         it != m->llChildren.end();
+         ++it)
+        aChildren.push_back(*it);
     return S_OK;
 }
 
-STDMETHODIMP Snapshot::GetChildrenCount(ULONG* count)
-{
-    CheckComArgOutPointerValid(count);
-
-    *count = getChildrenCount();
+HRESULT Snapshot::getChildrenCount(ULONG* count)
+{
+    *count = i_getChildrenCount();
 
     return S_OK;
@@ -471,5 +420,5 @@
  * @return
  */
-const ComObjPtr<Snapshot>& Snapshot::getParent() const
+const ComObjPtr<Snapshot>& Snapshot::i_getParent() const
 {
     return m->pParent;
@@ -480,5 +429,5 @@
  * @return
  */
-const ComObjPtr<Snapshot> Snapshot::getFirstChild() const
+const ComObjPtr<Snapshot> Snapshot::i_getFirstChild() const
 {
     if (!m->llChildren.size())
@@ -491,5 +440,5 @@
  *      Must be called from under the object's lock!
  */
-const Utf8Str& Snapshot::getStateFilePath() const
+const Utf8Str& Snapshot::i_getStateFilePath() const
 {
     return m->pMachine->mSSData->strStateFilePath;
@@ -502,5 +451,5 @@
  */
 
-uint32_t Snapshot::getDepth()
+uint32_t Snapshot::i_getDepth()
 {
     AutoCaller autoCaller(this);
@@ -526,5 +475,5 @@
  * @return
  */
-ULONG Snapshot::getChildrenCount()
+ULONG Snapshot::i_getChildrenCount()
 {
     AutoCaller autoCaller(this);
@@ -542,5 +491,5 @@
  * @return
  */
-ULONG Snapshot::getAllChildrenCountImpl()
+ULONG Snapshot::i_getAllChildrenCountImpl()
 {
     AutoCaller autoCaller(this);
@@ -552,5 +501,5 @@
          ++it)
     {
-        count += (*it)->getAllChildrenCountImpl();
+        count += (*it)->i_getAllChildrenCountImpl();
     }
 
@@ -563,5 +512,5 @@
  * @return
  */
-ULONG Snapshot::getAllChildrenCount()
+ULONG Snapshot::i_getAllChildrenCount()
 {
     AutoCaller autoCaller(this);
@@ -571,5 +520,5 @@
     AutoReadLock alock(m->pMachine COMMA_LOCKVAL_SRC_POS);
 
-    return getAllChildrenCountImpl();
+    return i_getAllChildrenCountImpl();
 }
 
@@ -579,5 +528,5 @@
  * @return
  */
-const ComObjPtr<SnapshotMachine>& Snapshot::getSnapshotMachine() const
+const ComObjPtr<SnapshotMachine>& Snapshot::i_getSnapshotMachine() const
 {
     return m->pMachine;
@@ -589,5 +538,5 @@
  * @return
  */
-Guid Snapshot::getId() const
+Guid Snapshot::i_getId() const
 {
     return m->uuid;
@@ -599,5 +548,5 @@
  * @return
  */
-const Utf8Str& Snapshot::getName() const
+const Utf8Str& Snapshot::i_getName() const
 {
     return m->strName;
@@ -609,5 +558,5 @@
  * @return
  */
-RTTIMESPEC Snapshot::getTimeStamp() const
+RTTIMESPEC Snapshot::i_getTimeStamp() const
 {
     return m->timeStamp;
@@ -620,5 +569,5 @@
  *  Caller must hold the machine lock (which protects the snapshots tree!)
  */
-ComObjPtr<Snapshot> Snapshot::findChildOrSelf(IN_GUID aId)
+ComObjPtr<Snapshot> Snapshot::i_findChildOrSelf(IN_GUID aId)
 {
     ComObjPtr<Snapshot> child;
@@ -636,5 +585,5 @@
              ++it)
         {
-            if ((child = (*it)->findChildOrSelf(aId)))
+            if ((child = (*it)->i_findChildOrSelf(aId)))
                 break;
         }
@@ -651,5 +600,5 @@
  *  Caller must hold the machine lock (which protects the snapshots tree!)
  */
-ComObjPtr<Snapshot> Snapshot::findChildOrSelf(const Utf8Str &aName)
+ComObjPtr<Snapshot> Snapshot::i_findChildOrSelf(const Utf8Str &aName)
 {
     ComObjPtr<Snapshot> child;
@@ -670,5 +619,5 @@
              ++it)
         {
-            if ((child = (*it)->findChildOrSelf(aName)))
+            if ((child = (*it)->i_findChildOrSelf(aName)))
                 break;
         }
@@ -683,6 +632,6 @@
  * @param aNewPath
  */
-void Snapshot::updateSavedStatePathsImpl(const Utf8Str &strOldPath,
-                                         const Utf8Str &strNewPath)
+void Snapshot::i_updateSavedStatePathsImpl(const Utf8Str &strOldPath,
+                                           const Utf8Str &strNewPath)
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -707,5 +656,5 @@
     {
         Snapshot *pChild = *it;
-        pChild->updateSavedStatePathsImpl(strOldPath, strNewPath);
+        pChild->i_updateSavedStatePathsImpl(strOldPath, strNewPath);
     }
 }
@@ -723,6 +672,6 @@
  * @return
  */
-bool Snapshot::sharesSavedStateFile(const Utf8Str &strPath,
-                                    Snapshot *pSnapshotToIgnore)
+bool Snapshot::i_sharesSavedStateFile(const Utf8Str &strPath,
+                                      Snapshot *pSnapshotToIgnore)
 {
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -741,5 +690,5 @@
         Snapshot *pChild = *it;
         if (!pSnapshotToIgnore || pSnapshotToIgnore != pChild)
-            if (pChild->sharesSavedStateFile(strPath, pSnapshotToIgnore))
+            if (pChild->i_sharesSavedStateFile(strPath, pSnapshotToIgnore))
                 return true;
     }
@@ -760,6 +709,6 @@
  *  @note Locks the machine (for the snapshots tree) +  this object + children for writing.
  */
-void Snapshot::updateSavedStatePaths(const Utf8Str &strOldPath,
-                                     const Utf8Str &strNewPath)
+void Snapshot::i_updateSavedStatePaths(const Utf8Str &strOldPath,
+                                      const Utf8Str &strNewPath)
 {
     LogFlowThisFunc(("aOldPath={%s} aNewPath={%s}\n", strOldPath.c_str(), strNewPath.c_str()));
@@ -772,5 +721,5 @@
 
     // call the implementation under the tree lock
-    updateSavedStatePathsImpl(strOldPath, strNewPath);
+    i_updateSavedStatePathsImpl(strOldPath, strNewPath);
 }
 
@@ -783,5 +732,5 @@
  * @return
  */
-HRESULT Snapshot::saveSnapshotImpl(settings::Snapshot &data, bool aAttrsOnly)
+HRESULT Snapshot::i_saveSnapshotImpl(settings::Snapshot &data, bool aAttrsOnly)
 {
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -796,6 +745,6 @@
 
     // state file (only if this snapshot is online)
-    if (getStateFilePath().isNotEmpty())
-        m->pMachine->copyPathRelativeToMachine(getStateFilePath(), data.strStateFile);
+    if (i_getStateFilePath().isNotEmpty())
+        m->pMachine->copyPathRelativeToMachine(i_getStateFilePath(), data.strStateFile);
     else
         data.strStateFile.setNull();
@@ -822,5 +771,5 @@
 
             settings::Snapshot *snap = new settings::Snapshot();
-            rc = (*it)->saveSnapshotImpl(*snap, aAttrsOnly);
+            rc = (*it)->i_saveSnapshotImpl(*snap, aAttrsOnly);
             if (FAILED(rc))
             {
@@ -844,10 +793,10 @@
  *  @param aAttrsOnly   If true, only update user-changeable attrs.
  */
-HRESULT Snapshot::saveSnapshot(settings::Snapshot &data, bool aAttrsOnly)
+HRESULT Snapshot::i_saveSnapshot(settings::Snapshot &data, bool aAttrsOnly)
 {
     // snapshots tree is protected by machine lock
     AutoReadLock alock(m->pMachine COMMA_LOCKVAL_SRC_POS);
 
-    return saveSnapshotImpl(data, aAttrsOnly);
+    return i_saveSnapshotImpl(data, aAttrsOnly);
 }
 
@@ -875,8 +824,8 @@
  * @return
  */
-HRESULT Snapshot::uninitRecursively(AutoWriteLock &writeLock,
-                                    CleanupMode_T cleanupMode,
-                                    MediaList &llMedia,
-                                    std::list<Utf8Str> &llFilenames)
+HRESULT Snapshot::i_uninitRecursively(AutoWriteLock &writeLock,
+                                      CleanupMode_T cleanupMode,
+                                      MediaList &llMedia,
+                                      std::list<Utf8Str> &llFilenames)
 {
     Assert(m->pMachine->isWriteLockOnCurrentThread());
@@ -886,6 +835,6 @@
     // make a copy of the Guid for logging before we uninit ourselves
 #ifdef LOG_ENABLED
-    Guid uuid = getId();
-    Utf8Str name = getName();
+    Guid uuid = i_getId();
+    Utf8Str name = i_getName();
     LogFlowThisFunc(("Entering for snapshot '%s' {%RTuuid}\n", name.c_str(), uuid.raw()));
 #endif
@@ -903,5 +852,5 @@
     {
         Snapshot *pChild = *it;
-        rc = pChild->uninitRecursively(writeLock, cleanupMode, llMedia, llFilenames);
+        rc = pChild->i_uninitRecursively(writeLock, cleanupMode, llMedia, llFilenames);
         if (FAILED(rc))
             return rc;
@@ -935,5 +884,5 @@
     }
 
-    this->beginSnapshotDelete();
+    this->i_beginSnapshotDelete();
     this->uninit();
 
@@ -1289,5 +1238,5 @@
     AutoMultiWriteLock2 mlock(this, aSnapshot COMMA_LOCKVAL_SRC_POS);
     Guid uuidMachine(mData->mUuid),
-         uuidSnapshot(aSnapshot->getId());
+         uuidSnapshot(aSnapshot->i_getId());
     bool fNeedsGlobalSaveSettings = false;
 
@@ -1471,5 +1420,5 @@
 
     if (   mData->mCurrentSnapshot
-        && mData->mCurrentSnapshot->getDepth() >= SETTINGS_SNAPSHOT_DEPTH_MAX)
+        && mData->mCurrentSnapshot->i_getDepth() >= SETTINGS_SNAPSHOT_DEPTH_MAX)
     {
         return setError(VBOX_E_INVALID_OBJECT_STATE,
@@ -1677,5 +1626,5 @@
         /* inform callbacks */
         mParent->onSnapshotTaken(mData->mUuid,
-                                 mConsoleTaskData.mSnapshot->getId());
+                                 mConsoleTaskData.mSnapshot->i_getId());
         machineLock.release();
     }
@@ -1696,5 +1645,5 @@
             // snapshot means that a new saved state file was created, which we must
             // clean up now
-            RTFileDelete(mConsoleTaskData.mSnapshot->getStateFilePath().c_str());
+            RTFileDelete(mConsoleTaskData.mSnapshot->i_getStateFilePath().c_str());
             machineLock.acquire();
 
@@ -1763,5 +1712,5 @@
 
     ComObjPtr<Snapshot> pSnapshot(static_cast<Snapshot*>(aSnapshot));
-    ComObjPtr<SnapshotMachine> pSnapMachine = pSnapshot->getSnapshotMachine();
+    ComObjPtr<SnapshotMachine> pSnapMachine = pSnapshot->i_getSnapshotMachine();
 
     // create a progress object. The number of operations is:
@@ -1789,5 +1738,5 @@
     pProgress.createObject();
     pProgress->init(mParent, aInitiator,
-                    BstrFmt(tr("Restoring snapshot '%s'"), pSnapshot->getName().c_str()).raw(),
+                    BstrFmt(tr("Restoring snapshot '%s'"), pSnapshot->i_getName().c_str()).raw(),
                     FALSE /* aCancelable */,
                     ulOpCount,
@@ -1900,7 +1849,7 @@
 
             /* remember the timestamp of the snapshot we're restoring from */
-            snapshotTimeStamp = aTask.pSnapshot->getTimeStamp();
-
-            ComPtr<SnapshotMachine> pSnapshotMachine(aTask.pSnapshot->getSnapshotMachine());
+            snapshotTimeStamp = aTask.pSnapshot->i_getTimeStamp();
+
+            ComPtr<SnapshotMachine> pSnapshotMachine(aTask.pSnapshot->i_getSnapshotMachine());
 
             /* copy all hardware data from the snapshot */
@@ -1944,5 +1893,5 @@
             Assert(mSSData->strStateFilePath.isEmpty());
 
-            const Utf8Str &strSnapshotStateFile = aTask.pSnapshot->getStateFilePath();
+            const Utf8Str &strSnapshotStateFile = aTask.pSnapshot->i_getStateFilePath();
 
             if (strSnapshotStateFile.isNotEmpty())
@@ -1950,5 +1899,5 @@
                 mSSData->strStateFilePath = strSnapshotStateFile;
 
-            LogFlowThisFunc(("Setting new current snapshot {%RTuuid}\n", aTask.pSnapshot->getId().raw()));
+            LogFlowThisFunc(("Setting new current snapshot {%RTuuid}\n", aTask.pSnapshot->i_getId().raw()));
             /* make the snapshot we restored from the current snapshot */
             mData->mCurrentSnapshot = aTask.pSnapshot;
@@ -2162,9 +2111,9 @@
     AutoWriteLock snapshotLock(pSnapshot COMMA_LOCKVAL_SRC_POS);
 
-    size_t childrenCount = pSnapshot->getChildrenCount();
+    size_t childrenCount = pSnapshot->i_getChildrenCount();
     if (childrenCount > 1)
         return setError(VBOX_E_INVALID_OBJECT_STATE,
                         tr("Snapshot '%s' of the machine '%s' cannot be deleted, because it has %d child snapshots, which is more than the one snapshot allowed for deletion"),
-                        pSnapshot->getName().c_str(),
+                        pSnapshot->i_getName().c_str(),
                         mUserData->s.strName.c_str(),
                         childrenCount);
@@ -2173,5 +2122,5 @@
         return setError(VBOX_E_INVALID_OBJECT_STATE,
                         tr("Snapshot '%s' of the machine '%s' cannot be deleted, because it is the current snapshot and has one child snapshot"),
-                        pSnapshot->getName().c_str(),
+                        pSnapshot->i_getName().c_str(),
                         mUserData->s.strName.c_str());
 
@@ -2190,5 +2139,5 @@
     }
 
-    ComObjPtr<SnapshotMachine> pSnapMachine = pSnapshot->getSnapshotMachine();
+    ComObjPtr<SnapshotMachine> pSnapMachine = pSnapshot->i_getSnapshotMachine();
 
     /* create a progress object. The number of operations is:
@@ -2200,5 +2149,5 @@
     ULONG ulTotalWeight = 1;        // one for preparations
 
-    if (pSnapshot->getStateFilePath().length())
+    if (pSnapshot->i_getStateFilePath().length())
     {
         ++ulOpCount;
@@ -2237,5 +2186,5 @@
     pProgress.createObject();
     pProgress->init(mParent, aInitiator,
-                    BstrFmt(tr("Deleting snapshot '%s'"), pSnapshot->getName().c_str()).raw(),
+                    BstrFmt(tr("Deleting snapshot '%s'"), pSnapshot->i_getName().c_str()).raw(),
                     FALSE /* aCancelable */,
                     ulOpCount,
@@ -2413,12 +2362,12 @@
 
         AutoWriteLock treeLock(mParent->getMediaTreeLockHandle()
-                                      COMMA_LOCKVAL_SRC_POS);
-
-        ComObjPtr<SnapshotMachine> pSnapMachine = aTask.pSnapshot->getSnapshotMachine();
+                               COMMA_LOCKVAL_SRC_POS);
+
+        ComObjPtr<SnapshotMachine> pSnapMachine = aTask.pSnapshot->i_getSnapshotMachine();
         // no need to lock the snapshot machine since it is const by definition
         Guid machineId = pSnapMachine->getId();
 
         // save the snapshot ID (for callbacks)
-        snapshotId = aTask.pSnapshot->getId();
+        snapshotId = aTask.pSnapshot->i_getId();
 
         // first pass:
@@ -2702,5 +2651,5 @@
             AutoWriteLock machineLock(this COMMA_LOCKVAL_SRC_POS);
 
-            Utf8Str stateFilePath = aTask.pSnapshot->getStateFilePath();
+            Utf8Str stateFilePath = aTask.pSnapshot->i_getStateFilePath();
             if (!stateFilePath.isEmpty())
             {
@@ -2862,9 +2811,9 @@
                 ComObjPtr<Machine> pMachine = this;
                 Guid childSnapshotId;
-                ComObjPtr<Snapshot> pChildSnapshot = aTask.pSnapshot->getFirstChild();
+                ComObjPtr<Snapshot> pChildSnapshot = aTask.pSnapshot->i_getFirstChild();
                 if (pChildSnapshot)
                 {
-                    pMachine = pChildSnapshot->getSnapshotMachine();
-                    childSnapshotId = pChildSnapshot->getId();
+                    pMachine = pChildSnapshot->i_getSnapshotMachine();
+                    childSnapshotId = pChildSnapshot->i_getId();
                 }
                 pAtt = findAttachment(pMachine->mMediaData->mAttachments, it->mpSource);
@@ -2907,5 +2856,5 @@
             AutoWriteLock machineLock(this COMMA_LOCKVAL_SRC_POS);
 
-            aTask.pSnapshot->beginSnapshotDelete();
+            aTask.pSnapshot->i_beginSnapshotDelete();
             aTask.pSnapshot->uninit();
 
@@ -3113,7 +3062,7 @@
     alock.release();
     rc = aSource->i_prepareMergeTo(aTarget, &aMachineId, &aSnapshotId,
-                                 !fOnlineMergePossible /* fLockMedia */,
-                                 aMergeForward, aParentForTarget,
-                                 aChildrenToReparent, aMediumLockList);
+                                   !fOnlineMergePossible /* fLockMedia */,
+                                   aMergeForward, aParentForTarget,
+                                   aChildrenToReparent, aMediumLockList);
     alock.acquire();
     childLock.acquire();
Index: /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 49960)
@@ -892,5 +892,5 @@
     {
         AutoWriteLock filterLock(*it COMMA_LOCKVAL_SRC_POS);
-        if (aDevice->isMatch((*it)->i_getData()))
+        if (aDevice->i_isMatch((*it)->i_getData()))
         {
             *aMaskedIfs = (*it)->i_getData().mMaskedIfs;
Index: /trunk/src/VBox/Main/src-server/USBProxyService.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBProxyService.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/src-server/USBProxyService.cpp	(revision 49960)
@@ -182,5 +182,5 @@
      */
     alock.release();
-    return pHostDevice->requestCaptureForVM(aMachine, true /* aSetError */);
+    return pHostDevice->i_requestCaptureForVM(aMachine, true /* aSetError */);
 }
 
@@ -230,7 +230,7 @@
      */
     LogFlowThisFunc(("id={%RTuuid} state=%s aDone=%RTbool name={%s}\n",
-                     pHostDevice->getId().raw(), pHostDevice->getStateName(), aDone, pHostDevice->getName().c_str()));
+                     pHostDevice->i_getId().raw(), pHostDevice->i_getStateName(), aDone, pHostDevice->i_getName().c_str()));
     bool fRunFilters = false;
-    HRESULT hrc = pHostDevice->onDetachFromVM(aMachine, aDone, &fRunFilters);
+    HRESULT hrc = pHostDevice->i_onDetachFromVM(aMachine, aDone, &fRunFilters);
 
     /*
@@ -240,5 +240,5 @@
         &&  fRunFilters)
     {
-        Assert(aDone && pHostDevice->getUnistate() == kHostUSBDeviceState_HeldByProxy && pHostDevice->getMachine().isNull());
+        Assert(aDone && pHostDevice->i_getUnistate() == kHostUSBDeviceState_HeldByProxy && pHostDevice->i_getMachine().isNull());
         devLock.release();
         alock.release();
@@ -290,7 +290,7 @@
         ComObjPtr<HostUSBDevice> device = *it;
         AutoReadLock devLock(device COMMA_LOCKVAL_SRC_POS);
-        if (   device->getUnistate() == kHostUSBDeviceState_HeldByProxy
-            || device->getUnistate() == kHostUSBDeviceState_Unused
-            || device->getUnistate() == kHostUSBDeviceState_Capturable)
+        if (   device->i_getUnistate() == kHostUSBDeviceState_HeldByProxy
+            || device->i_getUnistate() == kHostUSBDeviceState_Unused
+            || device->i_getUnistate() == kHostUSBDeviceState_Capturable)
         {
             devLock.release();
@@ -346,5 +346,5 @@
         ComObjPtr<HostUSBDevice> pHostDevice = *it;
         AutoWriteLock devLock(pHostDevice COMMA_LOCKVAL_SRC_POS);
-        if (pHostDevice->getMachine() == aMachine)
+        if (pHostDevice->i_getMachine() == aMachine)
         {
             /*
@@ -352,9 +352,9 @@
              */
             bool fRunFilters = false;
-            HRESULT hrc = pHostDevice->onDetachFromVM(aMachine, aDone, &fRunFilters, aAbnormal);
+            HRESULT hrc = pHostDevice->i_onDetachFromVM(aMachine, aDone, &fRunFilters, aAbnormal);
             if (    SUCCEEDED(hrc)
                 &&  fRunFilters)
             {
-                Assert(aDone && pHostDevice->getUnistate() == kHostUSBDeviceState_HeldByProxy && pHostDevice->getMachine().isNull());
+                Assert(aDone && pHostDevice->i_getUnistate() == kHostUSBDeviceState_HeldByProxy && pHostDevice->i_getMachine().isNull());
                 devLock.release();
                 alock.release();
@@ -395,5 +395,5 @@
                                                SessionMachine *aIgnoreMachine)
 {
-    LogFlowThisFunc(("{%s} ignoring=%p\n", aDevice->getName().c_str(), aIgnoreMachine));
+    LogFlowThisFunc(("{%s} ignoring=%p\n", aDevice->i_getName().c_str(), aIgnoreMachine));
 
     /*
@@ -404,5 +404,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     AutoWriteLock devLock(aDevice COMMA_LOCKVAL_SRC_POS);
-    AssertMsgReturn(aDevice->isCapturableOrHeld(), ("{%s} %s\n", aDevice->getName().c_str(), aDevice->getStateName()), E_FAIL);
+    AssertMsgReturn(aDevice->i_isCapturableOrHeld(), ("{%s} %s\n", aDevice->i_getName().c_str(), aDevice->i_getStateName()), E_FAIL);
 
     /*
@@ -423,5 +423,5 @@
         AutoWriteLock filterLock(*it COMMA_LOCKVAL_SRC_POS);
         const HostUSBDeviceFilter::Data &data = (*it)->i_getData();
-        if (aDevice->isMatch(data))
+        if (aDevice->i_isMatch(data))
         {
             USBDeviceFilterAction_T action = USBDeviceFilterAction_Null;
@@ -435,5 +435,5 @@
                 devLock.release();
                 alock.release();
-                aDevice->requestReleaseToHost();
+                aDevice->i_requestReleaseToHost();
                 return S_OK;
             }
@@ -471,5 +471,5 @@
         if (runMachineFilters(pMachine, aDevice))
         {
-            LogFlowThisFunc(("{%s} attached to %p\n", aDevice->getName().c_str(), (void *)pMachine));
+            LogFlowThisFunc(("{%s} attached to %p\n", aDevice->i_getName().c_str(), (void *)pMachine));
             return S_OK;
         }
@@ -485,7 +485,7 @@
     alock.release();
     if (fHoldIt)
-        aDevice->requestHold();
+        aDevice->i_requestHold();
     else
-        aDevice->requestReleaseToHost();
+        aDevice->i_requestReleaseToHost();
     return S_OK;
 }
@@ -506,5 +506,5 @@
 bool USBProxyService::runMachineFilters(SessionMachine *aMachine, ComObjPtr<HostUSBDevice> &aDevice)
 {
-    LogFlowThisFunc(("{%s} aMachine=%p \n", aDevice->getName().c_str(), aMachine));
+    LogFlowThisFunc(("{%s} aMachine=%p \n", aDevice->i_getName().c_str(), aMachine));
 
     /*
@@ -524,5 +524,5 @@
     {
         /* try to capture the device */
-        HRESULT hrc = aDevice->requestCaptureForVM(aMachine, false /* aSetError */, ulMaskedIfs);
+        HRESULT hrc = aDevice->i_requestCaptureForVM(aMachine, false /* aSetError */, ulMaskedIfs);
         return SUCCEEDED(hrc)
             || hrc == E_UNEXPECTED /* bad device state, give up */;
@@ -814,5 +814,5 @@
         PUSBDEVICE pCur = pTail;
         while (     pCur
-               &&   HostUSBDevice::compare(pCur, pDev) > 0)
+               &&   HostUSBDevice::i_compare(pCur, pDev) > 0)
             pCur = pCur->pPrev;
 
@@ -904,5 +904,5 @@
                 iDiff = -1;
             else
-                iDiff = pHostDevice->compare(pDevices);
+                iDiff = pHostDevice->i_compare(pDevices);
         }
         if (!iDiff)
@@ -943,6 +943,6 @@
                 Log(("USBProxyService::processChanges: attached %p {%s} %s / %p:{.idVendor=%#06x, .idProduct=%#06x, .pszProduct=\"%s\", .pszManufacturer=\"%s\"}\n",
                      (HostUSBDevice *)NewObj,
-                     NewObj->getName().c_str(),
-                     NewObj->getStateName(),
+                     NewObj->i_getName().c_str(),
+                     NewObj->i_getStateName(),
                      pNew,
                      pNew->idVendor,
@@ -964,5 +964,5 @@
                  * as the result of a re-enumeration.
                  */
-                if (!pHostDevice->wasActuallyDetached())
+                if (!pHostDevice->i_wasActuallyDetached())
                     it++;
                 else
@@ -974,5 +974,5 @@
                     Log(("USBProxyService::processChanges: detached %p {%s}\n",
                          (HostUSBDevice *)pHostDevice,
-                         pHostDevice->getName().c_str()));
+                         pHostDevice->i_getName().c_str()));
 
                     /* from now on, the object is no more valid,
@@ -1025,12 +1025,12 @@
     LogFlowThisFunc(("aDevice=%p name={%s} state=%s id={%RTuuid}\n",
                      (HostUSBDevice *)aDevice,
-                     aDevice->getName().c_str(),
-                     aDevice->getStateName(),
-                     aDevice->getId().raw()));
+                     aDevice->i_getName().c_str(),
+                     aDevice->i_getStateName(),
+                     aDevice->i_getId().raw()));
 
     /*
      * Run filters on the device.
      */
-    if (aDevice->isCapturableOrHeld())
+    if (aDevice->i_isCapturableOrHeld())
     {
         devLock.release();
@@ -1060,7 +1060,7 @@
     LogFlowThisFunc(("aDevice=%p name={%s} state=%s id={%RTuuid}\n",
                      (HostUSBDevice *)aDevice,
-                     aDevice->getName().c_str(),
-                     aDevice->getStateName(),
-                     aDevice->getId().raw()));
+                     aDevice->i_getName().c_str(),
+                     aDevice->i_getStateName(),
+                     aDevice->i_getId().raw()));
 
     /*
@@ -1069,5 +1069,5 @@
      */
     devLock.release();
-    aDevice->onPhysicalDetached();
+    aDevice->i_onPhysicalDetached();
 }
 
@@ -1091,5 +1091,5 @@
      * Just hand it to the device, it knows best what needs to be done.
      */
-    return aDevice->updateStateFake(aUSBDevice, aRunFilters, aIgnoreMachine);
+    return aDevice->i_updateStateFake(aUSBDevice, aRunFilters, aIgnoreMachine);
 }
 
@@ -1111,5 +1111,5 @@
     AssertReturn(!aDevice->isWriteLockOnCurrentThread(), false);
 
-    return aDevice->updateState(aUSBDevice, aRunFilters, aIgnoreMachine);
+    return aDevice->i_updateState(aUSBDevice, aRunFilters, aIgnoreMachine);
 }
 
@@ -1135,7 +1135,7 @@
     LogFlowThisFunc(("aDevice=%p name={%s} state=%s id={%RTuuid} aRunFilters=%RTbool aIgnoreMachine=%p\n",
                      (HostUSBDevice *)aDevice,
-                     aDevice->getName().c_str(),
-                     aDevice->getStateName(),
-                     aDevice->getId().raw(),
+                     aDevice->i_getName().c_str(),
+                     aDevice->i_getStateName(),
+                     aDevice->i_getId().raw(),
                      (pllOpenedMachines != NULL),       // used to be "bool aRunFilters"
                      aIgnoreMachine));
@@ -1248,5 +1248,5 @@
          it != mDevices.end();
          ++it)
-        if ((*it)->getId() == Id)
+        if ((*it)->i_getId() == Id)
         {
             Dev = (*it);
Index: /trunk/src/VBox/Main/src-server/linux/USBProxyServiceLinux.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/linux/USBProxyServiceLinux.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/src-server/linux/USBProxyServiceLinux.cpp	(revision 49960)
@@ -226,10 +226,10 @@
 
     AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS);
-    LogFlowThisFunc(("aDevice=%s\n", aDevice->getName().c_str()));
+    LogFlowThisFunc(("aDevice=%s\n", aDevice->i_getName().c_str()));
 
     /*
      * Don't think we need to do anything when the device is held... fake it.
      */
-    Assert(aDevice->getUnistate() == kHostUSBDeviceState_Capturing);
+    Assert(aDevice->i_getUnistate() == kHostUSBDeviceState_Capturing);
     devLock.release();
     interruptWait();
@@ -245,10 +245,10 @@
 
     AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS);
-    LogFlowThisFunc(("aDevice=%s\n", aDevice->getName().c_str()));
+    LogFlowThisFunc(("aDevice=%s\n", aDevice->i_getName().c_str()));
 
     /*
      * We're not really holding it atm., just fake it.
      */
-    Assert(aDevice->getUnistate() == kHostUSBDeviceState_ReleasingToHost);
+    Assert(aDevice->i_getUnistate() == kHostUSBDeviceState_ReleasingToHost);
     devLock.release();
     interruptWait();
Index: /trunk/src/VBox/Main/src-server/win/USBProxyServiceWindows.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/win/USBProxyServiceWindows.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/src-server/win/USBProxyServiceWindows.cpp	(revision 49960)
@@ -144,7 +144,7 @@
 
     AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS);
-    LogFlowThisFunc(("aDevice=%s\n", aDevice->getName().c_str()));
-
-    Assert(aDevice->getUnistate() == kHostUSBDeviceState_Capturing);
+    LogFlowThisFunc(("aDevice=%s\n", aDevice->i_getName().c_str()));
+
+    Assert(aDevice->i_getUnistate() == kHostUSBDeviceState_Capturing);
 
     /*
@@ -186,7 +186,7 @@
 
     AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS);
-    LogFlowThisFunc(("aDevice=%s\n", aDevice->getName().c_str()));
-
-    Assert(aDevice->getUnistate() == kHostUSBDeviceState_ReleasingToHost);
+    LogFlowThisFunc(("aDevice=%s\n", aDevice->i_getName().c_str()));
+
+    Assert(aDevice->i_getUnistate() == kHostUSBDeviceState_ReleasingToHost);
 
     /*
Index: /trunk/src/VBox/Main/src-server/xpcom/server.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 49960)
@@ -110,7 +110,4 @@
 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SnapshotMachine, IMachine)
 
-NS_DECL_CLASSINFO(Snapshot)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Snapshot, ISnapshot)
-
 NS_DECL_CLASSINFO(Progress)
 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Progress, IProgress)
@@ -123,6 +120,4 @@
 
 #ifdef VBOX_WITH_USB
-NS_DECL_CLASSINFO(HostUSBDevice)
-NS_IMPL_THREADSAFE_ISUPPORTS2_CI(HostUSBDevice, IUSBDevice, IHostUSBDevice)
 
 #endif
Index: /trunk/src/VBox/Main/testcase/tstUSBProxyLinux.cpp
===================================================================
--- /trunk/src/VBox/Main/testcase/tstUSBProxyLinux.cpp	(revision 49959)
+++ /trunk/src/VBox/Main/testcase/tstUSBProxyLinux.cpp	(revision 49960)
@@ -58,5 +58,5 @@
 VBoxMainHotplugWaiter::VBoxMainHotplugWaiter(char const*) {}
 
-com::Utf8Str HostUSBDevice::getName()
+com::Utf8Str HostUSBDevice::i_getName()
 {
     return Utf8Str();
