VirtualBox

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


Ignore:
Timestamp:
Feb 22, 2011 11:11:22 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70171
Message:

Main/BandwidthControl: Don't use direct references to bandwidth group objects in the medium attachment object. It will point to the old uninitialized instance if the settings are changed. Uses the name of the bandwidth group now instead without changing the public interface to make a backport to 4.0 possible

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

Legend:

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

    r35836 r36058  
    3333#include "StorageControllerImpl.h"          // required for MachineImpl.h to compile on Windows
    3434#include "BandwidthControlImpl.h"
     35#include "BandwidthGroupImpl.h"
    3536#include "VBox/settings.h"
    3637#ifdef VBOX_WITH_RESOURCE_USAGE_API
     
    716717    void releaseStateDependency();
    717718
     719    HRESULT getBandwidthGroup(const Utf8Str &strBandwidthGroup,
     720                              ComObjPtr<BandwidthGroup> &pBandwidthGroup,
     721                              bool fSetError = false)
     722    {
     723        return mBandwidthControl->getBandwidthGroupByName(strBandwidthGroup,
     724                                                          pBandwidthGroup,
     725                                                          fSetError);
     726    }
     727
    718728protected:
    719729
  • trunk/src/VBox/Main/include/MediumAttachmentImpl.h

    r35638 r36058  
    4848                 DeviceType_T aType,
    4949                 bool fPassthrough,
    50                  BandwidthGroup *aBandwidthGroup);
     50                 const Utf8Str &strBandwidthGroup);
    5151    void uninit();
    5252
     
    7878    DeviceType_T getType() const;
    7979    bool getPassthrough() const;
    80     const ComObjPtr<BandwidthGroup>& getBandwidthGroup() const;
     80    const Utf8Str& getBandwidthGroup() const;
    8181
    8282    bool matches(CBSTR aControllerName, LONG aPort, LONG aDevice);
     
    8989
    9090    /** Must be called from under this object's write lock. */
    91     void updateBandwidthGroup(const ComObjPtr<BandwidthGroup> &aBandwidthGroup);
     91    void updateBandwidthGroup(const Utf8Str &aBandwidthGroup);
    9292
    9393    /** Get a unique and somewhat descriptive name for logging. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette