VirtualBox

source: vbox/trunk/src/VBox/Main/include/VRDPServerImpl.h@ 26126

Last change on this file since 26126 was 26044, checked in by vboxsync, 15 years ago

Main: move Host::Get{DVD|Floppy}Drives implementation into implementation methods to eliminate useless conversions in mountMedium()

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1/* $Id: VRDPServerImpl.h 26044 2010-01-26 12:21:34Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.215389.xyz. 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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
20 * Clara, CA 95054 USA or visit http://www.sun.com if you need
21 * additional information or have any questions.
22 */
23
24#ifndef ____H_VRDPSERVER
25#define ____H_VRDPSERVER
26
27#include "VirtualBoxBase.h"
28
29#include <VBox/VRDPAuth.h>
30
31namespace settings
32{
33 struct VRDPSettings;
34}
35
36class ATL_NO_VTABLE VRDPServer :
37 public VirtualBoxBase,
38 public VirtualBoxSupportErrorInfoImpl<VRDPServer, IVRDPServer>,
39 public VirtualBoxSupportTranslation<VRDPServer>,
40 VBOX_SCRIPTABLE_IMPL(IVRDPServer)
41{
42public:
43
44 struct Data
45 {
46 bool operator== (const Data &that) const
47 {
48 return this == &that ||
49 (mEnabled == that.mEnabled &&
50 mVRDPPorts == that.mVRDPPorts &&
51 mVRDPAddress == that.mVRDPAddress &&
52 mAuthType == that.mAuthType &&
53 mAuthTimeout == that.mAuthTimeout &&
54 mAllowMultiConnection == that.mAllowMultiConnection &&
55 mReuseSingleConnection == that.mReuseSingleConnection);
56 }
57
58 BOOL mEnabled;
59 Bstr mVRDPPorts;
60 Bstr mVRDPAddress;
61 VRDPAuthType_T mAuthType;
62 ULONG mAuthTimeout;
63 BOOL mAllowMultiConnection;
64 BOOL mReuseSingleConnection;
65 };
66
67 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (VRDPServer)
68
69 DECLARE_NOT_AGGREGATABLE(VRDPServer)
70
71 DECLARE_PROTECT_FINAL_CONSTRUCT()
72
73 BEGIN_COM_MAP(VRDPServer)
74 COM_INTERFACE_ENTRY (ISupportErrorInfo)
75 COM_INTERFACE_ENTRY (IVRDPServer)
76 COM_INTERFACE_ENTRY2 (IDispatch, IVRDPServer)
77 END_COM_MAP()
78
79 DECLARE_EMPTY_CTOR_DTOR (VRDPServer)
80
81 HRESULT FinalConstruct();
82 void FinalRelease();
83
84 // public initializer/uninitializer for internal purposes only
85 HRESULT init(Machine *aParent);
86 HRESULT init(Machine *aParent, VRDPServer *aThat);
87 HRESULT initCopy (Machine *aParent, VRDPServer *aThat);
88 void uninit();
89
90 // IVRDPServer properties
91 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
92 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnable);
93 STDMETHOD(COMGETTER(Ports)) (BSTR *aPorts);
94 STDMETHOD(COMSETTER(Ports)) (IN_BSTR aPorts);
95 STDMETHOD(COMGETTER(NetAddress)) (BSTR *aAddress);
96 STDMETHOD(COMSETTER(NetAddress)) (IN_BSTR aAddress);
97 STDMETHOD(COMGETTER(AuthType)) (VRDPAuthType_T *aType);
98 STDMETHOD(COMSETTER(AuthType)) (VRDPAuthType_T aType);
99 STDMETHOD(COMGETTER(AuthTimeout)) (ULONG *aTimeout);
100 STDMETHOD(COMSETTER(AuthTimeout)) (ULONG aTimeout);
101 STDMETHOD(COMGETTER(AllowMultiConnection)) (BOOL *aAllowMultiConnection);
102 STDMETHOD(COMSETTER(AllowMultiConnection)) (BOOL aAllowMultiConnection);
103 STDMETHOD(COMGETTER(ReuseSingleConnection)) (BOOL *aReuseSingleConnection);
104 STDMETHOD(COMSETTER(ReuseSingleConnection)) (BOOL aReuseSingleConnection);
105
106 // IVRDPServer methods
107
108 // public methods only for internal purposes
109
110 HRESULT loadSettings(const settings::VRDPSettings &data);
111 HRESULT saveSettings(settings::VRDPSettings &data);
112
113 bool isModified() { AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); return mData.isBackedUp(); }
114 bool isReallyModified() { AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); return mData.hasActualChanges(); }
115 bool rollback();
116 void commit();
117 void copyFrom (VRDPServer *aThat);
118
119 // for VirtualBoxSupportErrorInfoImpl
120 static const wchar_t *getComponentName() { return L"VRDPServer"; }
121
122private:
123
124 const ComObjPtr<Machine, ComWeakRef> mParent;
125 const ComObjPtr<VRDPServer> mPeer;
126
127 Backupable<Data> mData;
128};
129
130#endif // ____H_VRDPSERVER
131/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette