VirtualBox

Changeset 44503 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Feb 1, 2013 6:28:53 AM (12 years ago)
Author:
vboxsync
Message:

Main: change API. Interface IMediumFormat was touched. Attribute capabilities got the type MediumFormatCapabilities and option safeArray. PR5434.

Location:
trunk/src/VBox/Frontends
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r44498 r44503  
    271271                    COMGETTER(Id)(description.asOutParam()));
    272272
    273         ULONG caps;
     273        ULONG caps = 0;
     274        com::SafeArray <MediumFormatCapabilities_T> mediumFormatCap;
    274275        CHECK_ERROR(mediumFormats[i],
    275                     COMGETTER(Capabilities)(&caps));
     276                    COMGETTER(Capabilities)(ComSafeArrayAsOutParam(mediumFormatCap)));
     277        for (ULONG j = 0; j < mediumFormatCap.size(); j++)
     278            caps |= mediumFormatCap[j];
     279
    276280
    277281        RTPrintf("Backend %u: id='%ls' description='%ls' capabilities=%#06x extensions='",
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r44453 r44503  
    14591459            .arg(aMedium.location());
    14601460
     1461    qulonglong caps = 0;
     1462    QVector<KMediumFormatCapabilities> capabilities;
     1463    capabilities = aMedium.medium().GetMediumFormat().GetCapabilities();
     1464    for (int i = 0; i < capabilities.size(); i++)
     1465        caps |= capabilities[i];
     1466
    14611467    if (aMedium.type() == UIMediumType_HardDisk &&
    1462         aMedium.medium().GetMediumFormat().GetCapabilities() & MediumFormatCapabilities_File)
     1468        caps & MediumFormatCapabilities_File)
    14631469    {
    14641470        if (aMedium.state() == KMediumState_Inaccessible)
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r43424 r44503  
    11421142             * will give a corresponding hint. Therefore, once the code is
    11431143             * changed below, the hint should be re-checked for validity. */
     1144
     1145            qulonglong caps = 0;
     1146            QVector<KMediumFormatCapabilities> capabilities;
     1147            capabilities = item->medium().medium().GetMediumFormat().GetCapabilities();
     1148            for (int i = 0; i < capabilities.size(); i++)
     1149                caps |= capabilities[i];
     1150
    11441151            if (item->state() != KMediumState_Inaccessible &&
    1145                 item->medium().medium().GetMediumFormat().GetCapabilities() & MediumFormatCapabilities_File)
     1152                caps & MediumFormatCapabilities_File)
    11461153            {
    11471154                int rc = msgCenter().
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp

    r41587 r44503  
    3939{
    4040    /* Check that medium format supports creation: */
    41     ULONG uFormatCapabilities = medFormat.GetCapabilities();
     41    //ULONG uFormatCapabilities = medFormat.GetCapabilities();
     42    ULONG uFormatCapabilities = 0;
     43    QVector<KMediumFormatCapabilities> capabilities;
     44    capabilities = medFormat.GetCapabilities();
     45    for (ULONG i = 0; i < capabilities.size(); i++)
     46        uFormatCapabilities |= capabilities[i];
     47
    4248    if (!(uFormatCapabilities & MediumFormatCapabilities_CreateFixed ||
    4349          uFormatCapabilities & MediumFormatCapabilities_CreateDynamic))
     
    149155    /* Show variant page only if there is something to show: */
    150156    CMediumFormat medFormat = mediumFormat();
    151     ULONG uCapabilities = medFormat.GetCapabilities();
     157//    ULONG uCapabilities = medFormat.GetCapabilities();
     158    ULONG uCapabilities = 0;
     159    QVector<KMediumFormatCapabilities> capabilities;
     160    capabilities = medFormat.GetCapabilities();
     161    for (ULONG i = 0; i < capabilities.size(); i++)
     162        uCapabilities |= capabilities[i];
     163
    152164    int cTest = 0;
    153165    if (uCapabilities & KMediumFormatCapabilities_CreateDynamic)
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp

    r41587 r44503  
    145145    /* Setup visibility: */
    146146    CMediumFormat mediumFormat = field("mediumFormat").value<CMediumFormat>();
    147     ULONG uCapabilities = mediumFormat.GetCapabilities();
     147    ULONG uCapabilities = 0;
     148    QVector<KMediumFormatCapabilities> capabilities;
     149    capabilities = mediumFormat.GetCapabilities();
     150    for (ULONG i = 0; i < capabilities.size(); i++)
     151        uCapabilities |= capabilities[i];
     152
    148153    bool fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
    149154    bool fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp

    r41615 r44503  
    187187
    188188    /* Enable/disable widgets: */
    189     ULONG uCapabilities = mf.GetCapabilities();
     189    ULONG uCapabilities = 0;
     190    QVector<KMediumFormatCapabilities> capabilities;
     191    capabilities = mf.GetCapabilities();
     192    for (ULONG i = 0; i < capabilities.size(); i++)
     193        uCapabilities |= capabilities[i];
     194
    190195    bool fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
    191196    bool fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp

    r41587 r44503  
    3939{
    4040    /* Check that medium format supports creation: */
    41     ULONG uFormatCapabilities = medFormat.GetCapabilities();
     41    ULONG uFormatCapabilities = 0;
     42    QVector<KMediumFormatCapabilities> capabilities;
     43    capabilities = medFormat.GetCapabilities();
     44    for (ULONG i = 0; i < capabilities.size(); i++)
     45        uFormatCapabilities |= capabilities[i];
     46
    4247    if (!(uFormatCapabilities & MediumFormatCapabilities_CreateFixed ||
    4348          uFormatCapabilities & MediumFormatCapabilities_CreateDynamic))
     
    149154    /* Show variant page only if there is something to show: */
    150155    CMediumFormat mf = mediumFormat();
    151     ULONG uCapabilities = mf.GetCapabilities();
     156    ULONG uCapabilities = 0;
     157    QVector<KMediumFormatCapabilities> capabilities;
     158    capabilities = mf.GetCapabilities();
     159    for (ULONG i = 0; i < capabilities.size(); i++)
     160        uCapabilities |= capabilities[i];
     161
    152162    int cTest = 0;
    153163    if (uCapabilities & KMediumFormatCapabilities_CreateDynamic)
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp

    r41587 r44503  
    145145    /* Setup visibility: */
    146146    CMediumFormat mediumFormat = field("mediumFormat").value<CMediumFormat>();
    147     ULONG uCapabilities = mediumFormat.GetCapabilities();
     147    ULONG uCapabilities = 0;
     148    QVector<KMediumFormatCapabilities> capabilities;
     149    capabilities = mediumFormat.GetCapabilities();
     150    for (ULONG i = 0; i < capabilities.size(); i++)
     151        uCapabilities |= capabilities[i];
     152
    148153    bool fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
    149154    bool fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp

    r41833 r44503  
    189189
    190190    /* Enable/disable widgets: */
    191     ULONG uCapabilities = mf.GetCapabilities();
     191    ULONG uCapabilities = 0;
     192    QVector<KMediumFormatCapabilities> capabilities;
     193    capabilities = mf.GetCapabilities();
     194    for (ULONG i = 0; i < capabilities.size(); i++)
     195        uCapabilities |= capabilities[i];
     196
    192197    bool fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
    193198    bool fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
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