VirtualBox

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

Last change on this file since 106901 was 106061, checked in by vboxsync, 3 months 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.4 KB
Line 
1/* $Id: RecordingSettingsImpl.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation - Machine recording screen settings.
4 */
5
6/*
7 * Copyright (C) 2018-2024 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 Recording;
39 struct RecordingScreen;
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::Recording &Settings);
62 HRESULT i_saveSettings(settings::Recording &Settings);
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_progressSet(uint64_t msTimestamp);
81 int i_start(void);
82 int i_stop(void);
83 int i_syncToMachineDisplays(uint32_t cDisplays);
84 int i_createScreenObj(RecordingScreenSettingsObjMap &screenSettingsMap, uint32_t idScreen, const settings::RecordingScreen &data);
85 int i_destroyScreenObj(RecordingScreenSettingsObjMap &screenSettingsMap, uint32_t idScreen);
86 int i_destroyAllScreenObj(RecordingScreenSettingsObjMap &screenSettingsMap);
87
88private:
89
90 // wrapped IRecordingSettings properties
91 HRESULT getEnabled(BOOL *enabled);
92 HRESULT setEnabled(BOOL enable);
93 HRESULT getScreens(std::vector<ComPtr<IRecordingScreenSettings> > &aRecordScreenSettings);
94 HRESULT getProgress(ComPtr<IProgress> &aProgress);
95
96 // wrapped IRecordingSettings methods
97 HRESULT getScreenSettings(ULONG uScreenId, ComPtr<IRecordingScreenSettings> &aRecordScreenSettings);
98 HRESULT start(ComPtr<IProgress> &aProgress);
99
100private:
101
102 struct Data;
103 Data *m;
104};
105
106#endif /* !MAIN_INCLUDED_RecordingSettingsImpl_h */
107
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