VirtualBox

Changeset 17651 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Mar 10, 2009 10:27:08 PM (16 years ago)
Author:
vboxsync
Message:

Main: Reset differencing hard disks for which auto-reset is set to true (#3425).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/MachineImpl.h

    r17287 r17651  
    9090
    9191    /**
    92      *  Internal machine data.
    93      *
    94      *  Only one instance of this data exists per every machine --
    95      *  it is shared by the Machine, SessionMachine and all SnapshotMachine
    96      *  instances associated with the given machine using the util::Shareable
    97      *  template through the mData variable.
    98      *
    99      *  @note |const| members are persistent during lifetime so can be
    100      *  accessed without locking.
    101      *
    102      *  @note There is no need to lock anything inside init() or uninit()
    103      *  methods, because they are always serialized (see AutoCaller).
     92     * Internal machine data.
     93     *
     94     * Only one instance of this data exists per every machine -- it is shared
     95     * by the Machine, SessionMachine and all SnapshotMachine instances
     96     * associated with the given machine using the util::Shareable template
     97     * through the mData variable.
     98     *
     99     * @note |const| members are persistent during lifetime so can be
     100     * accessed without locking.
     101     *
     102     * @note There is no need to lock anything inside init() or uninit()
     103     * methods, because they are always serialized (see AutoCaller).
    104104     */
    105105    struct Data
    106106    {
    107107        /**
    108          *  Data structure to hold information about sessions opened for the
    109          *  given machine.
     108         * Data structure to hold information about sessions opened for the
     109         * given machine.
    110110         */
    111111        struct Session
     
    123123
    124124            /**
    125              *  PID of the session object that must be passed to openSession()
    126              *  to finalize the openRemoteSession() request
    127              *  (i.e., PID of the process created by openRemoteSession())
     125             * PID of the session object that must be passed to openSession() to
     126             * finalize the openRemoteSession() request (i.e., PID of the
     127             * process created by openRemoteSession())
    128128             */
    129129            RTPROCESS mPid;
     
    137137            /** Session machine object */
    138138            ComObjPtr <SessionMachine> mMachine;
     139
     140            /**
     141             * Successfully locked media list. The 2nd value in the pair is true
     142             * if the medium is locked for writing and false if locked for
     143             * reading.
     144             */
     145            typedef std::list <std::pair <ComPtr <IMedium>, bool > > LockedMedia;
     146            LockedMedia mLockedMedia;
    139147        };
    140148
     
    904912    STDMETHOD(PushGuestProperty) (IN_BSTR aName, IN_BSTR aValue,
    905913                                  ULONG64 aTimestamp, IN_BSTR aFlags);
     914    STDMETHOD(LockMedia)() { return lockMedia(); }
    906915
    907916    // public methods only for internal purposes
     
    967976    void discardSnapshotHandler (DiscardSnapshotTask &aTask);
    968977    void discardCurrentStateHandler (DiscardCurrentStateTask &aTask);
     978
     979    HRESULT lockMedia();
     980    void unlockMedia();
    969981
    970982    HRESULT setMachineState (MachineState_T aMachineState);
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