1 | /* $Id: VRDEServerImpl.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VirtualBox COM class implementation
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox base platform packages, as
|
---|
12 | * available from https://www.virtualbox.org.
|
---|
13 | *
|
---|
14 | * This program is free software; you can redistribute it and/or
|
---|
15 | * modify it under the terms of the GNU General Public License
|
---|
16 | * as published by the Free Software Foundation, in version 3 of the
|
---|
17 | * License.
|
---|
18 | *
|
---|
19 | * This program is distributed in the hope that it will be useful, but
|
---|
20 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
22 | * General Public License for more details.
|
---|
23 | *
|
---|
24 | * You should have received a copy of the GNU General Public License
|
---|
25 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
26 | *
|
---|
27 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef MAIN_INCLUDED_VRDEServerImpl_h
|
---|
31 | #define MAIN_INCLUDED_VRDEServerImpl_h
|
---|
32 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
33 | # pragma once
|
---|
34 | #endif
|
---|
35 |
|
---|
36 | #include "VRDEServerWrap.h"
|
---|
37 |
|
---|
38 | namespace settings
|
---|
39 | {
|
---|
40 | struct VRDESettings;
|
---|
41 | }
|
---|
42 |
|
---|
43 | class ATL_NO_VTABLE VRDEServer :
|
---|
44 | public VRDEServerWrap
|
---|
45 | {
|
---|
46 | public:
|
---|
47 |
|
---|
48 | DECLARE_COMMON_CLASS_METHODS(VRDEServer)
|
---|
49 |
|
---|
50 | HRESULT FinalConstruct();
|
---|
51 | void FinalRelease();
|
---|
52 |
|
---|
53 | // public initializer/uninitializer for internal purposes only
|
---|
54 | HRESULT init(Machine *aParent);
|
---|
55 | HRESULT init(Machine *aParent, VRDEServer *aThat);
|
---|
56 | HRESULT initCopy(Machine *aParent, VRDEServer *aThat);
|
---|
57 | void uninit();
|
---|
58 |
|
---|
59 | // public methods only for internal purposes
|
---|
60 | HRESULT i_loadSettings(const settings::VRDESettings &data);
|
---|
61 | HRESULT i_saveSettings(settings::VRDESettings &data);
|
---|
62 | void i_rollback();
|
---|
63 | void i_commit();
|
---|
64 | void i_copyFrom(VRDEServer *aThat);
|
---|
65 |
|
---|
66 | private:
|
---|
67 |
|
---|
68 | // wrapped IVRDEServer properties
|
---|
69 | HRESULT getEnabled(BOOL *aEnabled);
|
---|
70 | HRESULT setEnabled(BOOL aEnabled);
|
---|
71 | HRESULT getAuthType(AuthType_T *aAuthType);
|
---|
72 | HRESULT setAuthType(AuthType_T aAuthType);
|
---|
73 | HRESULT getAuthTimeout(ULONG *aAuthTimeout);
|
---|
74 | HRESULT setAuthTimeout(ULONG aAuthTimeout);
|
---|
75 | HRESULT getAllowMultiConnection(BOOL *aAllowMultiConnection);
|
---|
76 | HRESULT setAllowMultiConnection(BOOL aAllowMultiConnection);
|
---|
77 | HRESULT getReuseSingleConnection(BOOL *aReuseSingleConnection);
|
---|
78 | HRESULT setReuseSingleConnection(BOOL aReuseSingleConnection);
|
---|
79 | HRESULT getVRDEExtPack(com::Utf8Str &aVRDEExtPack);
|
---|
80 | HRESULT setVRDEExtPack(const com::Utf8Str &aVRDEExtPack);
|
---|
81 | HRESULT getAuthLibrary(com::Utf8Str &aAuthLibrary);
|
---|
82 | HRESULT setAuthLibrary(const com::Utf8Str &aAuthLibrary);
|
---|
83 | HRESULT getVRDEProperties(std::vector<com::Utf8Str> &aVRDEProperties);
|
---|
84 |
|
---|
85 | // wrapped IVRDEServer methods
|
---|
86 | HRESULT setVRDEProperty(const com::Utf8Str &aKey,
|
---|
87 | const com::Utf8Str &aValue);
|
---|
88 | HRESULT getVRDEProperty(const com::Utf8Str &aKey,
|
---|
89 | com::Utf8Str &aValue);
|
---|
90 |
|
---|
91 | Machine * const mParent;
|
---|
92 | const ComObjPtr<VRDEServer> mPeer;
|
---|
93 |
|
---|
94 | Backupable<settings::VRDESettings> mData;
|
---|
95 | };
|
---|
96 |
|
---|
97 | #endif /* !MAIN_INCLUDED_VRDEServerImpl_h */
|
---|
98 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|