- Timestamp:
- Feb 1, 2022 4:46:52 PM (3 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r93531 r93534 4674 4674 <interface 4675 4675 name="IUnattended" extends="$unknown" 4676 uuid="6f89464f-7193-426c-a41f-522e 8e537fa0"4676 uuid="6f89464f-7193-426c-a41f-522e4e537fa0" 4677 4677 wsmap="managed" 4678 4678 reservedMethods="4" reservedAttributes="16" … … 4896 4896 <attribute name="imageIndex" type="unsigned long"> 4897 4897 <desc> 4898 The image index on installation CD/DVD used to install. 4898 The image index on installation CD/DVD used to install. This index should be 4899 one of the indices of <link to="IUnattended::detectedImageIndices"/>. 4899 4900 4900 4901 Used only with Windows installation CD/DVD: … … 5005 5006 </desc> 5006 5007 </attribute> 5007 5008 5008 <attribute name="detectedImageNames" type="wstring" readonly="yes" safearray="yes"> 5009 5009 <desc> 5010 A list of names of the images detected from install.wim file of a Windows ISO. 5010 A list of names of the images detected from install.wim file of a Windows ISO. This 5011 array is parallel to <link to="IUnattended::detectedImageIndices"/>. 5012 </desc> 5013 </attribute> 5014 <attribute name="detectedImageIndices" type="unsigned long" readonly="yes" safearray="yes"> 5015 <desc> 5016 A list of names of the images detected from install.wim file of a Windows ISO. This array 5017 is parallel to <link to="IUnattended::detectedImageNames"/>. <link to="IUnattended::imageIndex"/> 5018 should be one of these indices. 5011 5019 </desc> 5012 5020 </attribute> -
trunk/src/VBox/Main/include/UnattendedImpl.h
r93533 r93534 224 224 HRESULT getDetectedOSHints(com::Utf8Str &aDetectedOSHints); 225 225 HRESULT getDetectedImageNames(std::vector<com::Utf8Str> &aDetectedImageNames); 226 HRESULT getDetectedImageIndices(std::vector<uint32_t> &aDetectedImageIndices); 226 227 //internal functions 227 228 -
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r93533 r93534 517 517 if (newImage.mName.isEmpty()) 518 518 continue; 519 519 520 newImage.mImageIndex = pu32; 520 521 const ElementNode *pVersionElement = pChild->findChildElement("VERSION"); … … 3077 3078 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3078 3079 AssertReturn(mpInstaller == NULL, setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("Cannot change after prepare() has been called"))); 3079 AssertReturn(index < mDetectedImages.size(), setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("Image index is larger than the number of detected images"))); 3080 midxImage = index; 3081 return S_OK; 3080 /* Set midxImage only if mDetectedImages includes an image with an index equal to @param index. */ 3081 for (size_t i = 0; i < mDetectedImages.size(); ++i) 3082 { 3083 if (mDetectedImages[i].mImageIndex == index) 3084 { 3085 midxImage = index; 3086 return S_OK; 3087 } 3088 } 3089 return VERR_INVALID_PARAMETER; 3082 3090 } 3083 3091 … … 3233 3241 } 3234 3242 3243 HRESULT Unattended::getDetectedImageIndices(std::vector<uint32_t> &aDetectedImageIndices) 3244 { 3245 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 3246 aDetectedImageIndices.clear(); 3247 for (size_t i = 0; i < mDetectedImages.size(); ++i) 3248 aDetectedImageIndices.push_back(mDetectedImages[i].mImageIndex); 3249 return S_OK; 3250 } 3251 3235 3252 /* 3236 3253 * Getters that the installer and script classes can use. -
trunk/src/VBox/Main/testcase/tstUnattendedScript.cpp
r93532 r93534 445 445 } 446 446 447 HRESULT Unattended::getDetectedImageIndices(std::vector<uint32_t> &aDetectedImageIndices) 448 { 449 RT_NOREF(aDetectedImageIndices); 450 return E_NOTIMPL; 451 } 452 447 453 /* 448 454 * Getters that the installer and script classes can use.
Note:
See TracChangeset
for help on using the changeset viewer.