VirtualBox

Ignore:
Timestamp:
Nov 2, 2009 2:38:50 PM (15 years ago)
Author:
vboxsync
Message:

Main: new method Medium::RefreshState() which refreshes medium state; make the ::state attribute return the state only without refreshing

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
2 edited

Legend:

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

    r24184 r24258  
    684684                /* Perform accessibility check now. */
    685685                MediumState_T state;
    686                 CHECK_ERROR_BREAK(dstDisk, COMGETTER(State)(&state));
     686                CHECK_ERROR_BREAK(dstDisk, RefreshState(&state));
    687687            }
    688688            CHECK_ERROR_BREAK(dstDisk, COMGETTER(Format) (format.asOutParam()));
     
    12161216        /// @todo NEWMEDIA print the full state value
    12171217        MediumState_T state;
    1218         CHECK_ERROR_BREAK (hardDisk, COMGETTER(State)(&state));
     1218        CHECK_ERROR_BREAK (hardDisk, RefreshState(&state));
    12191219        RTPrintf("Accessible:           %s\n", state != MediumState_Inaccessible ? "yes" : "no");
    12201220
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r23223 r24258  
    527527                /// @todo NEWMEDIA check accessibility of all parents
    528528                /// @todo NEWMEDIA print the full state value
    529                 hdd->COMGETTER(State)(&enmState);
     529                hdd->RefreshState(&enmState);
    530530                RTPrintf("Accessible:   %s\n", enmState != MediumState_Inaccessible ? "yes" : "no");
    531531
     
    583583                RTPrintf("Path:       %lS\n", filePath.raw());
    584584                MediumState_T enmState;
    585                 dvdImage->COMGETTER(State)(&enmState);
     585                dvdImage->RefreshState(&enmState);
    586586                RTPrintf("Accessible: %s\n", enmState != MediumState_Inaccessible ? "yes" : "no");
    587587                /** @todo usage */
     
    605605                RTPrintf("Path:       %lS\n", filePath.raw());
    606606                MediumState_T enmState;
    607                 floppyImage->COMGETTER(State)(&enmState);
     607                floppyImage->RefreshState(&enmState);
    608608                RTPrintf("Accessible: %s\n", enmState != MediumState_Inaccessible ? "yes" : "no");
    609609                /** @todo usage */
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