VirtualBox

source: vbox/trunk/src/VBox/Main/include/BandwidthControlImpl.h@ 35479

Last change on this file since 35479 was 34589, checked in by vboxsync, 14 years ago

Burn fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/** @file
2 *
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2009 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ____H_BANDWIDTHCONTROLIMPL
19#define ____H_BANDWIDTHCONTROLIMPL
20
21#include "VirtualBoxBase.h"
22
23class BandwidthGroup;
24
25namespace settings
26{
27 struct IoSettings;
28}
29
30class ATL_NO_VTABLE BandwidthControl :
31 public VirtualBoxBase,
32 VBOX_SCRIPTABLE_IMPL(IBandwidthControl)
33{
34public:
35 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(BandwidthControl, IBandwidthControl)
36
37 DECLARE_NOT_AGGREGATABLE(BandwidthControl)
38
39 DECLARE_PROTECT_FINAL_CONSTRUCT()
40
41 BEGIN_COM_MAP(BandwidthControl)
42 COM_INTERFACE_ENTRY(ISupportErrorInfo)
43 COM_INTERFACE_ENTRY(IBandwidthControl)
44 COM_INTERFACE_ENTRY(IDispatch)
45 END_COM_MAP()
46
47 BandwidthControl() { };
48 ~BandwidthControl() { };
49
50 // public initializer/uninitializer for internal purposes only
51 HRESULT init(Machine *aParent);
52 HRESULT init(Machine *aParent, BandwidthControl *aThat);
53 HRESULT initCopy(Machine *aParent, BandwidthControl *aThat);
54 void uninit();
55
56 STDMETHOD(CreateBandwidthGroup) (IN_BSTR aName, BandwidthGroupType_T aType, ULONG aMaxMbPerSec);
57 STDMETHOD(DeleteBandwidthGroup) (IN_BSTR aName);
58 STDMETHOD(COMGETTER(NumGroups)) (ULONG *aGroups);
59 STDMETHOD(GetBandwidthGroup) (IN_BSTR aName, IBandwidthGroup **aBandwidthGroup);
60 STDMETHOD(GetAllBandwidthGroups) (ComSafeArrayOut(IBandwidthGroup *, aBandwidthGroups));
61
62 HRESULT FinalConstruct();
63 void FinalRelease();
64
65 // public internal methods
66
67 HRESULT loadSettings(const settings::IoSettings &data);
68 HRESULT saveSettings(settings::IoSettings &data);
69
70 void rollback();
71 void commit();
72 void copyFrom (BandwidthControl *aThat);
73
74 Machine *getMachine() const;
75
76 HRESULT getBandwidthGroupByName(const Utf8Str &aName,
77 ComObjPtr<BandwidthGroup> &aBandwidthGroup,
78 bool aSetError /* = false */);
79
80private:
81 struct Data;
82 Data *m;
83};
84
85#endif // ____H_BANDWIDTHCONTROLIMPL
86/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

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