VirtualBox

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

Last change on this file since 79849 was 76562, checked in by vboxsync, 6 years ago

Main: Use MAIN_INCLUDED_ and MAIN_INCLUDED_SRC_ as header guard prefixes with scm.

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