VirtualBox

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

Last change on this file since 45733 was 42551, checked in by vboxsync, 12 years ago

Main: big API naming cleanup, use all caps acronyms everywhere, including SDK docs
Frontends/VBoxManage: implement guestcontrol execute for new API, disabled by default

  • 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-2012 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 VBOX_DEFAULT_INTERFACE_ENTRIES(IBandwidthControl)
43 END_COM_MAP()
44
45 BandwidthControl() { };
46 ~BandwidthControl() { };
47
48 // public initializer/uninitializer for internal purposes only
49 HRESULT init(Machine *aParent);
50 HRESULT init(Machine *aParent, BandwidthControl *aThat);
51 HRESULT initCopy(Machine *aParent, BandwidthControl *aThat);
52 void uninit();
53
54 STDMETHOD(CreateBandwidthGroup) (IN_BSTR aName, BandwidthGroupType_T aType, LONG64 aMaxBytesPerSec);
55 STDMETHOD(DeleteBandwidthGroup) (IN_BSTR aName);
56 STDMETHOD(COMGETTER(NumGroups)) (ULONG *aGroups);
57 STDMETHOD(GetBandwidthGroup) (IN_BSTR aName, IBandwidthGroup **aBandwidthGroup);
58 STDMETHOD(GetAllBandwidthGroups) (ComSafeArrayOut(IBandwidthGroup *, aBandwidthGroups));
59
60 HRESULT FinalConstruct();
61 void FinalRelease();
62
63 // public internal methods
64
65 HRESULT loadSettings(const settings::IOSettings &data);
66 HRESULT saveSettings(settings::IOSettings &data);
67
68 void rollback();
69 void commit();
70 void copyFrom (BandwidthControl *aThat);
71
72 Machine *getMachine() const;
73
74 HRESULT getBandwidthGroupByName(const Utf8Str &aName,
75 ComObjPtr<BandwidthGroup> &aBandwidthGroup,
76 bool aSetError /* = false */);
77
78private:
79 struct Data;
80 Data *m;
81};
82
83#endif // ____H_BANDWIDTHCONTROLIMPL
84/* 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