VirtualBox

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

Last change on this file since 76319 was 75926, checked in by vboxsync, 6 years ago

Main,Frontends: s/FileName/Filename/g (API); Took a shot a completing the code for populating IGuestFsObjInfo. bugref:9320

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: RecordingSettingsImpl.h 75926 2018-12-03 21:52:50Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation - Machine recording screen settings.
4 */
5
6/*
7 * Copyright (C) 2018 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 ____H_RecordSettings
19#define ____H_RecordSettings
20
21#include "RecordingSettingsWrap.h"
22
23namespace settings
24{
25 struct RecordingSettings;
26 struct RecordingScreenSettings;
27}
28
29class RecordingScreenSettings;
30
31class ATL_NO_VTABLE RecordingSettings
32 : public RecordingSettingsWrap
33{
34public:
35
36 DECLARE_EMPTY_CTOR_DTOR(RecordingSettings)
37
38 HRESULT FinalConstruct();
39 void FinalRelease();
40
41 // public initializer/uninitializer for internal purposes only
42 HRESULT init(Machine *parent);
43 HRESULT init(Machine *parent, RecordingSettings *that);
44 HRESULT initCopy(Machine *parent, RecordingSettings *that);
45 void uninit();
46
47 // public methods only for internal purposes
48 HRESULT i_loadSettings(const settings::RecordingSettings &data);
49 HRESULT i_saveSettings(settings::RecordingSettings &data);
50
51 void i_rollback();
52 void i_commit();
53 void i_copyFrom(RecordingSettings *aThat);
54 void i_applyDefaults(void);
55
56 int i_getDefaultFilename(Utf8Str &strFile, bool fWithFileExtension);
57 bool i_canChangeSettings(void);
58 void i_onSettingsChanged(void);
59
60private:
61
62 /** Map of screen settings objects. The key specifies the screen ID. */
63 typedef std::map <uint32_t, ComObjPtr<RecordingScreenSettings> > RecordScreenSettingsMap;
64
65 void i_reset(void);
66 int i_syncToMachineDisplays(void);
67 int i_createScreenObj(RecordScreenSettingsMap &screenSettingsMap, uint32_t uScreenId, const settings::RecordingScreenSettings &data);
68 int i_destroyScreenObj(RecordScreenSettingsMap &screenSettingsMap, uint32_t uScreenId);
69 int i_destroyAllScreenObj(RecordScreenSettingsMap &screenSettingsMap);
70
71private:
72
73 // wrapped IRecordingSettings properties
74 HRESULT getEnabled(BOOL *enabled);
75 HRESULT setEnabled(BOOL enable);
76 HRESULT getScreens(std::vector<ComPtr<IRecordingScreenSettings> > &aRecordScreenSettings);
77
78 // wrapped IRecordingSettings methods
79 HRESULT getScreenSettings(ULONG uScreenId, ComPtr<IRecordingScreenSettings> &aRecordScreenSettings);
80
81private:
82
83 struct Data;
84 Data *m;
85};
86
87#endif // !____H_RecordSettings
88
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