VirtualBox

source: vbox/trunk/src/VBox/Main/include/DHCPServerImpl.h@ 26550

Last change on this file since 26550 was 26163, checked in by vboxsync, 15 years ago

PDM: s/pUsbReg/pReg/g (2nd try, backed out r57176)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: DHCPServerImpl.h 26163 2010-02-02 18:58:33Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 *
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
20 * Clara, CA 95054 USA or visit http://www.sun.com if you need
21 * additional information or have any questions.
22 */
23
24#ifndef ____H_H_DHCPSERVERIMPL
25#define ____H_H_DHCPSERVERIMPL
26
27#include "VirtualBoxBase.h"
28
29#ifdef VBOX_WITH_HOSTNETIF_API
30struct NETIFINFO;
31#endif
32
33namespace settings
34{
35 struct DHCPServer;
36}
37
38class ATL_NO_VTABLE DHCPServer :
39 public VirtualBoxBase,
40 public VirtualBoxSupportErrorInfoImpl<DHCPServer, IDHCPServer>,
41 public VirtualBoxSupportTranslation<DHCPServer>,
42 VBOX_SCRIPTABLE_IMPL(IDHCPServer)
43{
44public:
45
46 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (DHCPServer)
47
48 DECLARE_NOT_AGGREGATABLE (DHCPServer)
49
50 DECLARE_PROTECT_FINAL_CONSTRUCT()
51
52 BEGIN_COM_MAP (DHCPServer)
53 COM_INTERFACE_ENTRY (ISupportErrorInfo)
54 COM_INTERFACE_ENTRY (IDHCPServer)
55 COM_INTERFACE_ENTRY (IDispatch)
56 END_COM_MAP()
57
58 DECLARE_EMPTY_CTOR_DTOR (DHCPServer)
59
60 HRESULT FinalConstruct();
61 void FinalRelease();
62
63 HRESULT init(VirtualBox *aVirtualBox,
64 IN_BSTR aName);
65 HRESULT init(VirtualBox *aVirtualBox,
66 const settings::DHCPServer &data);
67 HRESULT saveSettings(settings::DHCPServer &data);
68
69 void uninit();
70
71 // IDHCPServer properties
72 STDMETHOD(COMGETTER(NetworkName))(BSTR *aName);
73 STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
74 STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
75 STDMETHOD(COMGETTER(IPAddress))(BSTR *aIPAddress);
76 STDMETHOD(COMGETTER(NetworkMask))(BSTR *aNetworkMask);
77 STDMETHOD(COMGETTER(LowerIP))(BSTR *aIPAddress);
78 STDMETHOD(COMGETTER(UpperIP))(BSTR *aIPAddress);
79
80 STDMETHOD(SetConfiguration)(IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress);
81
82 STDMETHOD(Start)(IN_BSTR aNetworkName, IN_BSTR aTrunkName, IN_BSTR aTrunkType);
83 STDMETHOD(Stop)();
84
85 // for VirtualBoxSupportErrorInfoImpl
86 static const wchar_t *getComponentName() { return L"DHCPServer"; }
87
88private:
89 /** weak VirtualBox parent */
90 const ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox;
91
92 const Bstr mName;
93
94 struct Data
95 {
96 Data() : enabled(FALSE) {}
97
98 Bstr IPAddress;
99 Bstr networkMask;
100 Bstr lowerIP;
101 Bstr upperIP;
102 BOOL enabled;
103
104 DHCPServerRunner dhcp;
105 } m;
106
107};
108
109#endif // ____H_H_DHCPSERVERIMPL
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