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