VirtualBox

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

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

Automated rebranding to Oracle copyright/license strings via filemuncher

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