VirtualBox

source: vbox/trunk/src/VBox/Main/include/BandwidthGroupImpl.h@ 45284

Last change on this file since 45284 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 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_BANDWIDTHGROUPIMPL
19#define ____H_BANDWIDTHGROUPIMPL
20
21#include "VirtualBoxBase.h"
22#include "BandwidthControlImpl.h"
23
24class ATL_NO_VTABLE BandwidthGroup :
25 public VirtualBoxBase,
26 VBOX_SCRIPTABLE_IMPL(IBandwidthGroup)
27{
28public:
29 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(BandwidthGroup, IBandwidthGroup)
30
31 DECLARE_NOT_AGGREGATABLE(BandwidthGroup)
32
33 DECLARE_PROTECT_FINAL_CONSTRUCT()
34
35 BEGIN_COM_MAP(BandwidthGroup)
36 VBOX_DEFAULT_INTERFACE_ENTRIES(IBandwidthGroup)
37 END_COM_MAP()
38
39 BandwidthGroup() { };
40 ~BandwidthGroup() { };
41
42 // public initializer/uninitializer for internal purposes only
43 HRESULT init(BandwidthControl *aParent,
44 const Utf8Str &aName,
45 BandwidthGroupType_T aType,
46 LONG64 aMaxBytesPerSec);
47 HRESULT init(BandwidthControl *aParent, BandwidthGroup *aThat, bool aReshare = false);
48 HRESULT initCopy(BandwidthControl *aParent, BandwidthGroup *aThat);
49 void uninit();
50
51 HRESULT FinalConstruct();
52 void FinalRelease();
53
54 STDMETHOD(COMGETTER(Name))(BSTR *aName);
55 STDMETHOD(COMGETTER(Type))(BandwidthGroupType_T *aType);
56 STDMETHOD(COMGETTER(Reference))(ULONG *aReferences);
57 STDMETHOD(COMGETTER(MaxBytesPerSec))(LONG64 *aMaxBytesPerSec);
58 STDMETHOD(COMSETTER(MaxBytesPerSec))(LONG64 aMaxBytesPerSec);
59
60 // public methods only for internal purposes
61 void rollback();
62 void commit();
63 void unshare();
64
65 const Utf8Str &getName() const;
66 BandwidthGroupType_T getType() const;
67 LONG64 getMaxBytesPerSec() const;
68 ULONG getReferences() const;
69
70 void reference();
71 void release();
72
73 ComObjPtr<BandwidthGroup> getPeer();
74
75private:
76 struct Data;
77 Data *m;
78};
79
80#endif // ____H_BANDWIDTHGROUPIMPL
81/* 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