VirtualBox

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

Last change on this file since 75663 was 75418, checked in by vboxsync, 6 years ago

Recording/Main: Made the IRecordingScreenSettings::fileName getters and setters a bit more convenient by automatically returning the VM's default recording file name if no value or a simple dot ('.') is set.

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