1 | /* $Id: CaptureSettingsImpl.h 75251 2018-11-05 17:55:29Z 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_CAPTURESETTINGS
|
---|
21 | #define ____H_CAPTURESETTINGS
|
---|
22 |
|
---|
23 | #include "CaptureSettingsWrap.h"
|
---|
24 |
|
---|
25 | namespace settings
|
---|
26 | {
|
---|
27 | struct CaptureSettings;
|
---|
28 | }
|
---|
29 |
|
---|
30 | class ICaptureScreenSettings;
|
---|
31 | class CaptureScreenSettings;
|
---|
32 |
|
---|
33 | class ATL_NO_VTABLE CaptureSettings :
|
---|
34 | public CaptureSettingsWrap
|
---|
35 | {
|
---|
36 | public:
|
---|
37 |
|
---|
38 | DECLARE_EMPTY_CTOR_DTOR(CaptureSettings)
|
---|
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, CaptureSettings *that);
|
---|
46 | HRESULT initCopy(Machine *parent, CaptureSettings *that);
|
---|
47 | void uninit();
|
---|
48 |
|
---|
49 | // public methods only for internal purposes
|
---|
50 | HRESULT i_loadSettings(const settings::CaptureSettings &data);
|
---|
51 | HRESULT i_saveSettings(settings::CaptureSettings &data);
|
---|
52 |
|
---|
53 | void i_rollback();
|
---|
54 | void i_commit();
|
---|
55 | void i_copyFrom(CaptureSettings *aThat);
|
---|
56 | void i_applyDefaults(void);
|
---|
57 |
|
---|
58 | private:
|
---|
59 |
|
---|
60 | // wrapped ICaptureSettings properties
|
---|
61 | HRESULT getEnabled(BOOL *enabled);
|
---|
62 | HRESULT setEnabled(BOOL enable);
|
---|
63 | HRESULT getScreens(std::vector<ComPtr<ICaptureScreenSettings> > &aCaptureScreenSettings);
|
---|
64 |
|
---|
65 | // wrapped ICaptureSettings methods
|
---|
66 | HRESULT getScreenSettings(ULONG uScreenId, ComPtr<ICaptureScreenSettings> &aCaptureScreenSettings);
|
---|
67 |
|
---|
68 | private:
|
---|
69 |
|
---|
70 | /** Map of screen settings objects. The key specifies the screen ID. */
|
---|
71 | typedef std::map <ULONG, ComObjPtr<CaptureScreenSettings> > CaptureScreenSettingsMap;
|
---|
72 |
|
---|
73 | struct Data;
|
---|
74 | Data *m;
|
---|
75 | };
|
---|
76 | #endif // ____H_CAPTURESETTINGS
|
---|
77 |
|
---|