VirtualBox

Changeset 64996 in vbox


Ignore:
Timestamp:
Dec 22, 2016 7:41:00 AM (8 years ago)
Author:
vboxsync
Message:

bugref:8527. added Unattended object as class member into MachineImpl class

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

Legend:

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

    r63584 r64996  
    4040#include "PerformanceImpl.h"
    4141#include "ThreadTask.h"
     42#include "UnattendedImpl.h"
     43
    4244#endif /* VBOX_WITH_RESOURCE_USAGE_API */
    4345
     
    772774    const ComObjPtr<BIOSSettings>      mBIOSSettings;
    773775    const ComObjPtr<BandwidthControl>  mBandwidthControl;
     776    const ComObjPtr<Unattended>       mUnattended;
    774777
    775778    typedef std::vector<ComObjPtr<NetworkAdapter> > NetworkAdapterVector;
     
    977980    HRESULT getVMProcessPriority(com::Utf8Str &aVMProcessPriority);
    978981    HRESULT setVMProcessPriority(const com::Utf8Str &aVMProcessPriority);
     982    HRESULT getUnattended(ComPtr<IUnattended> &aUnattended);
    979983
    980984    // wrapped IMachine methods
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r63584 r64996  
    71617161}
    71627162
     7163HRESULT Machine::getUnattended(ComPtr<IUnattended> &aUnattended)
     7164{
     7165    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     7166
     7167    aUnattended = mUnattended;
     7168
     7169    return S_OK;
     7170}
     7171
    71637172HRESULT Machine::cloneTo(const ComPtr<IMachine> &aTarget, CloneMode_T aMode, const std::vector<CloneOptions_T> &aOptions,
    71647173                         ComPtr<IProgress> &aProgress)
     
    83868395    mBandwidthControl->init(this);
    83878396
     8397    /* create the unattended object (always present) */
     8398    unconst(mUnattended).createObject();
     8399    mUnattended->init(this);
     8400
    83888401    return S_OK;
    83898402}
     
    84618474        mBIOSSettings->uninit();
    84628475        unconst(mBIOSSettings).setNull();
     8476    }
     8477
     8478    if (mUnattended)
     8479    {
     8480        mUnattended->uninit();
     8481        unconst(mUnattended).setNull();
    84638482    }
    84648483
     
    1251012529    mBandwidthControl->init(this, aMachine->mBandwidthControl);
    1251112530
     12531    /* create another unattended object that will be mutable */
     12532    unconst(mUnattended).createObject();
     12533    mUnattended->init(this, aMachine->mUnattended);
     12534
    1251212535    /* default is to delete saved state on Saved -> PoweredOff transition */
    1251312536    mRemoveSavedState = true;
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