Changeset 18024 in vbox
- Timestamp:
- Mar 17, 2009 2:00:08 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r18015 r18024 3324 3324 * @return 3325 3325 */ 3326 STDMETHODIMP VirtualSystemDescription::GetDescriptionByType(VirtualSystemDescriptionType_T aType, 3327 ComSafeArrayOut(VirtualSystemDescriptionType_T, aTypes), 3328 ComSafeArrayOut(BSTR, aRefs), 3329 ComSafeArrayOut(BSTR, aOrigValues), 3330 ComSafeArrayOut(BSTR, aVboxValues), 3331 ComSafeArrayOut(BSTR, aExtraConfigValues)) 3332 { 3333 if (ComSafeArrayOutIsNull(aTypes) || 3334 ComSafeArrayOutIsNull(aRefs) || 3335 ComSafeArrayOutIsNull(aOrigValues) || 3336 ComSafeArrayOutIsNull(aVboxValues) || 3337 ComSafeArrayOutIsNull(aExtraConfigValues)) 3338 return E_POINTER; 3339 3340 AutoCaller autoCaller(this); 3341 CheckComRCReturnRC(autoCaller.rc()); 3342 3343 AutoReadLock alock(this); 3344 3345 std::list<VirtualSystemDescriptionEntry*> vsd = findByType (aType); 3346 ULONG c = (ULONG)vsd.size(); 3347 com::SafeArray<VirtualSystemDescriptionType_T> sfaTypes(c); 3348 com::SafeArray<BSTR> sfaRefs(c); 3349 com::SafeArray<BSTR> sfaOrigValues(c); 3350 com::SafeArray<BSTR> sfaVboxValues(c); 3351 com::SafeArray<BSTR> sfaExtraConfigValues(c); 3352 3353 list<VirtualSystemDescriptionEntry*>::const_iterator it; 3354 size_t i = 0; 3355 for (it = vsd.begin(); 3356 it != vsd.end(); 3357 ++it, ++i) 3358 { 3359 const VirtualSystemDescriptionEntry *vsde = (*it); 3360 3361 sfaTypes[i] = vsde->type; 3362 3363 Bstr bstr = vsde->strRef; 3364 bstr.cloneTo(&sfaRefs[i]); 3365 3366 bstr = vsde->strOvf; 3367 bstr.cloneTo(&sfaOrigValues[i]); 3368 3369 bstr = vsde->strVbox; 3370 bstr.cloneTo(&sfaVboxValues[i]); 3371 3372 bstr = vsde->strExtraConfig; 3373 bstr.cloneTo(&sfaExtraConfigValues[i]); 3374 } 3375 3376 sfaTypes.detachTo(ComSafeArrayOutArg(aTypes)); 3377 sfaRefs.detachTo(ComSafeArrayOutArg(aRefs)); 3378 sfaOrigValues.detachTo(ComSafeArrayOutArg(aOrigValues)); 3379 sfaVboxValues.detachTo(ComSafeArrayOutArg(aVboxValues)); 3380 sfaExtraConfigValues.detachTo(ComSafeArrayOutArg(aExtraConfigValues)); 3381 3382 return S_OK; 3383 } 3384 3385 /** 3386 * Public method implementation. 3387 * @return 3388 */ 3326 3389 STDMETHODIMP VirtualSystemDescription::SetFinalValues(ComSafeArrayIn(BOOL, aEnabled), 3327 3390 ComSafeArrayIn(IN_BSTR, argVboxValues), -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r18023 r18024 3351 3351 </method> 3352 3352 3353 <method name="getDescriptionByType"> 3354 <desc>This is the same as <link to="getDescription" /> except that you can specify which types 3355 should be returned.</desc> 3356 3357 <param name="aType" type="VirtualSystemDescriptionType" dir="in"> 3358 <desc></desc> 3359 </param> 3360 3361 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes"> 3362 <desc></desc> 3363 </param> 3364 3365 <param name="aRefs" type="wstring" dir="out" safearray="yes"> 3366 <desc></desc> 3367 </param> 3368 3369 <param name="aOvfValues" type="wstring" dir="out" safearray="yes"> 3370 <desc></desc> 3371 </param> 3372 3373 <param name="aVboxValues" type="wstring" dir="out" safearray="yes"> 3374 <desc></desc> 3375 </param> 3376 3377 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes"> 3378 <desc></desc> 3379 </param> 3380 3381 </method> 3382 3353 3383 <method name="setFinalValues"> 3354 3384 <desc> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r17827 r18024 162 162 ComSafeArrayOut(BSTR, aExtraConfigValues)); 163 163 164 STDMETHOD(GetDescriptionByType)(VirtualSystemDescriptionType_T aType, 165 ComSafeArrayOut(VirtualSystemDescriptionType_T, aTypes), 166 ComSafeArrayOut(BSTR, aRefs), 167 ComSafeArrayOut(BSTR, aOvfValues), 168 ComSafeArrayOut(BSTR, aVboxValues), 169 ComSafeArrayOut(BSTR, aExtraConfigValues)); 170 164 171 STDMETHOD(SetFinalValues)(ComSafeArrayIn(BOOL, aEnabled), 165 172 ComSafeArrayIn(IN_BSTR, aVboxValues),
Note:
See TracChangeset
for help on using the changeset viewer.