VirtualBox

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

Last change on this file since 18023 was 18023, checked in by vboxsync, 16 years ago

Dhcp->DHCP

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: DHCPServerImpl.h 18023 2009-03-17 13:48:59Z 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#include "VirtualBoxImpl.h"
29
30#ifdef VBOX_WITH_HOSTNETIF_API
31/* class DHCPServer; */
32/* #include "netif.h" */
33struct NETIFINFO;
34#endif
35
36class ATL_NO_VTABLE DHCPServer :
37 public VirtualBoxBaseNEXT,
38 public VirtualBoxSupportErrorInfoImpl <DHCPServer, IDHCPServer>,
39 public VirtualBoxSupportTranslation <DHCPServer>,
40 public IDHCPServer
41{
42public:
43
44 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (DHCPServer)
45
46 DECLARE_NOT_AGGREGATABLE (DHCPServer)
47
48 DECLARE_PROTECT_FINAL_CONSTRUCT()
49
50 BEGIN_COM_MAP (DHCPServer)
51 COM_INTERFACE_ENTRY (ISupportErrorInfo)
52 COM_INTERFACE_ENTRY (IDHCPServer)
53 END_COM_MAP()
54
55 NS_DECL_ISUPPORTS
56
57 DECLARE_EMPTY_CTOR_DTOR (DHCPServer)
58
59 HRESULT FinalConstruct();
60 void FinalRelease();
61
62 HRESULT init(VirtualBox *aVirtualBox, IN_BSTR aName);
63 HRESULT init(VirtualBox *aVirtualBox, const settings::Key &aNode);
64 HRESULT saveSettings (settings::Key &aParentNode);
65
66 void uninit();
67
68 // IDHCPServer properties
69 STDMETHOD(COMGETTER(NetworkName)) (BSTR *aName);
70 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
71 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled);
72 STDMETHOD(COMGETTER(IPAddress)) (BSTR *aIPAddress);
73 STDMETHOD(COMGETTER(NetworkMask)) (BSTR *aNetworkMask);
74 STDMETHOD(COMGETTER(LowerIP)) (BSTR *aIPAddress);
75 STDMETHOD(COMGETTER(UpperIP)) (BSTR *aIPAddress);
76
77 STDMETHOD(SetConfiguration) (IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress);
78
79 // for VirtualBoxSupportErrorInfoImpl
80 static const wchar_t *getComponentName() { return L"DHCPServer"; }
81
82private:
83 /** weak VirtualBox parent */
84 const ComObjPtr <VirtualBox, ComWeakRef> mVirtualBox;
85
86 const Bstr mName;
87
88 struct Data
89 {
90 Data() : enabled(FALSE) {}
91
92 Bstr IPAddress;
93 Bstr networkMask;
94 Bstr lowerIP;
95 Bstr upperIP;
96 BOOL enabled;
97 } m;
98
99};
100
101#endif // ____H_H_DHCPSERVERIMPL
102/* 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