1 | /* $Id: VRDEServerImpl.h 34244 2010-11-22 14:31:02Z 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/VRDPAuth.h>
|
---|
26 | #include <VBox/settings.h>
|
---|
27 |
|
---|
28 | class ATL_NO_VTABLE VRDEServer :
|
---|
29 | public VirtualBoxBase,
|
---|
30 | VBOX_SCRIPTABLE_IMPL(IVRDEServer)
|
---|
31 | {
|
---|
32 | public:
|
---|
33 |
|
---|
34 | struct Data
|
---|
35 | {
|
---|
36 | BOOL mEnabled;
|
---|
37 | AuthType_T mAuthType;
|
---|
38 | ULONG mAuthTimeout;
|
---|
39 | BOOL mAllowMultiConnection;
|
---|
40 | BOOL mReuseSingleConnection;
|
---|
41 | BOOL mVideoChannel;
|
---|
42 | ULONG mVideoChannelQuality;
|
---|
43 | Utf8Str mVrdeExtPack;
|
---|
44 | settings::StringsMap mProperties;
|
---|
45 | };
|
---|
46 |
|
---|
47 | VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VRDEServer, IVRDEServer)
|
---|
48 |
|
---|
49 | DECLARE_NOT_AGGREGATABLE(VRDEServer)
|
---|
50 |
|
---|
51 | DECLARE_PROTECT_FINAL_CONSTRUCT()
|
---|
52 |
|
---|
53 | BEGIN_COM_MAP(VRDEServer)
|
---|
54 | COM_INTERFACE_ENTRY (ISupportErrorInfo)
|
---|
55 | COM_INTERFACE_ENTRY (IVRDEServer)
|
---|
56 | COM_INTERFACE_ENTRY2 (IDispatch, IVRDEServer)
|
---|
57 | END_COM_MAP()
|
---|
58 |
|
---|
59 | DECLARE_EMPTY_CTOR_DTOR (VRDEServer)
|
---|
60 |
|
---|
61 | HRESULT FinalConstruct();
|
---|
62 | void FinalRelease();
|
---|
63 |
|
---|
64 | // public initializer/uninitializer for internal purposes only
|
---|
65 | HRESULT init(Machine *aParent);
|
---|
66 | HRESULT init(Machine *aParent, VRDEServer *aThat);
|
---|
67 | HRESULT initCopy (Machine *aParent, VRDEServer *aThat);
|
---|
68 | void uninit();
|
---|
69 |
|
---|
70 | // IVRDEServer properties
|
---|
71 | STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
|
---|
72 | STDMETHOD(COMSETTER(Enabled)) (BOOL aEnable);
|
---|
73 | STDMETHOD(COMGETTER(AuthType)) (AuthType_T *aType);
|
---|
74 | STDMETHOD(COMSETTER(AuthType)) (AuthType_T aType);
|
---|
75 | STDMETHOD(COMGETTER(AuthTimeout)) (ULONG *aTimeout);
|
---|
76 | STDMETHOD(COMSETTER(AuthTimeout)) (ULONG aTimeout);
|
---|
77 | STDMETHOD(COMGETTER(AllowMultiConnection)) (BOOL *aAllowMultiConnection);
|
---|
78 | STDMETHOD(COMSETTER(AllowMultiConnection)) (BOOL aAllowMultiConnection);
|
---|
79 | STDMETHOD(COMGETTER(ReuseSingleConnection)) (BOOL *aReuseSingleConnection);
|
---|
80 | STDMETHOD(COMSETTER(ReuseSingleConnection)) (BOOL aReuseSingleConnection);
|
---|
81 | STDMETHOD(COMGETTER(VideoChannel)) (BOOL *aVideoChannel);
|
---|
82 | STDMETHOD(COMSETTER(VideoChannel)) (BOOL aVideoChannel);
|
---|
83 | STDMETHOD(COMGETTER(VideoChannelQuality)) (ULONG *aVideoChannelQuality);
|
---|
84 | STDMETHOD(COMSETTER(VideoChannelQuality)) (ULONG aVideoChannelQuality);
|
---|
85 | STDMETHOD(COMGETTER(VRDEExtPack))(BSTR *aExtPack);
|
---|
86 | STDMETHOD(COMSETTER(VRDEExtPack))(IN_BSTR aExtPack);
|
---|
87 |
|
---|
88 | // IVRDEServer methods
|
---|
89 | STDMETHOD(SetVRDEProperty) (IN_BSTR aKey, IN_BSTR aValue);
|
---|
90 | STDMETHOD(GetVRDEProperty) (IN_BSTR aKey, BSTR *aValue);
|
---|
91 |
|
---|
92 | // public methods only for internal purposes
|
---|
93 |
|
---|
94 | HRESULT loadSettings(const settings::VRDESettings &data);
|
---|
95 | HRESULT saveSettings(settings::VRDESettings &data);
|
---|
96 |
|
---|
97 | void rollback();
|
---|
98 | void commit();
|
---|
99 | void copyFrom (VRDEServer *aThat);
|
---|
100 |
|
---|
101 | private:
|
---|
102 |
|
---|
103 | Machine * const mParent;
|
---|
104 | const ComObjPtr<VRDEServer> mPeer;
|
---|
105 |
|
---|
106 | Backupable<Data> mData;
|
---|
107 | };
|
---|
108 |
|
---|
109 | #endif // ____H_VRDPSERVER
|
---|
110 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|