Changeset 13680 in vbox
- Timestamp:
- Oct 30, 2008 4:14:13 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38643
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostPower.cpp
r13679 r13680 74 74 if (state == MachineState_Running) 75 75 { 76 #if 0 77 ComPtr<ISession> session; 76 ComPtr <ISession> session; 77 78 rc = session.createInprocObject (CLSID_Session); 79 if (FAILED (rc)) 80 return rc; 78 81 79 82 /* get the IInternalSessionControl interface */ 80 83 ComPtr <IInternalSessionControl> control = session; 81 ComAssertMsgRet (!!control, ("No IInternalSessionControl interface"), 82 E_INVALIDARG); 84 if (!control) 85 { 86 rc = E_INVALIDARG; 87 goto fail; 88 } 83 89 84 90 rc = machine->openExistingSession (control); 85 if (FAILED (rc))86 return rc;87 88 /* get the associated console */89 ComPtr<IConsole> console;90 rc = session->COMGETTER(Console)(console.asOutParam());91 91 if (SUCCEEDED (rc)) 92 92 { 93 switch (event) 93 /* get the associated console */ 94 ComPtr<IConsole> console; 95 rc = session->COMGETTER(Console)(console.asOutParam()); 96 if (SUCCEEDED (rc)) 94 97 { 95 case HostPowerEvent_Suspend: 96 rc = console->Pause(); 97 break; 98 case HostPowerEvent_Resume: 99 case HostPowerEvent_BatteryLow: 100 break; 98 switch (event) 99 { 100 case HostPowerEvent_Suspend: 101 rc = console->Pause(); 102 break; 103 case HostPowerEvent_Resume: 104 case HostPowerEvent_BatteryLow: 105 break; 106 } 101 107 } 102 108 } 109 fail: 103 110 session->Close(); 104 #endif 111 105 112 } 106 113 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.