VirtualBox

source: vbox/trunk/src/VBox/Main/include/RecordingSettingsImpl.h@ 98694

Last change on this file since 98694 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: RecordingSettingsImpl.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation - Machine recording screen settings.
4 */
5
6/*
7 * Copyright (C) 2018-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef MAIN_INCLUDED_RecordingSettingsImpl_h
29#define MAIN_INCLUDED_RecordingSettingsImpl_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "RecordingSettingsWrap.h"
35
36namespace settings
37{
38 struct RecordingSettings;
39 struct RecordingScreenSettings;
40}
41
42class RecordingScreenSettings;
43
44class ATL_NO_VTABLE RecordingSettings
45 : public RecordingSettingsWrap
46{
47public:
48
49 DECLARE_COMMON_CLASS_METHODS(RecordingSettings)
50
51 HRESULT FinalConstruct();
52 void FinalRelease();
53
54 // public initializer/uninitializer for internal purposes only
55 HRESULT init(Machine *parent);
56 HRESULT init(Machine *parent, RecordingSettings *aThat);
57 HRESULT initCopy(Machine *parent, RecordingSettings *aThat);
58 void uninit();
59
60 // public methods only for internal purposes
61 HRESULT i_loadSettings(const settings::RecordingSettings &data);
62 HRESULT i_saveSettings(settings::RecordingSettings &data);
63
64 void i_rollback(void);
65 void i_commit(void);
66 HRESULT i_copyFrom(RecordingSettings *aThat);
67 void i_applyDefaults(void);
68
69 int i_getDefaultFilename(Utf8Str &strFile, uint32_t idScreen, bool fWithFileExtension);
70 int i_getFilename(Utf8Str &strFile, uint32_t idScreen, const Utf8Str &strTemplate);
71 bool i_canChangeSettings(void);
72 void i_onSettingsChanged(void);
73
74private:
75
76 /** Map of screen settings objects. The key specifies the screen ID. */
77 typedef std::map <uint32_t, ComObjPtr<RecordingScreenSettings> > RecordingScreenSettingsObjMap;
78
79 void i_reset(void);
80 int i_syncToMachineDisplays(uint32_t cDisplays);
81 int i_createScreenObj(RecordingScreenSettingsObjMap &screenSettingsMap, uint32_t idScreen, const settings::RecordingScreenSettings &data);
82 int i_destroyScreenObj(RecordingScreenSettingsObjMap &screenSettingsMap, uint32_t idScreen);
83 int i_destroyAllScreenObj(RecordingScreenSettingsObjMap &screenSettingsMap);
84
85private:
86
87 // wrapped IRecordingSettings properties
88 HRESULT getEnabled(BOOL *enabled);
89 HRESULT setEnabled(BOOL enable);
90 HRESULT getScreens(std::vector<ComPtr<IRecordingScreenSettings> > &aRecordScreenSettings);
91
92 // wrapped IRecordingSettings methods
93 HRESULT getScreenSettings(ULONG uScreenId, ComPtr<IRecordingScreenSettings> &aRecordScreenSettings);
94
95private:
96
97 struct Data;
98 Data *m;
99};
100
101#endif /* !MAIN_INCLUDED_RecordingSettingsImpl_h */
102
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