VirtualBox

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

最後變更 在這個檔案從30760是 30760,由 vboxsync 提交於 15 年 前

Main: separate internal machine data structs into MachineImplPrivate.h to significantly speed up compilation and for better interface separation; remove obsolete ConsoleEvents.h file

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.5 KB
 
1/* $Id: DHCPServerImpl.h 30760 2010-07-09 13:12:04Z 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.alldomusa.eu.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#include "DHCPServerRunner.h"
26
27#ifdef VBOX_WITH_HOSTNETIF_API
28struct NETIFINFO;
29#endif
30
31namespace settings
32{
33 struct DHCPServer;
34}
35
36class ATL_NO_VTABLE DHCPServer :
37 public VirtualBoxBase,
38 VBOX_SCRIPTABLE_IMPL(IDHCPServer)
39{
40public:
41
42 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(DHCPServer, IDHCPServer)
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
81private:
82 /** weak VirtualBox parent */
83 VirtualBox * const mVirtualBox;
84
85 const Bstr mName;
86
87 struct Data
88 {
89 Data() : enabled(FALSE) {}
90
91 Bstr IPAddress;
92 Bstr networkMask;
93 Bstr lowerIP;
94 Bstr upperIP;
95 BOOL enabled;
96
97 DHCPServerRunner dhcp;
98 } m;
99
100};
101
102#endif // ____H_H_DHCPSERVERIMPL
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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