VirtualBox

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

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

Main: remove SupportErrorInfo template magic

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/* $Id: DHCPServerImpl.h 30714 2010-07-07 16:20:03Z 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.215389.xyz. 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 public VirtualBoxSupportTranslation<DHCPServer>,
37 VBOX_SCRIPTABLE_IMPL(IDHCPServer)
38{
39public:
40
41 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(DHCPServer, IDHCPServer)
42
43 DECLARE_NOT_AGGREGATABLE (DHCPServer)
44
45 DECLARE_PROTECT_FINAL_CONSTRUCT()
46
47 BEGIN_COM_MAP (DHCPServer)
48 COM_INTERFACE_ENTRY (ISupportErrorInfo)
49 COM_INTERFACE_ENTRY (IDHCPServer)
50 COM_INTERFACE_ENTRY (IDispatch)
51 END_COM_MAP()
52
53 DECLARE_EMPTY_CTOR_DTOR (DHCPServer)
54
55 HRESULT FinalConstruct();
56 void FinalRelease();
57
58 HRESULT init(VirtualBox *aVirtualBox,
59 IN_BSTR aName);
60 HRESULT init(VirtualBox *aVirtualBox,
61 const settings::DHCPServer &data);
62 HRESULT saveSettings(settings::DHCPServer &data);
63
64 void uninit();
65
66 // IDHCPServer properties
67 STDMETHOD(COMGETTER(NetworkName))(BSTR *aName);
68 STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
69 STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
70 STDMETHOD(COMGETTER(IPAddress))(BSTR *aIPAddress);
71 STDMETHOD(COMGETTER(NetworkMask))(BSTR *aNetworkMask);
72 STDMETHOD(COMGETTER(LowerIP))(BSTR *aIPAddress);
73 STDMETHOD(COMGETTER(UpperIP))(BSTR *aIPAddress);
74
75 STDMETHOD(SetConfiguration)(IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress);
76
77 STDMETHOD(Start)(IN_BSTR aNetworkName, IN_BSTR aTrunkName, IN_BSTR aTrunkType);
78 STDMETHOD(Stop)();
79
80private:
81 /** weak VirtualBox parent */
82 VirtualBox * const mVirtualBox;
83
84 const Bstr mName;
85
86 struct Data
87 {
88 Data() : enabled(FALSE) {}
89
90 Bstr IPAddress;
91 Bstr networkMask;
92 Bstr lowerIP;
93 Bstr upperIP;
94 BOOL enabled;
95
96 DHCPServerRunner dhcp;
97 } m;
98
99};
100
101#endif // ____H_H_DHCPSERVERIMPL
Note: See TracBrowser for help on using the repository browser.

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