- Timestamp:
- Nov 4, 2010 4:50:03 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r33708 r33784 61 61 #include "VMMDev.h" 62 62 #include "package-generated.h" 63 #ifdef VBOX_WITH_EXTPACK 64 # include "ExtPackManagerImpl.h" 65 #endif 63 66 64 67 // generated header … … 455 458 AssertComRCReturnRC(rc); 456 459 460 #ifdef VBOX_WITH_EXTPACK 461 unconst(mptrExtPackManager).createObject(); 462 rc = mptrExtPackManager->init(NULL, false); /* Drop zone handling is VBoxSVC only. */ 463 AssertComRCReturnRC(rc); 464 #endif 465 457 466 /* Grab global and machine shared folder lists */ 458 467 … … 2075 2084 alock.leave(); 2076 2085 2077 int vrc; 2078 if (VMR3GetState(mpVM) == VMSTATE_CREATED) 2079 vrc = VMR3PowerOn(mpVM); /* (PowerUpPaused) */ 2080 else 2081 vrc = VMR3Resume(mpVM); 2086 #ifdef VBOX_WITH_EXTPACK 2087 int vrc = mptrExtPackManager->callAllVmPowerOnHooks(this, mpVM); /** @todo called a few times too many... */ 2088 #else 2089 int vrc = VINF_SUCCESS; 2090 #endif 2091 if (RT_SUCCESS(vrc)) 2092 { 2093 if (VMR3GetState(mpVM) == VMSTATE_CREATED) 2094 vrc = VMR3PowerOn(mpVM); /* (PowerUpPaused) */ 2095 else 2096 vrc = VMR3Resume(mpVM); 2097 } 2082 2098 2083 2099 HRESULT rc = RT_SUCCESS(vrc) ? S_OK : … … 4505 4521 int vrc2 = VMR3Resume(pVM); 4506 4522 mVMStateChangeCallbackDisabled = false; 4507 AssertRC(vrc2);4508 4523 if (RT_FAILURE(vrc2)) 4509 4524 { 4510 4525 /* too bad, we failed. try to sync the console state with the VMM state */ 4526 AssertLogRelRC(vrc2); 4511 4527 vmstateChangeCallback(pVM, VMSTATE_SUSPENDED, enmVMState, this); 4512 4528 } … … 5628 5644 alock.leave(); 5629 5645 vrc = VMR3PowerOff(mpVM); 5646 #ifdef VBOX_WITH_EXTPACK 5647 mptrExtPackManager->callAllVmPowerOffHooks(this, mpVM); 5648 #endif 5630 5649 alock.enter(); 5631 5650 } … … 7521 7540 { 7522 7541 /* Start/Resume the VM execution */ 7523 vrc = VMR3Resume(pVM); 7524 AssertRC(vrc); 7542 #ifdef VBOX_WITH_EXTPACK 7543 vrc = console->mptrExtPackManager->callAllVmPowerOnHooks(console, pVM); 7544 #endif 7545 if (RT_SUCCESS(vrc)) 7546 vrc = VMR3Resume(pVM); 7547 AssertLogRelRC(vrc); 7525 7548 } 7526 7549 } … … 7529 7552 if (RT_FAILURE(vrc)) 7530 7553 { 7531 int vrc2 = VMR3PowerOff(pVM); 7532 AssertRC(vrc2); 7554 int vrc2 = VMR3PowerOff(pVM); AssertLogRelRC(vrc2); 7555 #ifdef VBOX_WITH_EXTPACK 7556 console->mptrExtPackManager->callAllVmPowerOffHooks(console, pVM); 7557 #endif 7533 7558 } 7534 7559 } … … 7542 7567 { 7543 7568 ErrorInfoKeeper eik; 7544 int vrc2 = VMR3PowerOff(pVM); 7545 AssertRC(vrc2); 7569 int vrc2 = VMR3PowerOff(pVM); AssertLogRelRC(vrc2); 7570 #ifdef VBOX_WITH_EXTPACK 7571 console->mptrExtPackManager->callAllVmPowerOffHooks(console, pVM); 7572 #endif 7546 7573 } 7547 7574 } … … 7574 7601 7575 7602 /* Power on the FT enabled VM. */ 7576 vrc = FTMR3PowerOn(pVM, (task->mEnmFaultToleranceState == FaultToleranceState_Master) /* fMaster */, uInterval, pszAddress, uPort, pszPassword); 7577 AssertRC(vrc); 7603 #ifdef VBOX_WITH_EXTPACK 7604 vrc = console->mptrExtPackManager->callAllVmPowerOnHooks(console, pVM); 7605 #endif 7606 if (RT_SUCCESS(vrc)) 7607 vrc = FTMR3PowerOn(pVM, 7608 task->mEnmFaultToleranceState == FaultToleranceState_Master /* fMaster */, 7609 uInterval, 7610 pszAddress, 7611 uPort, 7612 pszPassword); 7613 AssertLogRelRC(vrc); 7578 7614 } 7579 7615 task->mProgress->setCancelCallback(NULL, NULL); … … 7588 7624 { 7589 7625 /* Power on the VM (i.e. start executing) */ 7590 vrc = VMR3PowerOn(pVM); 7591 AssertRC(vrc); 7626 #ifdef VBOX_WITH_EXTPACK 7627 vrc = console->mptrExtPackManager->callAllVmPowerOnHooks(console, pVM); 7628 #endif 7629 if (RT_SUCCESS(vrc)) 7630 vrc = VMR3PowerOn(pVM); 7631 AssertLogRelRC(vrc); 7592 7632 } 7593 7633 … … 8078 8118 LogFlowFunc(("VMR3Resume (on failure)...\n")); 8079 8119 alock.leave(); 8080 int vrc = VMR3Resume(that->mpVM); 8120 int vrc = VMR3Resume(that->mpVM); AssertLogRelRC(vrc); 8081 8121 alock.enter(); 8082 AssertLogRelRC(vrc);8083 8122 if (RT_FAILURE(vrc)) 8084 8123 that->setMachineState(MachineState_Paused); -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r33722 r33784 109 109 #include "DHCPServerRunner.h" 110 110 #include "BusAssignmentManager.h" 111 #ifdef VBOX_WITH_EXTPACK 112 # include "ExtPackManagerImpl.h" 113 #endif 111 114 112 115 #if defined(RT_OS_DARWIN) … … 2475 2478 #undef H 2476 2479 2477 /* Register VM state change handler */ 2480 #ifdef VBOX_WITH_EXTPACK 2481 /* 2482 * Call the extension pack hooks if everything went well thus far. 2483 */ 2484 if (RT_SUCCESS(rc)) 2485 rc = pConsole->mptrExtPackManager->callAllVmConfigureVmmHooks(pConsole, pVM); 2486 #endif 2487 2488 /* 2489 * Register VM state change handler. 2490 */ 2478 2491 int rc2 = VMR3AtStateRegister(pVM, Console::vmstateChangeCallback, pConsole); 2479 2492 AssertRC(rc2); … … 2481 2494 rc = rc2; 2482 2495 2483 /* Register VM runtime error handler */ 2496 /* 2497 * Register VM runtime error handler. 2498 */ 2484 2499 rc2 = VMR3AtRuntimeErrorRegister(pVM, Console::setVMRuntimeErrorCallback, pConsole); 2485 2500 AssertRC(rc2); … … 3793 3808 { 3794 3809 int winEr = GetLastError(); 3795 LogRel(("Console::config Constructor: DeviceIoControl failed, err (0x%x), ignoring\n", winEr));3810 LogRel(("Console::configNetwork: DeviceIoControl failed, err (0x%x), ignoring\n", winEr)); 3796 3811 Assert(winEr == ERROR_INVALID_PARAMETER || winEr == ERROR_NOT_SUPPORTED || winEr == ERROR_BAD_COMMAND); 3797 3812 } … … 3810 3825 { 3811 3826 int winEr = GetLastError(); 3812 AssertLogRelMsgFailed(("Console::config Constructor: CreateFile failed, err (0x%x), ignoring\n", winEr));3827 AssertLogRelMsgFailed(("Console::configNetwork: CreateFile failed, err (0x%x), ignoring\n", winEr)); 3813 3828 } 3814 3829 -
trunk/src/VBox/Main/Makefile.kmk
r33693 r33784 728 728 # The VBoxExtPackHelperApp. 729 729 # 730 if 0# def VBOX_WITH_EXTPACK730 ifeq ($(LOGNAME),bird) # def VBOX_WITH_EXTPACK 731 731 PROGRAMS += VBoxExtPackHelperApp 732 732 VBoxExtPackHelperApp_TEMPLATE = VBoxR3Static -
trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp
r33656 r33784 109 109 "Usage: %s <command> [options]\n" 110 110 "Commands:\n" 111 " install --base path<dir> --name <name> --tarball <tarball> --tarball-fd <fd>\n"112 " uninstall --base path<dir> --name <name>\n"111 " install --base-dir <dir> --name <name> --tarball <tarball> --tarball-fd <fd>\n" 112 " uninstall --base-dir <dir> --name <name>\n" 113 113 , RTPathFilename(argv[0])); 114 114 rcExit = RTEXITCODE_SUCCESS; -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r33770 r33784 1282 1282 if (SUCCEEDED(rc)) 1283 1283 { 1284 #ifdef VBOX_WITH_EXTPACK 1285 /* call the extension pack hooks */ 1286 m->ptrExtPackManager->callAllVmCreatedHooks(machine); 1287 #endif 1288 1284 1289 /* set the return value */ 1285 1290 rc = machine.queryInterfaceTo(aMachine); -
trunk/src/VBox/Main/include/ConsoleImpl.h
r33708 r33784 38 38 class VMMDev; 39 39 class Progress; 40 #ifdef VBOX_WITH_EXTPACK 41 class ExtPackManager; 42 #endif 40 43 41 44 #include <VBox/RemoteDesktop/VRDE.h> … … 603 606 const ComObjPtr<VRDEServerInfo> mVRDEServerInfo; 604 607 const ComObjPtr<EventSource> mEventSource; 608 #ifdef VBOX_WITH_EXTPACK 609 const ComObjPtr<ExtPackManager> mptrExtPackManager; 610 #endif 605 611 606 612 USBDeviceList mUSBDevices;
Note:
See TracChangeset
for help on using the changeset viewer.