25
25
#define ____H_H_DHCPSERVERIMPL
27
27
#include "VirtualBoxBase.h"
28
#include "VirtualBoxImpl.h"
30
31
#ifdef VBOX_WITH_HOSTNETIF_API
31
/* class DHCPServer; */
32
/* #include "netif.h" */
36
40
class ATL_NO_VTABLE DHCPServer :
37
public VirtualBoxBaseNEXT,
38
public VirtualBoxSupportErrorInfoImpl <DHCPServer, IDHCPServer>,
39
public VirtualBoxSupportTranslation <DHCPServer>,
41
public VirtualBoxBase,
42
public VirtualBoxSupportErrorInfoImpl<DHCPServer, IDHCPServer>,
43
public VirtualBoxSupportTranslation<DHCPServer>,
40
44
VBOX_SCRIPTABLE_IMPL(IDHCPServer)
53
57
COM_INTERFACE_ENTRY (IDispatch)
58
60
DECLARE_EMPTY_CTOR_DTOR (DHCPServer)
60
62
HRESULT FinalConstruct();
61
63
void FinalRelease();
63
HRESULT init(VirtualBox *aVirtualBox, IN_BSTR aName);
64
HRESULT init(VirtualBox *aVirtualBox, const settings::Key &aNode);
65
HRESULT saveSettings (settings::Key &aParentNode);
65
HRESULT init(VirtualBox *aVirtualBox,
67
HRESULT init(VirtualBox *aVirtualBox,
68
const settings::DHCPServer &data);
69
HRESULT saveSettings(settings::DHCPServer &data);
69
73
// IDHCPServer properties
70
STDMETHOD(COMGETTER(NetworkName)) (BSTR *aName);
71
STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
72
STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled);
73
STDMETHOD(COMGETTER(IPAddress)) (BSTR *aIPAddress);
74
STDMETHOD(COMGETTER(NetworkMask)) (BSTR *aNetworkMask);
75
STDMETHOD(COMGETTER(LowerIP)) (BSTR *aIPAddress);
76
STDMETHOD(COMGETTER(UpperIP)) (BSTR *aIPAddress);
78
STDMETHOD(SetConfiguration) (IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress);
80
STDMETHOD(Start) (IN_BSTR aNetworkName, IN_BSTR aTrunkName, IN_BSTR aTrunkType);
74
STDMETHOD(COMGETTER(NetworkName))(BSTR *aName);
75
STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
76
STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
77
STDMETHOD(COMGETTER(IPAddress))(BSTR *aIPAddress);
78
STDMETHOD(COMGETTER(NetworkMask))(BSTR *aNetworkMask);
79
STDMETHOD(COMGETTER(LowerIP))(BSTR *aIPAddress);
80
STDMETHOD(COMGETTER(UpperIP))(BSTR *aIPAddress);
82
STDMETHOD(SetConfiguration)(IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress);
84
STDMETHOD(Start)(IN_BSTR aNetworkName, IN_BSTR aTrunkName, IN_BSTR aTrunkType);
83
87
// for VirtualBoxSupportErrorInfoImpl
84
88
static const wchar_t *getComponentName() { return L"DHCPServer"; }
87
91
/** weak VirtualBox parent */
88
const ComObjPtr <VirtualBox, ComWeakRef> mVirtualBox;
92
const ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox;