VirtualBox

source: vbox/trunk/src/VBox/Main/include/VRDEServerImpl.h@ 35479

Last change on this file since 35479 was 35146, checked in by vboxsync, 14 years ago

VRDE: use VRDE properties for video redirection settings.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: VRDEServerImpl.h 35146 2010-12-15 16:31:56Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2010 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_VRDPSERVER
21#define ____H_VRDPSERVER
22
23#include "VirtualBoxBase.h"
24
25#include <VBox/VBoxAuth.h>
26#include <VBox/settings.h>
27
28class ATL_NO_VTABLE VRDEServer :
29 public VirtualBoxBase,
30 VBOX_SCRIPTABLE_IMPL(IVRDEServer)
31{
32public:
33
34 struct Data
35 {
36 BOOL mEnabled;
37 Bstr mAuthLibrary;
38 AuthType_T mAuthType;
39 ULONG mAuthTimeout;
40 BOOL mAllowMultiConnection;
41 BOOL mReuseSingleConnection;
42 Utf8Str mVrdeExtPack;
43 settings::StringsMap mProperties;
44 };
45
46 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VRDEServer, IVRDEServer)
47
48 DECLARE_NOT_AGGREGATABLE(VRDEServer)
49
50 DECLARE_PROTECT_FINAL_CONSTRUCT()
51
52 BEGIN_COM_MAP(VRDEServer)
53 COM_INTERFACE_ENTRY (ISupportErrorInfo)
54 COM_INTERFACE_ENTRY (IVRDEServer)
55 COM_INTERFACE_ENTRY2 (IDispatch, IVRDEServer)
56 END_COM_MAP()
57
58 DECLARE_EMPTY_CTOR_DTOR (VRDEServer)
59
60 HRESULT FinalConstruct();
61 void FinalRelease();
62
63 // public initializer/uninitializer for internal purposes only
64 HRESULT init(Machine *aParent);
65 HRESULT init(Machine *aParent, VRDEServer *aThat);
66 HRESULT initCopy (Machine *aParent, VRDEServer *aThat);
67 void uninit();
68
69 // IVRDEServer properties
70 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
71 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnable);
72 STDMETHOD(COMGETTER(AuthType)) (AuthType_T *aType);
73 STDMETHOD(COMSETTER(AuthType)) (AuthType_T aType);
74 STDMETHOD(COMGETTER(AuthTimeout)) (ULONG *aTimeout);
75 STDMETHOD(COMSETTER(AuthTimeout)) (ULONG aTimeout);
76 STDMETHOD(COMGETTER(AllowMultiConnection)) (BOOL *aAllowMultiConnection);
77 STDMETHOD(COMSETTER(AllowMultiConnection)) (BOOL aAllowMultiConnection);
78 STDMETHOD(COMGETTER(ReuseSingleConnection)) (BOOL *aReuseSingleConnection);
79 STDMETHOD(COMSETTER(ReuseSingleConnection)) (BOOL aReuseSingleConnection);
80 STDMETHOD(COMGETTER(VRDEExtPack))(BSTR *aExtPack);
81 STDMETHOD(COMSETTER(VRDEExtPack))(IN_BSTR aExtPack);
82 STDMETHOD(COMGETTER(AuthLibrary)) (BSTR *aValue);
83 STDMETHOD(COMSETTER(AuthLibrary)) (IN_BSTR aValue);
84 STDMETHOD(COMGETTER(VRDEProperties)) (ComSafeArrayOut (BSTR, aProperties));
85
86 // IVRDEServer methods
87 STDMETHOD(SetVRDEProperty) (IN_BSTR aKey, IN_BSTR aValue);
88 STDMETHOD(GetVRDEProperty) (IN_BSTR aKey, BSTR *aValue);
89
90 // public methods only for internal purposes
91
92 HRESULT loadSettings(const settings::VRDESettings &data);
93 HRESULT saveSettings(settings::VRDESettings &data);
94
95 void rollback();
96 void commit();
97 void copyFrom (VRDEServer *aThat);
98
99private:
100
101 Machine * const mParent;
102 const ComObjPtr<VRDEServer> mPeer;
103
104 Backupable<Data> mData;
105};
106
107#endif // ____H_VRDPSERVER
108/* 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