VirtualBox

Changeset 39661 in vbox


Ignore:
Timestamp:
Dec 20, 2011 1:35:17 PM (13 years ago)
Author:
vboxsync
Message:

Main: Adding an 'edition' property to the extension packs.

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

Legend:

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

    r39650 r39661  
    1598715987  <interface
    1598815988    name="IExtPackBase" extends="$unknown"
    15989     uuid="5ffb0b64-0ad6-467d-af62-1157e7dc3c99"
     15989    uuid="f79b75d8-2890-4f34-ffff-ffffa144e82c"
    1599015990    wsmap="suppress"
    1599115991    >
     
    1600216002    <attribute name="version" type="wstring" readonly="yes">
    1600316003      <desc>
    16004         The extension pack version string.  This is on the same form as
    16005         other VirtualBox version strings, i.e.: "1.2.3", "1.2.3_BETA1",
    16006         "1.2.3-OSE", "1.2.3r45678", "1.2.3r45678-OSE", "1.2.3_BETA1-r45678"
    16007         or "1.2.3_BETA1-r45678-OSE"
     16004        The extension pack version string.  This is restricted to the dotted
     16005        version number and a build indicator.  No tree revision or tag will be
     16006        included in the string as those things are available as separate
     16007        properties.  Examples: "1.2.3", "1.2.3_BETA1" and "1.2.3_RC2".
    1600816008      </desc>
    1600916009    </attribute>
    1601016010    <attribute name="revision" type="unsigned long" readonly="yes">
    1601116011      <desc>The extension pack internal revision number.</desc>
     16012    </attribute>
     16013    <attribute name="edition" type="wstring" readonly="yes">
     16014      <desc>
     16015        Edition indicator.  This is usually empty.
     16016
     16017        Can for instance be used to help distinguishing between two editions
     16018        of the same extension pack where only the license, service contract or
     16019        something differs.
     16020      </desc>
    1601216021    </attribute>
    1601316022    <attribute name="VRDEModule" type="wstring" readonly="yes">
  • trunk/src/VBox/Main/include/ExtPackManagerImpl.h

    r37843 r39661  
    5555    STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
    5656    STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
     57    STDMETHOD(COMGETTER(Edition))(BSTR *a_pbstrEdition);
    5758    STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
    5859    STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
     
    118119    STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
    119120    STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
     121    STDMETHOD(COMGETTER(Edition))(BSTR *a_pbstrEdition);
    120122    STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
    121123    STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
  • trunk/src/VBox/Main/include/ExtPackUtil.h

    r39180 r39661  
    113113
    114114void                VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
    115 RTCString   *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
    116 RTCString   *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
    117 RTCString   *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
     115RTCString          *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
     116RTCString          *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
     117RTCString          *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
    118118void                VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
    119119bool                VBoxExtPackIsValidName(const char *pszName);
    120120bool                VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax = RTSTR_MAX);
    121 RTCString   *VBoxExtPackMangleName(const char *pszName);
    122 RTCString   *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cbMax);
     121RTCString          *VBoxExtPackMangleName(const char *pszName);
     122RTCString          *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cbMax);
    123123int                 VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName);
    124124bool                VBoxExtPackIsValidVersionString(const char *pszVersion);
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r39180 r39661  
    390390    if (SUCCEEDED(hrc))
    391391    {
    392         /* HACK ALERT: This is for easing backporting to 4.1. The edition stuff
    393            will be changed into a separate */
    394         if (m->Desc.strEdition.isEmpty())
    395         {
    396             Bstr str(m->Desc.strVersion);
    397             str.cloneTo(a_pbstrVersion);
    398         }
    399         else
    400         {
    401             RTCString strHack(m->Desc.strVersion);
    402             strHack.append('-');
    403             strHack.append(m->Desc.strEdition);
    404 
    405             Bstr str(strHack);
    406             str.cloneTo(a_pbstrVersion);
    407         }
     392        Bstr str(m->Desc.strVersion);
     393        str.cloneTo(a_pbstrVersion);
     394    }
     395    return hrc;
     396}
     397
     398STDMETHODIMP ExtPackFile::COMGETTER(Edition)(BSTR *a_pbstrEdition)
     399{
     400    CheckComArgOutPointerValid(a_pbstrEdition);
     401
     402    AutoCaller autoCaller(this);
     403    HRESULT hrc = autoCaller.rc();
     404    if (SUCCEEDED(hrc))
     405    {
     406        Bstr str(m->Desc.strEdition);
     407        str.cloneTo(a_pbstrEdition);
    408408    }
    409409    return hrc;
     
    16241624    if (SUCCEEDED(hrc))
    16251625    {
    1626         /* HACK ALERT: This is for easing backporting to 4.1. The edition stuff
    1627            will be changed into a separate */
    1628         if (m->Desc.strEdition.isEmpty())
    1629         {
    1630             Bstr str(m->Desc.strVersion);
    1631             str.cloneTo(a_pbstrVersion);
    1632         }
    1633         else
    1634         {
    1635             RTCString strHack(m->Desc.strVersion);
    1636             strHack.append('-');
    1637             strHack.append(m->Desc.strEdition);
    1638 
    1639             Bstr str(strHack);
    1640             str.cloneTo(a_pbstrVersion);
    1641         }
     1626        Bstr str(m->Desc.strVersion);
     1627        str.cloneTo(a_pbstrVersion);
    16421628    }
    16431629    return hrc;
     
    16521638    if (SUCCEEDED(hrc))
    16531639        *a_puRevision = m->Desc.uRevision;
     1640    return hrc;
     1641}
     1642
     1643STDMETHODIMP ExtPack::COMGETTER(Edition)(BSTR *a_pbstrEdition)
     1644{
     1645    CheckComArgOutPointerValid(a_pbstrEdition);
     1646
     1647    AutoCaller autoCaller(this);
     1648    HRESULT hrc = autoCaller.rc();
     1649    if (SUCCEEDED(hrc))
     1650    {
     1651        Bstr str(m->Desc.strEdition);
     1652        str.cloneTo(a_pbstrEdition);
     1653    }
    16541654    return hrc;
    16551655}
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