VirtualBox

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

Last change on this file since 49935 was 49874, checked in by vboxsync, 11 years ago

Main: fix Windows host warnings, hide internal data.

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