儲存庫 vbox 的更動 16668
- 時間撮記:
- 2009-2-11 下午02:12:11 (16 年 以前)
- 位置:
- trunk/src/VBox
- 檔案:
-
- 修改 5 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp
r16662 r16668 428 428 CHECK_ERROR_BREAK(aVirtualSystemDescriptions[i], 429 429 SetFinalValues(ComSafeArrayAsInParam(aEnabled), 430 ComSafeArrayAsInParam(aFinalValues))); 430 ComSafeArrayAsInParam(aFinalValues), 431 ComSafeArrayAsInParam(aExtraConfigValues))); 431 432 432 433 } // for (unsigned i = 0; i < cVirtualSystemDescriptions; ++i) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportAppliance.cpp
r16662 r16668 128 128 129 129 virtual void restoreDefaults() {} 130 virtual void putBack (QVector< QString>& aFinalValues, QVector<BOOL>& aFinalStates)130 virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues) 131 131 { 132 132 for (int i = 0; i < childCount(); ++i) 133 child (i)->putBack (aFinal Values, aFinalStates);133 child (i)->putBack (aFinalStates, aFinalValues, aFinalExtraValues); 134 134 } 135 135 … … 162 162 } 163 163 164 virtual void putBack (QVector< QString>& aFinalValues, QVector<BOOL>& aFinalStates)164 virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues) 165 165 { 166 166 /* Resize the vectors */ 167 167 unsigned long count = mDesc.GetCount(); 168 aFinalStates.resize (count); 168 169 aFinalValues.resize (count); 169 aFinal States.resize (count);170 aFinalExtraValues.resize (count); 170 171 /* Recursively fill the vectors */ 171 ModelItem::putBack (aFinal Values, aFinalStates);172 ModelItem::putBack (aFinalStates, aFinalValues, aFinalExtraValues); 172 173 /* Set all final values at once */ 173 mDesc.SetFinalValues (aFinalStates, aFinalValues );174 mDesc.SetFinalValues (aFinalStates, aFinalValues, aFinalExtraValues); 174 175 } 175 176 … … 202 203 {} 203 204 204 virtual void putBack (QVector<QString>& aFinalValues, QVector<BOOL>& aFinalStates) 205 { 205 virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues) 206 { 207 aFinalStates[mNumber] = mCheckState == Qt::Checked; 206 208 aFinalValues[mNumber] = mConfigValue; 207 aFinal States[mNumber] = mCheckState == Qt::Checked;208 ModelItem::putBack (aFinal Values, aFinalStates);209 aFinalExtraValues[mNumber] = mExtraConfigValue; 210 ModelItem::putBack (aFinalStates, aFinalValues, aFinalExtraValues); 209 211 } 210 212 … … 927 929 void VirtualSystemModel::putBack() 928 930 { 929 QVector<QString> v1; 930 QVector<BOOL> v2; 931 mRootItem->putBack (v1, v2); 931 QVector<BOOL> v1; 932 QVector<QString> v2; 933 QVector<QString> v3; 934 mRootItem->putBack (v1, v2, v3); 932 935 } 933 936 -
trunk/src/VBox/Main/ApplianceImpl.cpp
r16662 r16668 1331 1331 pNewDesc->addEntry(VirtualSystemDescriptionType_USBController, "", "", ""); 1332 1332 1333 NetworksMap::const_iterator itN; 1334 for (itN = m->mapNetworks.begin(); 1335 itN != m->mapNetworks.end(); 1336 ++itN) 1337 { 1338 const Network &nw = itN->second; 1339 pNewDesc->addEntry(VirtualSystemDescriptionType_LogicalNetwork, 1340 "", 1341 nw.strNetworkName, 1342 nw.strNetworkName); 1343 } 1344 1333 1345 /* Network Controller */ 1334 1346 // @todo: there is no hardware specification in the OVF file; supposedly the … … 1355 1367 ++nwIt, ++a) 1356 1368 { 1357 Utf8Str nwController = *nwIt; // @todo: not used yet 1358 pNewDesc->addEntry(VirtualSystemDescriptionType_NetworkAdapter, "", "", toString<ULONG>(nwAdapterVBox)); 1369 Utf8Str strNetwork = *nwIt; // logical network to connect to 1370 pNewDesc->addEntry(VirtualSystemDescriptionType_NetworkAdapter, 1371 "", // ref 1372 strNetwork, // orig 1373 toString<ULONG>(nwAdapterVBox), // conf 1374 Utf8StrFmt("network=%s", strNetwork.c_str())); // extra conf 1359 1375 } 1360 1376 } … … 2252 2268 2253 2269 STDMETHODIMP VirtualSystemDescription::SetFinalValues(ComSafeArrayIn(BOOL, aEnabled), 2254 ComSafeArrayIn(IN_BSTR, aFinalValues)) 2255 { 2256 CheckComArgSafeArrayNotNull(aFinalValues); 2270 ComSafeArrayIn(IN_BSTR, argConfigValues), 2271 ComSafeArrayIn(IN_BSTR, argExtraConfigValues)) 2272 { 2273 CheckComArgSafeArrayNotNull(argConfigValues); 2274 CheckComArgSafeArrayNotNull(argExtraConfigValues); 2257 2275 2258 2276 AutoCaller autoCaller(this); … … 2261 2279 AutoWriteLock alock(this); 2262 2280 2263 com::SafeArray <IN_BSTR> values(ComSafeArrayInArg(aFinalValues)); 2264 if (values.size() != m->descriptions.size()) 2281 com::SafeArray<IN_BSTR> aConfigValues(ComSafeArrayInArg(argConfigValues)); 2282 com::SafeArray<IN_BSTR> aExtraConfigValues(ComSafeArrayInArg(argExtraConfigValues)); 2283 2284 if ( (aConfigValues.size() != m->descriptions.size()) 2285 || (aExtraConfigValues.size() != m->descriptions.size()) 2286 ) 2265 2287 return E_INVALIDARG; 2266 2288 … … 2274 2296 2275 2297 if (aEnabled[i]) 2276 vsde.strConfig = values[i]; 2298 { 2299 vsde.strConfig = aConfigValues[i]; 2300 vsde.strExtraConfig = aExtraConfigValues[i]; 2301 } 2277 2302 else 2278 2303 vsde.type = VirtualSystemDescriptionType_Ignore; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r16662 r16668 3013 3013 <const name="CDROM" value="10" /> 3014 3014 <const name="Floppy" value="11" /> 3015 <const name="NetworkAdapter" value="12" /> 3016 <const name="USBController" value="13" /> 3017 <const name="SoundCard" value="14" /> 3015 <const name="LogicalNetwork" value="12" /> 3016 <const name="NetworkAdapter" value="13" /> 3017 <const name="USBController" value="14" /> 3018 <const name="SoundCard" value="15" /> 3018 3019 3019 3020 </enum> … … 3087 3088 in aConfigValues[] will contain a qualified path specification where the hard disk image should 3088 3089 be copied to; this target image will then be registered with VirtualBox. 3089 The matching item in the aRefs[] array must contain a integer specifying the hard disk controller 3090 to connect the image to. This number must be the same as the integer used by one of the hard disk 3091 controller items (SCSI, SATA or IDE; see above). 3090 The matching item in the aExtraConfigValues[] array must contain a string of the "controller=<ctrl>" 3091 format, where <ctrl> must be an integer specifying the hard disk controller to connect the image to. 3092 That number must be the index of an array item with one of the hard disk controller types 3093 (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE). 3092 3094 </li> 3093 3095 <li> 3094 "NetworkAdapter": a network adapter. (todo document) 3096 "LogicalNetwork": a logical network to which virtual machines can connect. This is taken from 3097 the Network section in the OVF that is shared between several virtual systems. OVF has no 3098 formal description of how the network shall be set up (e.g. whether to use NAT or host interface 3099 networking), but OVFs typically name the logical networks "nat" or "bridged" to suggest such 3100 a configuration. 3101 </li> 3102 <li> 3103 "NetworkAdapter": a network adapter. The array item in aConfigValues[] will specify the hardware 3104 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string 3105 of the "network=<nw>" format, where <nw> must be one of the networks as specified with the 3106 LogicalNetwork type. 3095 3107 </li> 3096 3108 <li> … … 3138 3150 and SoundCard. 3139 3151 3140 For the configuration values, if you pass in the same array as returned3141 in the aConfigValues array from getDescription(), the configuration remains unchanged.3142 Please see the documentation for getDescription() for valid configuration values3143 for the individual array item types. If the corresponding item in the aEnabled array3144 is false, the configuration value isgnored.3152 For the configuration and "extra" configuration values, if you pass in the same arrays 3153 as returned in the aConfigValues and aExtraConfigValues arrays from getDescription(), 3154 the configuration remains unchanged. Please see the documentation for getDescription() 3155 for valid configuration values for the individual array item types. If the 3156 corresponding item in the aEnabled array is false, the configuration value is ignored. 3145 3157 </desc> 3146 3158 … … 3149 3161 </param> 3150 3162 3151 <param name="a FinalValues" type="wstring" dir="in" safearray="yes">3163 <param name="aConfigValues" type="wstring" dir="in" safearray="yes"> 3152 3164 <desc></desc> 3153 3165 </param> 3154 3166 3167 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes"> 3168 <desc></desc> 3169 </param> 3155 3170 </method> 3156 3171 -
trunk/src/VBox/Main/include/ApplianceImpl.h
r16662 r16668 155 155 156 156 STDMETHOD(SetFinalValues)(ComSafeArrayIn(BOOL, aEnabled), 157 ComSafeArrayIn(IN_BSTR, aFinalValues)); 157 ComSafeArrayIn(IN_BSTR, aConfigValues), 158 ComSafeArrayIn(IN_BSTR, aExtraConfigValues)); 158 159 159 160 STDMETHOD(GetWarnings)(ComSafeArrayOut(BSTR, aWarnings));
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器