Changeset 17291 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 3, 2009 3:08:59 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r17287 r17291 1800 1800 throw setError(VBOX_E_FILE_ERROR, 1801 1801 tr("Missing guest OS type")); 1802 const Utf8Str &strOsTypeVBox = vsdeOS.front()->str Config;1802 const Utf8Str &strOsTypeVBox = vsdeOS.front()->strVbox; 1803 1803 1804 1804 /* Now that we know the base system get our internal defaults based on that. */ … … 1813 1813 throw setError(VBOX_E_FILE_ERROR, 1814 1814 tr("Missing VM name")); 1815 const Utf8Str &strNameVBox = vsdeName.front()->str Config;1815 const Utf8Str &strNameVBox = vsdeName.front()->strVbox; 1816 1816 rc = pVirtualBox->CreateMachine(Bstr(strNameVBox), Bstr(strOsTypeVBox), 1817 1817 Bstr(), Guid(), … … 1828 1828 std::list<VirtualSystemDescriptionEntry*> vsdeRAM = vsdescThis->findByType(VirtualSystemDescriptionType_Memory); 1829 1829 ComAssertMsgThrow(vsdeRAM.size() == 1, ("RAM size missing"), E_FAIL); 1830 const Utf8Str &memoryVBox = vsdeRAM.front()->str Config;1830 const Utf8Str &memoryVBox = vsdeRAM.front()->strVbox; 1831 1831 ULONG tt = (ULONG)RTStrToUInt64(memoryVBox.c_str()); 1832 1832 rc = pNewMachine->COMSETTER(MemorySize)(tt); … … 1851 1851 if (vsdeAudioAdapter.size() > 0) 1852 1852 { 1853 const Utf8Str& audioAdapterVBox = vsdeAudioAdapter.front()->str Config;1853 const Utf8Str& audioAdapterVBox = vsdeAudioAdapter.front()->strVbox; 1854 1854 if (RTStrICmp(audioAdapterVBox, "null") != 0) 1855 1855 { … … 1903 1903 ++nwIt, ++a) 1904 1904 { 1905 const Utf8Str &nwTypeVBox = (*nwIt)->str Config;1905 const Utf8Str &nwTypeVBox = (*nwIt)->strVbox; 1906 1906 uint32_t tt1 = RTStrToUInt32(nwTypeVBox.c_str()); 1907 1907 ComPtr<INetworkAdapter> nwVBox; … … 1945 1945 if (FAILED(rc)) throw rc; 1946 1946 1947 const char *pcszIDEType = vsdeHDCIDE.front()->str Config.c_str();1947 const char *pcszIDEType = vsdeHDCIDE.front()->strVbox.c_str(); 1948 1948 if (!strcmp(pcszIDEType, "PIIX3")) 1949 1949 rc = biosSettings->COMSETTER(IDEControllerType)(IDEControllerType_PIIX3); … … 1964 1964 if (vsdeHDCSATA.size() > 0) 1965 1965 { 1966 const Utf8Str &hdcVBox = vsdeHDCIDE.front()->str Config;1966 const Utf8Str &hdcVBox = vsdeHDCIDE.front()->strVbox; 1967 1967 if (hdcVBox == "AHCI") 1968 1968 { … … 2034 2034 VirtualSystemDescriptionEntry *vsdeHD = *itHD; 2035 2035 2036 const char *pcszDstFilePath = vsdeHD->str Config.c_str();2036 const char *pcszDstFilePath = vsdeHD->strVbox.c_str(); 2037 2037 /* Check if the destination file exists already or the 2038 2038 * destination path is empty. */ … … 2413 2413 ComSafeArrayOut(BSTR, aRefs), 2414 2414 ComSafeArrayOut(BSTR, aOrigValues), 2415 ComSafeArrayOut(BSTR, a ConfigValues),2415 ComSafeArrayOut(BSTR, aVboxValues), 2416 2416 ComSafeArrayOut(BSTR, aExtraConfigValues)) 2417 2417 { … … 2419 2419 ComSafeArrayOutIsNull(aRefs) || 2420 2420 ComSafeArrayOutIsNull(aOrigValues) || 2421 ComSafeArrayOutIsNull(a ConfigValues) ||2421 ComSafeArrayOutIsNull(aVboxValues) || 2422 2422 ComSafeArrayOutIsNull(aExtraConfigValues)) 2423 2423 return E_POINTER; … … 2432 2432 com::SafeArray<BSTR> sfaRefs(c); 2433 2433 com::SafeArray<BSTR> sfaOrigValues(c); 2434 com::SafeArray<BSTR> sfa ConfigValues(c);2434 com::SafeArray<BSTR> sfaVboxValues(c); 2435 2435 com::SafeArray<BSTR> sfaExtraConfigValues(c); 2436 2436 … … 2448 2448 bstr.cloneTo(&sfaRefs[i]); 2449 2449 2450 bstr = vsde.strO rig;2450 bstr = vsde.strOvf; 2451 2451 bstr.cloneTo(&sfaOrigValues[i]); 2452 2452 2453 bstr = vsde.str Config;2454 bstr.cloneTo(&sfa ConfigValues[i]);2453 bstr = vsde.strVbox; 2454 bstr.cloneTo(&sfaVboxValues[i]); 2455 2455 2456 2456 bstr = vsde.strExtraConfig; … … 2461 2461 sfaRefs.detachTo(ComSafeArrayOutArg(aRefs)); 2462 2462 sfaOrigValues.detachTo(ComSafeArrayOutArg(aOrigValues)); 2463 sfa ConfigValues.detachTo(ComSafeArrayOutArg(aConfigValues));2463 sfaVboxValues.detachTo(ComSafeArrayOutArg(aVboxValues)); 2464 2464 sfaExtraConfigValues.detachTo(ComSafeArrayOutArg(aExtraConfigValues)); 2465 2465 … … 2472 2472 */ 2473 2473 STDMETHODIMP VirtualSystemDescription::SetFinalValues(ComSafeArrayIn(BOOL, aEnabled), 2474 ComSafeArrayIn(IN_BSTR, arg ConfigValues),2474 ComSafeArrayIn(IN_BSTR, argVboxValues), 2475 2475 ComSafeArrayIn(IN_BSTR, argExtraConfigValues)) 2476 2476 { 2477 CheckComArgSafeArrayNotNull(arg ConfigValues);2477 CheckComArgSafeArrayNotNull(argVboxValues); 2478 2478 CheckComArgSafeArrayNotNull(argExtraConfigValues); 2479 2479 … … 2483 2483 AutoWriteLock alock(this); 2484 2484 2485 com::SafeArray<IN_BSTR> a ConfigValues(ComSafeArrayInArg(argConfigValues));2485 com::SafeArray<IN_BSTR> aVboxValues(ComSafeArrayInArg(argVboxValues)); 2486 2486 com::SafeArray<IN_BSTR> aExtraConfigValues(ComSafeArrayInArg(argExtraConfigValues)); 2487 2487 2488 if ( (a ConfigValues.size() != m->descriptions.size())2488 if ( (aVboxValues.size() != m->descriptions.size()) 2489 2489 || (aExtraConfigValues.size() != m->descriptions.size()) 2490 2490 ) … … 2501 2501 if (aEnabled[i]) 2502 2502 { 2503 vsde.str Config = aConfigValues[i];2503 vsde.strVbox = aVboxValues[i]; 2504 2504 vsde.strExtraConfig = aExtraConfigValues[i]; 2505 2505 } … … 2560 2560 vsde.type = aType; 2561 2561 vsde.strRef = strRef; 2562 vsde.strO rig= aOrigValue;2563 vsde.str Config= aAutoValue;2562 vsde.strOvf = aOrigValue; 2563 vsde.strVbox = aAutoValue; 2564 2564 vsde.strExtraConfig = strExtraConfig; 2565 2565 … … 2744 2744 ComPtr<IBIOSSettings> pBiosSettings; 2745 2745 pBiosSettings = mBIOSSettings; 2746 Utf8Str str Config;2746 Utf8Str strVbox; 2747 2747 IDEControllerType_T ctlr; 2748 2748 rc = pBiosSettings->COMGETTER(IDEControllerType)(&ctlr); … … 2750 2750 switch(ctlr) 2751 2751 { 2752 case IDEControllerType_PIIX3: str Config= "PIIX3"; break;2753 case IDEControllerType_PIIX4: str Config= "PIIX4"; break;2754 case IDEControllerType_ICH6: str Config= "ICH6"; break;2752 case IDEControllerType_PIIX3: strVbox = "PIIX3"; break; 2753 case IDEControllerType_PIIX4: strVbox = "PIIX4"; break; 2754 case IDEControllerType_ICH6: strVbox = "ICH6"; break; 2755 2755 } 2756 2756 2757 if (str Config.length())2757 if (strVbox.length()) 2758 2758 { 2759 2759 strIdeControllerID = Utf8StrFmt("%RI32", uControllerId++); 2760 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE, strIdeControllerID, str Config, "");2760 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE, strIdeControllerID, strVbox, ""); 2761 2761 } 2762 2762 … … 2771 2771 { 2772 2772 strSataControllerID = Utf8StrFmt("%RI32", uControllerId++); 2773 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerSATA, strSataControllerID, str Config, "");2773 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerSATA, strSataControllerID, strVbox, ""); 2774 2774 } 2775 2775 #endif // VBOX_WITH_AHCI … … 2806 2806 if (FAILED(rc)) throw rc; 2807 2807 2808 Bstr bstrName; 2809 rc = pHardDisk->COMGETTER(Name)(bstrName.asOutParam()); 2810 2808 2811 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskImage, 2809 "", // hd.strDiskId,2812 Utf8Str(bstrName), // hd.strDiskId, 2810 2813 "", // di.strHref, 2811 2814 "", -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r17287 r17291 3102 3102 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case, 3103 3103 the array item with the same index in aOrigValue[] will contain the original value as contained 3104 in the OVF file (just for informational purposes), and the corresponding item in a ConfigValues[]3104 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[] 3105 3105 will contain a suggested value to be used for VirtualBox. Depending on the description type, 3106 3106 the aExtraConfigValues[] array item may also be used. … … 3109 3109 <li> 3110 3110 "OS": the guest operating system type. There must be exactly one such array item on import. The 3111 corresponding item in a ConfigValues[] contains the suggested guest operating system for VirtualBox.3111 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox. 3112 3112 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding 3113 item in aO rigValues[] will contain a numerical value that described the operating system in the OVF3113 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF 3114 3114 (see <link to="CIMOSType" />). 3115 3115 </li> … … 3117 3117 "Name": the name to give to the new virtual machine. There can be at most one such array item; 3118 3118 if none is present on import, then an automatic name will be created from the operating system 3119 type. The correponding item im aO rigValues[] will contain the suggested virtual machine name3120 from the OVF file, and a ConfigValues[] will contain a suggestion for a unique VirtualBox3119 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name 3120 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox 3121 3121 <link to="IMachine" /> name that does not exist yet. 3122 3122 </li> … … 3131 3131 <li> 3132 3132 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This 3133 has no value in aO rigValues[] or aConfigValues[].3133 has no value in aOvfValues[] or aVboxValues[]. 3134 3134 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk" 3135 3135 type can use to specify which hard disk controller a virtual disk should be connected to. … … 3137 3137 <li> 3138 3138 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This 3139 has no value in aO rigValues[] or aConfigValues[].3139 has no value in aOvfValues[] or aVboxValues[]. 3140 3140 The matching item in the aRefs[] array will be used as with IDE controllers (see above). 3141 3141 </li> 3142 3142 <li> 3143 3143 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item. 3144 The items in aO rigValues[] and aConfigValues[] will either be "LsiLogic" or "BusLogic".3144 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic". 3145 3145 The matching item in the aRefs[] array will be used as with IDE controllers (see above). 3146 3146 </li> 3147 3147 <li> 3148 3148 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an 3149 arbitrary number of these items, one for each virtual disk image that accompanies the OVF. The 3150 array item in aOrigValues[] will contain the file specification from the OVF file, whereas the 3151 item in aConfigValues[] will contain a qualified path specification to where the hard disk image 3152 should be copied; this target image will then be registered with VirtualBox. 3149 arbitrary number of these items, one for each virtual disk image that accompanies the OVF. 3150 3151 The array item in aOvfValues[] will contain the file specification from the OVF file, 3152 whereas the item in aVboxValues[] will contain a qualified path specification to where 3153 VirtualBox uses the hard disk image. This means that on import the image will be copied 3154 and converted from the "ovf" location to the "vbox" location; on export, this will be 3155 handled the other way round. On import, the target image will also be registered with VirtualBox. 3156 3153 3157 The matching item in the aExtraConfigValues[] array must contain a string of the following 3154 3158 format: "controller=<index>;channel=<c>" … … 3169 3173 </li> 3170 3174 <li> 3171 "NetworkAdapter": a network adapter. The array item in a ConfigValues[] will specify the hardware3175 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware 3172 3176 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string 3173 3177 of the "network=<nw>" format, where <nw> must be one of the networks as specified with the … … 3192 3196 </param> 3193 3197 3194 <param name="aO rigValues" type="wstring" dir="out" safearray="yes">3198 <param name="aOvfValues" type="wstring" dir="out" safearray="yes"> 3195 3199 <desc></desc> 3196 3200 </param> 3197 3201 3198 <param name="a ConfigValues" type="wstring" dir="out" safearray="yes">3202 <param name="aVboxValues" type="wstring" dir="out" safearray="yes"> 3199 3203 <desc></desc> 3200 3204 </param> … … 3218 3222 and SoundCard. 3219 3223 3220 For the configuration and "extra" configurationvalues, if you pass in the same arrays3221 as returned in the a ConfigValues and aExtraConfigValues arrays from getDescription(),3224 For the "vbox" and "extra configuration" values, if you pass in the same arrays 3225 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(), 3222 3226 the configuration remains unchanged. Please see the documentation for getDescription() 3223 3227 for valid configuration values for the individual array item types. If the … … 3229 3233 </param> 3230 3234 3231 <param name="a ConfigValues" type="wstring" dir="in" safearray="yes">3235 <param name="aVboxValues" type="wstring" dir="in" safearray="yes"> 3232 3236 <desc></desc> 3233 3237 </param> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r17287 r17291 110 110 VirtualSystemDescriptionType_T type; // type of this entry 111 111 Utf8Str strRef; // reference number (hard disk controllers only) 112 Utf8Str strO rig;// original OVF value (type-dependent)113 Utf8Str str Config;// configuration value (type-dependent)112 Utf8Str strOvf; // original OVF value (type-dependent) 113 Utf8Str strVbox; // configuration value (type-dependent) 114 114 Utf8Str strExtraConfig; // extra configuration key=value strings (type-dependent) 115 115 }; … … 154 154 STDMETHOD(GetDescription)(ComSafeArrayOut(VirtualSystemDescriptionType_T, aTypes), 155 155 ComSafeArrayOut(BSTR, aRefs), 156 ComSafeArrayOut(BSTR, aO rigValues),157 ComSafeArrayOut(BSTR, a ConfigValues),156 ComSafeArrayOut(BSTR, aOvfValues), 157 ComSafeArrayOut(BSTR, aVboxValues), 158 158 ComSafeArrayOut(BSTR, aExtraConfigValues)); 159 159 160 160 STDMETHOD(SetFinalValues)(ComSafeArrayIn(BOOL, aEnabled), 161 ComSafeArrayIn(IN_BSTR, a ConfigValues),161 ComSafeArrayIn(IN_BSTR, aVboxValues), 162 162 ComSafeArrayIn(IN_BSTR, aExtraConfigValues)); 163 163
Note:
See TracChangeset
for help on using the changeset viewer.