1 | /* $Id: CaptureScreenSettingsImpl.h 75251 2018-11-05 17:55:29Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VirtualBox COM class implementation - Capture settings of one virtual screen.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2018 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_CAPTURESCREENSETTINGS
|
---|
21 | #define ____H_CAPTURESCREENSETTINGS
|
---|
22 |
|
---|
23 | #include "CaptureScreenSettingsWrap.h"
|
---|
24 |
|
---|
25 | namespace settings
|
---|
26 | {
|
---|
27 | struct CaptureScreenSettings;
|
---|
28 | }
|
---|
29 |
|
---|
30 | class ATL_NO_VTABLE CaptureScreenSettings :
|
---|
31 | public CaptureScreenSettingsWrap
|
---|
32 | {
|
---|
33 | public:
|
---|
34 |
|
---|
35 | DECLARE_EMPTY_CTOR_DTOR(CaptureScreenSettings)
|
---|
36 |
|
---|
37 | HRESULT FinalConstruct();
|
---|
38 | void FinalRelease();
|
---|
39 |
|
---|
40 | // public initializer/uninitializer for internal purposes only
|
---|
41 | HRESULT init(Machine *aParent, unsigned long uScreenId, const settings::CaptureScreenSettings& data);
|
---|
42 | HRESULT init(Machine *aParent, CaptureScreenSettings *that);
|
---|
43 | HRESULT initCopy(Machine *aParent, CaptureScreenSettings *that);
|
---|
44 | void uninit();
|
---|
45 |
|
---|
46 | // public methods only for internal purposes
|
---|
47 | HRESULT i_loadSettings(const settings::CaptureScreenSettings &data);
|
---|
48 | HRESULT i_saveSettings(settings::CaptureScreenSettings &data);
|
---|
49 |
|
---|
50 | void i_rollback();
|
---|
51 | void i_commit();
|
---|
52 | void i_copyFrom(CaptureScreenSettings *aThat);
|
---|
53 | void i_applyDefaults();
|
---|
54 |
|
---|
55 | private:
|
---|
56 |
|
---|
57 | // wrapped ICaptureScreenSettings methods
|
---|
58 | HRESULT isFeatureEnabled(CaptureFeature_T aFeature, BOOL *aEnabled);
|
---|
59 |
|
---|
60 | // wrapped ICaptureScreenSettings properties
|
---|
61 | HRESULT getEnabled(BOOL *enabled);
|
---|
62 | HRESULT setEnabled(BOOL enabled);
|
---|
63 | HRESULT getFeatures(ULONG *aFeatures);
|
---|
64 | HRESULT setFeatures(ULONG aFeatures);
|
---|
65 | HRESULT getDestination(CaptureDestination_T *aDestination);
|
---|
66 | HRESULT setDestination(CaptureDestination_T aDestination);
|
---|
67 |
|
---|
68 | HRESULT getFileName(com::Utf8Str &aFileName);
|
---|
69 | HRESULT setFileName(const com::Utf8Str &aFileName);
|
---|
70 | HRESULT getMaxTime(ULONG *aMaxTimeS);
|
---|
71 | HRESULT setMaxTime(ULONG aMaxTimeS);
|
---|
72 | HRESULT getMaxFileSize(ULONG *aMaxFileSizeMB);
|
---|
73 | HRESULT setMaxFileSize(ULONG aMaxFileSizeMB);
|
---|
74 | HRESULT getOptions(com::Utf8Str &aOptions);
|
---|
75 | HRESULT setOptions(const com::Utf8Str &aOptions);
|
---|
76 |
|
---|
77 | HRESULT getVideoWidth(ULONG *aVideoWidth);
|
---|
78 | HRESULT setVideoWidth(ULONG aVideoWidth);
|
---|
79 | HRESULT getVideoHeight(ULONG *aVideoHeight);
|
---|
80 | HRESULT setVideoHeight(ULONG aVideoHeight);
|
---|
81 | HRESULT getVideoRate(ULONG *aVideoRate);
|
---|
82 | HRESULT setVideoRate(ULONG aVideoRate);
|
---|
83 | HRESULT getVideoFPS(ULONG *aVideoFPS);
|
---|
84 | HRESULT setVideoFPS(ULONG aVideoFPS);
|
---|
85 |
|
---|
86 | private:
|
---|
87 |
|
---|
88 | // internal methods
|
---|
89 | bool i_canChangeSettings();
|
---|
90 | int i_getDefaultCaptureFile(Utf8Str &strFile);
|
---|
91 |
|
---|
92 | private:
|
---|
93 |
|
---|
94 | struct Data;
|
---|
95 | Data *m;
|
---|
96 | };
|
---|
97 |
|
---|
98 | #endif // ____H_CAPTURESCREENSETTINGS
|
---|
99 |
|
---|