Changeset 26067 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 27, 2010 1:33:54 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56994
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r26030 r26067 5 5 6 6 /* 7 * Copyright (C) 2006-20 09Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 308 308 ///////////////////////////////////////////////////////////////////////////// 309 309 310 HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl) 310 HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, 311 bool aFullConsole) 311 312 { 312 313 AssertReturn(aMachine && aControl, E_INVALIDARG); … … 331 332 AssertComRCReturnRC(rc); 332 333 334 if (aFullConsole) 335 { 333 336 #ifdef VBOX_WITH_VRDP 334 rc = mMachine->COMGETTER(VRDPServer)(unconst(mVRDPServer).asOutParam());335 AssertComRCReturnRC(rc);337 rc = mMachine->COMGETTER(VRDPServer)(unconst(mVRDPServer).asOutParam()); 338 AssertComRCReturnRC(rc); 336 339 #endif 337 340 338 /* Create associated child COM objects */ 339 340 unconst(mGuest).createObject(); 341 rc = mGuest->init(this); 342 AssertComRCReturnRC(rc); 343 344 unconst(mKeyboard).createObject(); 345 rc = mKeyboard->init(this); 346 AssertComRCReturnRC(rc); 347 348 unconst(mMouse).createObject(); 349 rc = mMouse->init(this); 350 AssertComRCReturnRC(rc); 351 352 unconst(mDisplay).createObject(); 353 rc = mDisplay->init(this); 354 AssertComRCReturnRC(rc); 355 356 unconst(mRemoteDisplayInfo).createObject(); 357 rc = mRemoteDisplayInfo->init(this); 358 AssertComRCReturnRC(rc); 359 360 /* Grab global and machine shared folder lists */ 361 362 rc = fetchSharedFolders(true /* aGlobal */); 363 AssertComRCReturnRC(rc); 364 rc = fetchSharedFolders(false /* aGlobal */); 365 AssertComRCReturnRC(rc); 366 367 /* Create other child objects */ 368 369 unconst(mConsoleVRDPServer) = new ConsoleVRDPServer(this); 370 AssertReturn(mConsoleVRDPServer, E_FAIL); 341 /* Create associated child COM objects */ 342 343 unconst(mGuest).createObject(); 344 rc = mGuest->init(this); 345 AssertComRCReturnRC(rc); 346 347 unconst(mKeyboard).createObject(); 348 rc = mKeyboard->init(this); 349 AssertComRCReturnRC(rc); 350 351 unconst(mMouse).createObject(); 352 rc = mMouse->init(this); 353 AssertComRCReturnRC(rc); 354 355 unconst(mDisplay).createObject(); 356 rc = mDisplay->init(this); 357 AssertComRCReturnRC(rc); 358 359 unconst(mRemoteDisplayInfo).createObject(); 360 rc = mRemoteDisplayInfo->init(this); 361 AssertComRCReturnRC(rc); 362 363 /* Grab global and machine shared folder lists */ 364 365 rc = fetchSharedFolders(true /* aGlobal */); 366 AssertComRCReturnRC(rc); 367 rc = fetchSharedFolders(false /* aGlobal */); 368 AssertComRCReturnRC(rc); 369 370 /* Create other child objects */ 371 372 unconst(mConsoleVRDPServer) = new ConsoleVRDPServer(this); 373 AssertReturn(mConsoleVRDPServer, E_FAIL); 374 375 unconst(mVMMDev) = new VMMDev(this); 376 AssertReturn(mVMMDev, E_FAIL); 377 378 unconst(mAudioSniffer) = new AudioSniffer(this); 379 AssertReturn(mAudioSniffer, E_FAIL); 380 } 371 381 372 382 mcAudioRefs = 0; 373 383 mcVRDPClients = 0; 374 384 mu32SingleRDPClientId = 0; 375 376 unconst(mVMMDev) = new VMMDev(this);377 AssertReturn(mVMMDev, E_FAIL);378 379 unconst(mAudioSniffer) = new AudioSniffer(this);380 AssertReturn(mAudioSniffer, E_FAIL);381 385 382 386 /* Confirm a successful initialization when it's the case */ -
trunk/src/VBox/Main/SessionImpl.cpp
r25901 r26067 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 89 89 mState = SessionState_Closed; 90 90 mType = SessionType_Null; 91 mFullConsole = false; 91 92 92 93 #if defined(RT_OS_WINDOWS) … … 176 177 } 177 178 179 STDMETHODIMP Session::COMSETTER(FullConsole) (BOOL aFullConsole) 180 { 181 AutoCaller autoCaller(this); 182 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 183 184 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 185 186 AssertReturn(mState == SessionState_Closed, VBOX_E_INVALID_VM_STATE); 187 188 mFullConsole = aFullConsole; 189 return S_OK; 190 } 191 192 STDMETHODIMP Session::COMGETTER(FullConsole) (BOOL *aFullConsole) 193 { 194 CheckComArgOutPointerValid(aFullConsole); 195 196 AutoCaller autoCaller(this); 197 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 198 199 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 200 201 *aFullConsole = mFullConsole; 202 return S_OK; 203 } 204 178 205 STDMETHODIMP Session::COMGETTER(Machine) (IMachine **aMachine) 179 206 { … … 319 346 320 347 rc = mConsole.createObject(); 321 AssertComRCReturn 322 323 rc = mConsole->init (aMachine, mControl);324 AssertComRCReturn 348 AssertComRCReturn(rc, rc); 349 350 rc = mConsole->init(aMachine, mControl, mFullConsole); 351 AssertComRCReturn(rc, rc); 325 352 326 353 rc = grabIPCSemaphore(); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r25904 r26067 12960 12960 <interface 12961 12961 name="ISession" extends="$dispatched" 12962 uuid=" 12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"12962 uuid="37661fa3-385b-4b2b-8b22-93304c45f36e" 12963 12963 wsmap="managed" 12964 12964 > … … 13015 13015 is open within one process, no any other process may open another direct 13016 13016 session for the same machine. This prevents the machine from being changed 13017 by other processes while it is running or while the machine is being configured. 13017 by other processes while it is running or while the machine is being 13018 configured. If the current process is should have a full Console 13019 object with all associated sub-objects, remember to set 13020 <link to="ISession::fullConsole"/> appropriately. 13018 13021 </li> 13019 13022 </ul> … … 13047 13050 SessionType_SessionOpen), otherwise an error will be returned. 13048 13051 </desc> 13052 </attribute> 13053 13054 <attribute name="fullConsole" type="boolean"> 13055 <desc>Defines whether the console object is meant for full VMs, 13056 which have the associated sub-objects, or if it is unnecessary to 13057 create them. Default is @c false.</desc> 13049 13058 </attribute> 13050 13059 -
trunk/src/VBox/Main/include/ConsoleImpl.h
r25966 r26067 5 5 6 6 /* 7 * Copyright (C) 2006-20 09Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 103 103 104 104 // public initializers/uninitializers for internal purposes only 105 HRESULT init (IMachine *aMachine, IInternalMachineControl *aControl); 105 HRESULT init (IMachine *aMachine, IInternalMachineControl *aControl, 106 bool aFullConsole); 106 107 void uninit(); 107 108 -
trunk/src/VBox/Main/include/SessionImpl.h
r25901 r26067 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 78 78 STDMETHOD(COMGETTER(State)) (SessionState_T *aState); 79 79 STDMETHOD(COMGETTER(Type)) (SessionType_T *aType); 80 STDMETHOD(COMSETTER(FullConsole)) (BOOL aType); 81 STDMETHOD(COMGETTER(FullConsole)) (BOOL *aType); 80 82 STDMETHOD(COMGETTER(Machine)) (IMachine **aMachine); 81 83 STDMETHOD(COMGETTER(Console)) (IConsole **aConsole); … … 122 124 SessionState_T mState; 123 125 SessionType_T mType; 126 bool mFullConsole; 124 127 125 128 ComPtr<IInternalMachineControl> mControl;
Note:
See TracChangeset
for help on using the changeset viewer.