- Timestamp:
- May 17, 2016 1:41:19 PM (8 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
-
include/ApplianceImpl.h (modified) (4 diffs)
-
include/ApplianceImplPrivate.h (modified) (3 diffs)
-
src-server/ApplianceImpl.cpp (modified) (3 diffs)
-
src-server/ApplianceImplImport.cpp (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ApplianceImpl.h
r60334 r61003 5 5 6 6 /* 7 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 21 21 /* VBox includes */ 22 #include <VBox/settings.h>23 22 #include "VirtualSystemDescriptionWrap.h" 24 23 #include "ApplianceWrap.h" … … 129 128 HRESULT i_searchUniqueDiskImageFilePath(Utf8Str& aName) const; 130 129 HRESULT i_setUpProgress(ComObjPtr<Progress> &pProgress, 131 const Bstr &bstrDescription,130 const Utf8Str &strDescription, 132 131 SetUpProgressMode mode); 133 132 void i_waitForAsyncProgress(ComObjPtr<Progress> &pProgressThis, ComPtr<IProgress> &pProgressAsync); … … 179 178 void i_convertDiskAttachmentValues(const ovf::HardDiskController &hdc, 180 179 uint32_t ulAddressOnParent, 181 Bstr &controllerType,180 Utf8Str &controllerType, 182 181 int32_t &lControllerPort, 183 182 int32_t &lDevice); -
trunk/src/VBox/Main/include/ApplianceImplPrivate.h
r60337 r61003 5 5 6 6 /* 7 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 36 36 // 37 37 //////////////////////////////////////////////////////////////////////////////// 38 39 namespace settings 40 { 41 struct AttachedDevice; 42 } 38 43 39 44 typedef std::pair<Utf8Str, Utf8Str> STRPAIR; … … 285 290 { 286 291 ComPtr<IMachine> pMachine; 287 Bstr controllerType;292 Utf8Str controllerName; 288 293 int32_t lControllerPort; // 0-29 for SATA 289 294 int32_t lDevice; // IDE: 0 or 1, otherwise 0 always -
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r60334 r61003 5 5 6 6 /* 7 * Copyright (C) 2008-201 3Oracle Corporation7 * Copyright (C) 2008-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 949 949 * 950 950 * @param pProgress 951 * @param bstrDescription951 * @param strDescription 952 952 * @param mode 953 953 * @return 954 954 */ 955 955 HRESULT Appliance::i_setUpProgress(ComObjPtr<Progress> &pProgress, 956 const Bstr &bstrDescription,956 const Utf8Str &strDescription, 957 957 SetUpProgressMode mode) 958 958 { … … 1049 1049 1050 1050 rc = pProgress->init(mVirtualBox, static_cast<IAppliance*>(this), 1051 bstrDescription.raw(),1051 Bstr(strDescription).raw(), 1052 1052 TRUE /* aCancelable */, 1053 1053 cOperations, // ULONG cOperations, 1054 1054 ulTotalOperationsWeight, // ULONG ulTotalOperationsWeight, 1055 bstrDescription.raw(), // CBSTR bstrFirstOperationDescription,1055 Bstr(strDescription).raw(), // CBSTR bstrFirstOperationDescription, 1056 1056 m->ulWeightForXmlOperation); // ULONG ulFirstOperationWeight, 1057 1057 return rc; -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r60341 r61003 469 469 if (vsysThis.pelmVBoxMachine) 470 470 { 471 settings::StorageControllersList &llControllers = pNewDesc->m->pConfig-> storageMachine.llStorageControllers;471 settings::StorageControllersList &llControllers = pNewDesc->m->pConfig->hardwareMachine.storage.llStorageControllers; 472 472 settings::StorageControllersList::iterator it3; 473 473 for (it3 = llControllers.begin(); … … 2012 2012 { 2013 2013 delete task; 2014 throw rc = setError(VBOX_E_OBJECT_NOT_FOUND, 2014 throw rc = setError(VBOX_E_OBJECT_NOT_FOUND, 2015 2015 tr("Could not create TaskOVF object for importing OVF data into VirtualBox")); 2016 2016 } … … 2281 2281 * @param hdc in: the HardDiskController structure to attach to. 2282 2282 * @param ulAddressOnParent in: the AddressOnParent parameter from OVF. 2283 * @param controller Type out: the name of the hard disk controller to attach to (e.g. "IDE Controller").2283 * @param controllerName out: the name of the hard disk controller to attach to (e.g. "IDE Controller"). 2284 2284 * @param lControllerPort out: the channel (controller port) of the controller to attach to. 2285 2285 * @param lDevice out: the device number to attach to. 2286 2286 */ 2287 2287 void Appliance::i_convertDiskAttachmentValues(const ovf::HardDiskController &hdc, 2288 uint32_t ulAddressOnParent,2289 Bstr &controllerType,2290 int32_t &lControllerPort,2291 int32_t &lDevice)2288 uint32_t ulAddressOnParent, 2289 Utf8Str &controllerName, 2290 int32_t &lControllerPort, 2291 int32_t &lDevice) 2292 2292 { 2293 2293 Log(("Appliance::i_convertDiskAttachmentValues: hdc.system=%d, hdc.fPrimary=%d, ulAddressOnParent=%d\n", … … 2304 2304 // respectively. For the secondary IDE controller, the device number is always 1 because 2305 2305 // the master device is reserved for the CD-ROM drive. 2306 controller Type = Bstr("IDE Controller");2306 controllerName = "IDE"; 2307 2307 switch (ulAddressOnParent) 2308 2308 { … … 2356 2356 2357 2357 case ovf::HardDiskController::SATA: 2358 controller Type = Bstr("SATA Controller");2358 controllerName = "SATA"; 2359 2359 lControllerPort = (long)ulAddressOnParent; 2360 2360 lDevice = (long)0; … … 2364 2364 { 2365 2365 if(hdc.strControllerType.compare("lsilogicsas")==0) 2366 controller Type = Bstr("SAS Controller");2366 controllerName = "SAS"; 2367 2367 else 2368 controller Type = Bstr("SCSI Controller");2368 controllerName = "SCSI"; 2369 2369 lControllerPort = (long)ulAddressOnParent; 2370 2370 lDevice = (long)0; … … 2994 2994 { 2995 2995 ComPtr<IStorageController> pController; 2996 Bstr bstrName(L"SCSI Controller");2996 Utf8Str strName("SCSI Controller"); 2997 2997 StorageBus_T busType = StorageBus_SCSI; 2998 2998 StorageControllerType_T controllerType; … … 3003 3003 { 3004 3004 // OVF treats LsiLogicSas as a SCSI controller but VBox considers it a class of its own 3005 bstrName = L"SAS Controller";3005 strName = "SAS Controller"; 3006 3006 busType = StorageBus_SAS; 3007 3007 controllerType = StorageControllerType_LsiLogicSas; … … 3014 3014 hdcVBox.c_str()); 3015 3015 3016 rc = pNewMachine->AddStorageController( bstrName.raw(), busType, pController.asOutParam());3016 rc = pNewMachine->AddStorageController(Bstr(strName).raw(), busType, pController.asOutParam()); 3017 3017 if (FAILED(rc)) throw rc; 3018 3018 rc = pController->COMSETTER(ControllerType)(controllerType); … … 3088 3088 MyHardDiskAttachment mhda; 3089 3089 mhda.pMachine = pNewMachine; 3090 mhda.controller Type = bstrName;3090 mhda.controllerName = bstrName; 3091 3091 mhda.lControllerPort = 0; 3092 3092 mhda.lDevice = 0; … … 3094 3094 Log(("Attaching floppy\n")); 3095 3095 3096 rc = sMachine->AttachDevice( mhda.controllerType.raw(),3096 rc = sMachine->AttachDevice(Bstr(mhda.controllerName).raw(), 3097 3097 mhda.lControllerPort, 3098 3098 mhda.lDevice, … … 3323 3323 i_convertDiskAttachmentValues(hdc, 3324 3324 ovfVdisk.ulAddressOnParent, 3325 mhda.controller Type, // Bstr3325 mhda.controllerName, 3326 3326 mhda.lControllerPort, 3327 3327 mhda.lDevice); … … 3355 3355 throw rc; 3356 3356 3357 rc = sMachine->AttachDevice( mhda.controllerType.raw(),// wstringname3357 rc = sMachine->AttachDevice(Bstr(mhda.controllerName).raw(),// name 3358 3358 mhda.lControllerPort, // long controllerPort 3359 3359 mhda.lDevice, // long device … … 3365 3365 else 3366 3366 { 3367 rc = sMachine->AttachDevice( mhda.controllerType.raw(),// wstringname3367 rc = sMachine->AttachDevice(Bstr(mhda.controllerName).raw(),// name 3368 3368 mhda.lControllerPort, // long controllerPort 3369 3369 mhda.lDevice, // long device … … 3579 3579 * attachments pointing to the last hard disk image, which causes import 3580 3580 * failures. A long fixed bug, however the OVF files are long lived. */ 3581 settings::StorageControllersList &llControllers = config. storageMachine.llStorageControllers;3581 settings::StorageControllersList &llControllers = config.hardwareMachine.storage.llStorageControllers; 3582 3582 Guid hdUuid; 3583 3583 uint32_t cDisks = 0; … … 3792 3792 3793 3793 // for each storage controller... 3794 for (settings::StorageControllersList::iterator sit = config. storageMachine.llStorageControllers.begin();3795 sit != config. storageMachine.llStorageControllers.end();3794 for (settings::StorageControllersList::iterator sit = config.hardwareMachine.storage.llStorageControllers.begin(); 3795 sit != config.hardwareMachine.storage.llStorageControllers.end(); 3796 3796 ++sit) 3797 3797 { … … 3910 3910 break; 3911 3911 } // for (settings::AttachedDevicesList::const_iterator dit = sc.llAttachedDevices.begin(); 3912 } // for (settings::StorageControllersList::const_iterator sit = config. storageMachine.llStorageControllers.begin();3912 } // for (settings::StorageControllersList::const_iterator sit = config.hardwareMachine.storage.llStorageControllers.begin(); 3913 3913 3914 3914 // no disk with such a UUID found: … … 4093 4093 HRESULT rc = S_OK; 4094 4094 4095 settings::StorageControllersList &llControllers = config-> storageMachine.llStorageControllers;4095 settings::StorageControllersList &llControllers = config->hardwareMachine.storage.llStorageControllers; 4096 4096 settings::StorageControllersList::iterator itscl; 4097 4097 for (itscl = llControllers.begin();
Note:
See TracChangeset
for help on using the changeset viewer.

