VirtualBox

Changeset 48101 in vbox


Ignore:
Timestamp:
Aug 27, 2013 6:23:47 PM (11 years ago)
Author:
vboxsync
Message:

BUGZ#6780: API change: introduced GetShortName() method for HostNetworkInterface class, updated host interfaces checker on GUI start in order to take into account interface short names.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r47831 r48101  
    13581358    {
    13591359        availableInterfaceNames << iface.GetName();
     1360        availableInterfaceNames << iface.GetShortName();
    13601361    }
    13611362
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r47991 r48101  
    81678167    </attribute>
    81688168
     8169    <attribute name="shortName" type="wstring" readonly="yes">
     8170      <desc>Returns the host network interface short name.</desc>
     8171    </attribute>
     8172
    81698173    <attribute name="id" type="uuid" mod="string" readonly="yes">
    81708174      <desc>Returns the interface UUID.</desc>
  • trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h

    r46820 r48101  
    6060    // IHostNetworkInterface properties
    6161    STDMETHOD(COMGETTER(Name))(BSTR *aInterfaceName);
     62    STDMETHOD(COMGETTER(ShortName))(BSTR *aShortName);
    6263    STDMETHOD(COMGETTER(Id))(BSTR *aGuid);
    6364    STDMETHOD(COMGETTER(DHCPEnabled))(BOOL *aDHCPEnabled);
  • trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp

    r46820 r48101  
    8080    unconst(mInterfaceName) = aInterfaceName;
    8181    unconst(mNetworkName) = composeNetworkName(aShortName);
     82    unconst(mShortName) = aShortName;
    8283    unconst(mGuid) = aGuid;
    8384    mIfType = ifType;
     
    251252
    252253    mInterfaceName.cloneTo(aInterfaceName);
     254
     255    return S_OK;
     256}
     257
     258/**
     259 * Returns the short name of the host network interface.
     260 *
     261 * @returns COM status code
     262 * @param   aShortName address of result pointer
     263 */
     264STDMETHODIMP HostNetworkInterface::COMGETTER(ShortName)(BSTR *aShortName)
     265{
     266    CheckComArgOutPointerValid(aShortName);
     267
     268    AutoCaller autoCaller(this);
     269    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     270
     271    mShortName.cloneTo(aShortName);
    253272
    254273    return S_OK;
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