VirtualBox

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

Last change on this file since 33693 was 30764, checked in by vboxsync, 14 years ago

back out r63543, r63544 until windows build problems can be solved properly

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/* $Id: DHCPServerImpl.h 30764 2010-07-09 14:12:12Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2009 Oracle Corporation
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
20#ifndef ____H_H_DHCPSERVERIMPL
21#define ____H_H_DHCPSERVERIMPL
22
23#include "VirtualBoxBase.h"
24
25#ifdef VBOX_WITH_HOSTNETIF_API
26struct NETIFINFO;
27#endif
28
29namespace settings
30{
31 struct DHCPServer;
32}
33
34class ATL_NO_VTABLE DHCPServer :
35 public VirtualBoxBase,
36 VBOX_SCRIPTABLE_IMPL(IDHCPServer)
37{
38public:
39
40 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(DHCPServer, IDHCPServer)
41
42 DECLARE_NOT_AGGREGATABLE (DHCPServer)
43
44 DECLARE_PROTECT_FINAL_CONSTRUCT()
45
46 BEGIN_COM_MAP (DHCPServer)
47 COM_INTERFACE_ENTRY (ISupportErrorInfo)
48 COM_INTERFACE_ENTRY (IDHCPServer)
49 COM_INTERFACE_ENTRY (IDispatch)
50 END_COM_MAP()
51
52 DECLARE_EMPTY_CTOR_DTOR (DHCPServer)
53
54 HRESULT FinalConstruct();
55 void FinalRelease();
56
57 HRESULT init(VirtualBox *aVirtualBox,
58 IN_BSTR aName);
59 HRESULT init(VirtualBox *aVirtualBox,
60 const settings::DHCPServer &data);
61 HRESULT saveSettings(settings::DHCPServer &data);
62
63 void uninit();
64
65 // IDHCPServer properties
66 STDMETHOD(COMGETTER(NetworkName))(BSTR *aName);
67 STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
68 STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
69 STDMETHOD(COMGETTER(IPAddress))(BSTR *aIPAddress);
70 STDMETHOD(COMGETTER(NetworkMask))(BSTR *aNetworkMask);
71 STDMETHOD(COMGETTER(LowerIP))(BSTR *aIPAddress);
72 STDMETHOD(COMGETTER(UpperIP))(BSTR *aIPAddress);
73
74 STDMETHOD(SetConfiguration)(IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress);
75
76 STDMETHOD(Start)(IN_BSTR aNetworkName, IN_BSTR aTrunkName, IN_BSTR aTrunkType);
77 STDMETHOD(Stop)();
78
79private:
80 /** weak VirtualBox parent */
81 VirtualBox * const mVirtualBox;
82
83 const Bstr mName;
84
85 struct Data
86 {
87 Data() : enabled(FALSE) {}
88
89 Bstr IPAddress;
90 Bstr networkMask;
91 Bstr lowerIP;
92 Bstr upperIP;
93 BOOL enabled;
94
95 DHCPServerRunner dhcp;
96 } m;
97
98};
99
100#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