VirtualBox

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

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

Main: get rid of Backupable<>::hasActualChanges and the operator== in all the machine data structures which it required; nuke obsolete Shareable.h

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/* $Id: VRDPServerImpl.h 26171 2010-02-02 20:37:36Z 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.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 * 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 mEnabled;
47 Bstr mVRDPPorts;
48 Bstr mVRDPAddress;
49 VRDPAuthType_T mAuthType;
50 ULONG mAuthTimeout;
51 BOOL mAllowMultiConnection;
52 BOOL mReuseSingleConnection;
53 };
54
55 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (VRDPServer)
56
57 DECLARE_NOT_AGGREGATABLE(VRDPServer)
58
59 DECLARE_PROTECT_FINAL_CONSTRUCT()
60
61 BEGIN_COM_MAP(VRDPServer)
62 COM_INTERFACE_ENTRY (ISupportErrorInfo)
63 COM_INTERFACE_ENTRY (IVRDPServer)
64 COM_INTERFACE_ENTRY2 (IDispatch, IVRDPServer)
65 END_COM_MAP()
66
67 DECLARE_EMPTY_CTOR_DTOR (VRDPServer)
68
69 HRESULT FinalConstruct();
70 void FinalRelease();
71
72 // public initializer/uninitializer for internal purposes only
73 HRESULT init(Machine *aParent);
74 HRESULT init(Machine *aParent, VRDPServer *aThat);
75 HRESULT initCopy (Machine *aParent, VRDPServer *aThat);
76 void uninit();
77
78 // IVRDPServer properties
79 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
80 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnable);
81 STDMETHOD(COMGETTER(Ports)) (BSTR *aPorts);
82 STDMETHOD(COMSETTER(Ports)) (IN_BSTR aPorts);
83 STDMETHOD(COMGETTER(NetAddress)) (BSTR *aAddress);
84 STDMETHOD(COMSETTER(NetAddress)) (IN_BSTR aAddress);
85 STDMETHOD(COMGETTER(AuthType)) (VRDPAuthType_T *aType);
86 STDMETHOD(COMSETTER(AuthType)) (VRDPAuthType_T aType);
87 STDMETHOD(COMGETTER(AuthTimeout)) (ULONG *aTimeout);
88 STDMETHOD(COMSETTER(AuthTimeout)) (ULONG aTimeout);
89 STDMETHOD(COMGETTER(AllowMultiConnection)) (BOOL *aAllowMultiConnection);
90 STDMETHOD(COMSETTER(AllowMultiConnection)) (BOOL aAllowMultiConnection);
91 STDMETHOD(COMGETTER(ReuseSingleConnection)) (BOOL *aReuseSingleConnection);
92 STDMETHOD(COMSETTER(ReuseSingleConnection)) (BOOL aReuseSingleConnection);
93
94 // IVRDPServer methods
95
96 // public methods only for internal purposes
97
98 HRESULT loadSettings(const settings::VRDPSettings &data);
99 HRESULT saveSettings(settings::VRDPSettings &data);
100
101 void rollback();
102 void commit();
103 void copyFrom (VRDPServer *aThat);
104
105 // for VirtualBoxSupportErrorInfoImpl
106 static const wchar_t *getComponentName() { return L"VRDPServer"; }
107
108private:
109
110 const ComObjPtr<Machine, ComWeakRef> mParent;
111 const ComObjPtr<VRDPServer> mPeer;
112
113 Backupable<Data> mData;
114};
115
116#endif // ____H_VRDPSERVER
117/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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