VirtualBox

Changeset 93529 in vbox for trunk/src


Ignore:
Timestamp:
Feb 1, 2022 12:23:58 PM (3 years ago)
Author:
vboxsync
Message:

Main/Unattended: bugref:9781. Adding an attribute to Unattended interface for detected image names.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r93524 r93529  
    50065006    </attribute>
    50075007
     5008    <attribute name="detectedImageNames" type="wstring" readonly="yes" safearray="yes">
     5009      <desc>
     5010        A list of names of the images detected from install.wim file of a Windows ISO.
     5011      </desc>
     5012    </attribute>
     5013
    50085014    <method name="detectIsoOS">
    50095015      <desc>
  • trunk/src/VBox/Main/include/UnattendedImpl.h

    r93525 r93529  
    222222    HRESULT getDetectedOSFlavor(com::Utf8Str &aDetectedOSFlavor);
    223223    HRESULT getDetectedOSHints(com::Utf8Str &aDetectedOSHints);
     224    HRESULT getDetectedImageNames(std::vector<com::Utf8Str> &aDetectedImageNames);
    224225    //internal functions
    225226
  • trunk/src/VBox/Main/src-server/UnattendedImpl.cpp

    r93527 r93529  
    30643064    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    30653065    AssertReturn(mpInstaller == NULL, setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("Cannot change after prepare() has been called")));
     3066    AssertReturn(index >= mDetectedImages.size(), setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("Image index is larger than the number of detected images")));
    30663067    midxImage = index;
    30673068    return S_OK;
     
    32103211}
    32113212
     3213HRESULT Unattended::getDetectedImageNames(std::vector<com::Utf8Str> &aDetectedImageNames)
     3214{
     3215    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     3216    aDetectedImageNames.clear();
     3217    for (size_t i = 0; i < mDetectedImages.size(); ++i)
     3218        aDetectedImageNames.push_back(mDetectedImages[i].getNameAndVersion());
     3219    return S_OK;
     3220}
     3221
    32123222/*
    32133223 * Getters that the installer and script classes can use.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette