VirtualBox

source: vbox/trunk/src/VBox/Main/include/NATEngineImpl.h@ 62485

Last change on this file since 62485 was 61170, checked in by vboxsync, 9 years ago

8238 VBoxSVC settings - NetworkAdapterImpl

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: NATEngineImpl.h 61170 2016-05-24 16:44:44Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2016 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_NATENGINE
21#define ____H_NATENGINE
22
23#include "NATEngineWrap.h"
24
25namespace settings
26{
27 struct NAT;
28}
29
30
31class ATL_NO_VTABLE NATEngine :
32 public NATEngineWrap
33{
34public:
35
36 DECLARE_EMPTY_CTOR_DTOR(NATEngine)
37
38 HRESULT FinalConstruct();
39 void FinalRelease();
40
41 HRESULT init(Machine *aParent, INetworkAdapter *aAdapter);
42 HRESULT init(Machine *aParent, INetworkAdapter *aAdapter, NATEngine *aThat);
43 HRESULT initCopy(Machine *aParent, INetworkAdapter *aAdapter, NATEngine *aThat);
44 void uninit();
45
46 bool i_isModified();
47 void i_rollback();
48 void i_commit();
49 void i_copyFrom(NATEngine *aThat);
50 HRESULT i_loadSettings(const settings::NAT &data);
51 HRESULT i_saveSettings(settings::NAT &data);
52
53private:
54
55 // wrapped INATEngine properties
56 HRESULT setNetwork(const com::Utf8Str &aNetwork);
57 HRESULT getNetwork(com::Utf8Str &aNetwork);
58 HRESULT setHostIP(const com::Utf8Str &aHostIP);
59 HRESULT getHostIP(com::Utf8Str &aBindIP);
60 /* TFTP properties */
61 HRESULT setTFTPPrefix(const com::Utf8Str &aTFTPPrefix);
62 HRESULT getTFTPPrefix(com::Utf8Str &aTFTPPrefix);
63 HRESULT setTFTPBootFile(const com::Utf8Str &aTFTPBootFile);
64 HRESULT getTFTPBootFile(com::Utf8Str &aTFTPBootFile);
65 HRESULT setTFTPNextServer(const com::Utf8Str &aTFTPNextServer);
66 HRESULT getTFTPNextServer(com::Utf8Str &aTFTPNextServer);
67 /* DNS properties */
68 HRESULT setDNSPassDomain(BOOL aDNSPassDomain);
69 HRESULT getDNSPassDomain(BOOL *aDNSPassDomain);
70 HRESULT setDNSProxy(BOOL aDNSProxy);
71 HRESULT getDNSProxy(BOOL *aDNSProxy);
72 HRESULT getDNSUseHostResolver(BOOL *aDNSUseHostResolver);
73 HRESULT setDNSUseHostResolver(BOOL aDNSUseHostResolver);
74 /* Alias properties */
75 HRESULT setAliasMode(ULONG aAliasMode);
76 HRESULT getAliasMode(ULONG *aAliasMode);
77
78 HRESULT getRedirects(std::vector<com::Utf8Str> &aRedirects);
79
80 HRESULT setNetworkSettings(ULONG aMtu,
81 ULONG aSockSnd,
82 ULONG aSockRcv,
83 ULONG aTcpWndSnd,
84 ULONG aTcpWndRcv);
85
86 HRESULT getNetworkSettings(ULONG *aMtu,
87 ULONG *aSockSnd,
88 ULONG *aSockRcv,
89 ULONG *aTcpWndSnd,
90 ULONG *aTcpWndRcv);
91
92 HRESULT addRedirect(const com::Utf8Str &aName,
93 NATProtocol_T aProto,
94 const com::Utf8Str &aHostIP,
95 USHORT aHostPort,
96 const com::Utf8Str &aGuestIP,
97 USHORT aGuestPort);
98
99 HRESULT removeRedirect(const com::Utf8Str &aName);
100
101 struct Data;
102 Data *mData;
103 const ComObjPtr<NATEngine> mPeer;
104 Machine * const mParent;
105 INetworkAdapter * const mAdapter;
106};
107#endif
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