summaryrefslogtreecommitdiff
path: root/src/VBox/Main/src-client/SessionImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Main/src-client/SessionImpl.cpp')
-rw-r--r--src/VBox/Main/src-client/SessionImpl.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/VBox/Main/src-client/SessionImpl.cpp b/src/VBox/Main/src-client/SessionImpl.cpp
index f156246d2..564cf9a59 100644
--- a/src/VBox/Main/src-client/SessionImpl.cpp
+++ b/src/VBox/Main/src-client/SessionImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: SessionImpl.cpp $ */
+/* $Id: SessionImpl.cpp 37423 2011-06-12 18:37:56Z vboxsync $ */
/** @file
* VBox Client Session COM Class implementation in VBoxC.
*/
@@ -56,7 +56,11 @@ HRESULT Session::FinalConstruct()
{
LogFlowThisFunc(("\n"));
- return init();
+ HRESULT rc = init();
+
+ BaseFinalConstruct();
+
+ return rc;
}
void Session::FinalRelease()
@@ -64,6 +68,8 @@ void Session::FinalRelease()
LogFlowThisFunc(("\n"));
uninit();
+
+ BaseFinalRelease();
}
// public initializer/uninitializer for internal purposes only
@@ -181,9 +187,9 @@ STDMETHODIMP Session::COMGETTER(Machine)(IMachine **aMachine)
HRESULT rc;
if (mConsole)
- rc = mConsole->machine().queryInterfaceTo(aMachine);
+ rc = mConsole->machine().queryInterfaceTo(aMachine);
else
- rc = mRemoteMachine.queryInterfaceTo(aMachine);
+ rc = mRemoteMachine.queryInterfaceTo(aMachine);
if (FAILED(rc))
{
/** @todo VBox 3.3: replace E_FAIL with rc here. */
@@ -214,6 +220,7 @@ STDMETHODIMP Session::COMGETTER(Console)(IConsole **aConsole)
rc = mConsole.queryInterfaceTo(aConsole);
else
rc = mRemoteConsole.queryInterfaceTo(aConsole);
+
if (FAILED(rc))
{
/** @todo VBox 3.3: replace E_FAIL with rc here. */
@@ -719,6 +726,20 @@ STDMETHODIMP Session::OnBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup)
return mConsole->onBandwidthGroupChange(aBandwidthGroup);
}
+STDMETHODIMP Session::OnStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove)
+{
+ LogFlowThisFunc(("\n"));
+
+ AutoCaller autoCaller(this);
+ AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
+
+ AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+ AssertReturn(mState == SessionState_Locked, VBOX_E_INVALID_VM_STATE);
+ AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE);
+
+ return mConsole->onStorageDeviceChange(aMediumAttachment, aRemove);
+}
+
STDMETHODIMP Session::AccessGuestProperty(IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags,
BOOL aIsSetter, BSTR *aRetValue, LONG64 *aRetTimestamp, BSTR *aRetFlags)
{