VirtualBox

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

Last change on this file since 94660 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: RecordingSettingsImpl.h 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation - Machine recording screen settings.
4 */
5
6/*
7 * Copyright (C) 2018-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef MAIN_INCLUDED_RecordingSettingsImpl_h
19#define MAIN_INCLUDED_RecordingSettingsImpl_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include "RecordingSettingsWrap.h"
25
26namespace settings
27{
28 struct RecordingSettings;
29 struct RecordingScreenSettings;
30}
31
32class RecordingScreenSettings;
33
34class ATL_NO_VTABLE RecordingSettings
35 : public RecordingSettingsWrap
36{
37public:
38
39 DECLARE_COMMON_CLASS_METHODS(RecordingSettings)
40
41 HRESULT FinalConstruct();
42 void FinalRelease();
43
44 // public initializer/uninitializer for internal purposes only
45 HRESULT init(Machine *parent);
46 HRESULT init(Machine *parent, RecordingSettings *aThat);
47 HRESULT initCopy(Machine *parent, RecordingSettings *aThat);
48 void uninit();
49
50 // public methods only for internal purposes
51 HRESULT i_loadSettings(const settings::RecordingSettings &data);
52 HRESULT i_saveSettings(settings::RecordingSettings &data);
53
54 void i_rollback();
55 void i_commit();
56 void i_copyFrom(RecordingSettings *aThat);
57 void i_applyDefaults(void);
58
59 int i_getDefaultFilename(Utf8Str &strFile, bool fWithFileExtension);
60 bool i_canChangeSettings(void);
61 void i_onSettingsChanged(void);
62
63private:
64
65 /** Map of screen settings objects. The key specifies the screen ID. */
66 typedef std::map <uint32_t, ComObjPtr<RecordingScreenSettings> > RecordScreenSettingsMap;
67
68 void i_reset(void);
69 int i_syncToMachineDisplays(uint32_t cMonitors);
70 int i_createScreenObj(RecordScreenSettingsMap &screenSettingsMap, uint32_t uScreenId, const settings::RecordingScreenSettings &data);
71 int i_destroyScreenObj(RecordScreenSettingsMap &screenSettingsMap, uint32_t uScreenId);
72 int i_destroyAllScreenObj(RecordScreenSettingsMap &screenSettingsMap);
73
74private:
75
76 // wrapped IRecordingSettings properties
77 HRESULT getEnabled(BOOL *enabled);
78 HRESULT setEnabled(BOOL enable);
79 HRESULT getScreens(std::vector<ComPtr<IRecordingScreenSettings> > &aRecordScreenSettings);
80
81 // wrapped IRecordingSettings methods
82 HRESULT getScreenSettings(ULONG uScreenId, ComPtr<IRecordingScreenSettings> &aRecordScreenSettings);
83
84private:
85
86 struct Data;
87 Data *m;
88};
89
90#endif /* !MAIN_INCLUDED_RecordingSettingsImpl_h */
91
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