VirtualBox

Changeset 56398 in vbox for trunk


Ignore:
Timestamp:
Jun 12, 2015 8:44:16 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
100998
Message:

IVirtualBox: Added APIRevision attribute for the ValidationKit, details to be discussed.

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

Legend:

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

    r56397 r56398  
    18511851  <interface
    18521852    name="IVirtualBox" extends="$unknown"
    1853     uuid="025c4331-4096-1640-b261-649ffc36adee"
     1853    uuid="0169423f-46b4-cde9-91af-1e9d5b6cd945"
    18541854    wsmap="managed"
    18551855    reservedMethods="8" reservedAttributes="6"
     
    19161916        guarantee that this version is identical to the first two integer
    19171917        numbers of the package version.
     1918      </desc>
     1919    </attribute>
     1920
     1921    <attribute name="APIRevision" type="long long" readonly="yes">
     1922      <desc>
     1923        To be defined exactly, but we need something that the Validation Kit
     1924        can use to figure which methods and attributes can safely be used on a
     1925        continuously changing trunk (and occational branch).
    19181926      </desc>
    19191927    </attribute>
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r55255 r56398  
    255255    HRESULT getPackageType(com::Utf8Str &aPackageType);
    256256    HRESULT getAPIVersion(com::Utf8Str &aAPIVersion);
     257    HRESULT getAPIRevision(LONG64 *aAPIRevision);
    257258    HRESULT getHomeFolder(com::Utf8Str &aHomeFolder);
    258259    HRESULT getSettingsFilePath(com::Utf8Str &aSettingsFilePath);
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r55988 r56398  
    874874{
    875875    aAPIVersion = sAPIVersion;
     876    return S_OK;
     877}
     878
     879HRESULT VirtualBox::getAPIRevision(LONG64 *aAPIRevision)
     880{
     881    AssertCompile(VBOX_VERSION_MAJOR < 128 && VBOX_VERSION_MAJOR > 0);
     882    AssertCompile((uint64_t)VBOX_VERSION_MINOR < 256);
     883    uint64_t uRevision = ((uint64_t)VBOX_VERSION_MAJOR << 56)
     884                       | ((uint64_t)VBOX_VERSION_MINOR << 48);
     885
     886    if (VBOX_VERSION_BUILD >= 51 && (VBOX_VERSION_BUILD & 1)) /* pre-release trunk */
     887        uRevision |= (uint64_t)VBOX_VERSION_BUILD << 40;
     888
     889    /** @todo This needs to be the same in OSE and non-OSE, preferrably
     890     *        only changing when actual API changes happens. */
     891    uRevision |= 0;
     892
     893    *aAPIRevision = uRevision;
     894
    876895    return S_OK;
    877896}
Note: See TracChangeset for help on using the changeset viewer.

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