1 | /** @file
|
---|
2 | *
|
---|
3 | * VirtualBox COM class implementation
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006 InnoTek Systemberatung GmbH
|
---|
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 as published by the Free Software Foundation,
|
---|
13 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * If you received this file as part of a commercial VirtualBox
|
---|
18 | * distribution, then only the terms of your commercial VirtualBox
|
---|
19 | * license agreement apply instead of the previous paragraph.
|
---|
20 | */
|
---|
21 |
|
---|
22 | #ifndef ____H_MACHINEDEBUGGER
|
---|
23 | #define ____H_MACHINEDEBUGGER
|
---|
24 |
|
---|
25 | #include "VirtualBoxBase.h"
|
---|
26 |
|
---|
27 | class Console;
|
---|
28 |
|
---|
29 | class ATL_NO_VTABLE MachineDebugger :
|
---|
30 | public VirtualBoxSupportErrorInfoImpl <MachineDebugger, IMachineDebugger>,
|
---|
31 | public VirtualBoxSupportTranslation <MachineDebugger>,
|
---|
32 | public VirtualBoxBase,
|
---|
33 | public IMachineDebugger
|
---|
34 | {
|
---|
35 | public:
|
---|
36 |
|
---|
37 | DECLARE_NOT_AGGREGATABLE(MachineDebugger)
|
---|
38 |
|
---|
39 | DECLARE_PROTECT_FINAL_CONSTRUCT()
|
---|
40 |
|
---|
41 | BEGIN_COM_MAP(MachineDebugger)
|
---|
42 | COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
---|
43 | COM_INTERFACE_ENTRY(IMachineDebugger)
|
---|
44 | END_COM_MAP()
|
---|
45 |
|
---|
46 | NS_DECL_ISUPPORTS
|
---|
47 |
|
---|
48 | HRESULT FinalConstruct();
|
---|
49 | void FinalRelease();
|
---|
50 |
|
---|
51 | // public initializer/uninitializer for internal purposes only
|
---|
52 | HRESULT init (Console *parent);
|
---|
53 | void uninit();
|
---|
54 |
|
---|
55 | // IMachineDebugger properties
|
---|
56 | STDMETHOD(COMGETTER(Singlestep))(BOOL *enabled);
|
---|
57 | STDMETHOD(COMSETTER(Singlestep))(BOOL enable);
|
---|
58 | STDMETHOD(COMGETTER(RecompileUser))(BOOL *enabled);
|
---|
59 | STDMETHOD(COMSETTER(RecompileUser))(BOOL enable);
|
---|
60 | STDMETHOD(COMGETTER(RecompileSupervisor))(BOOL *enabled);
|
---|
61 | STDMETHOD(COMSETTER(RecompileSupervisor))(BOOL enable);
|
---|
62 | STDMETHOD(COMGETTER(PATMEnabled))(BOOL *enabled);
|
---|
63 | STDMETHOD(COMSETTER(PATMEnabled))(BOOL enable);
|
---|
64 | STDMETHOD(COMGETTER(CSAMEnabled))(BOOL *enabled);
|
---|
65 | STDMETHOD(COMSETTER(CSAMEnabled))(BOOL enable);
|
---|
66 | STDMETHOD(COMGETTER(LogEnabled))(BOOL *enabled);
|
---|
67 | STDMETHOD(COMSETTER(LogEnabled))(BOOL enable);
|
---|
68 | STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *enabled);
|
---|
69 | STDMETHOD(COMGETTER(VirtualTimeRate))(ULONG *pct);
|
---|
70 | STDMETHOD(COMSETTER(VirtualTimeRate))(ULONG pct);
|
---|
71 | STDMETHOD(COMGETTER(VM))(ULONG64 *vm);
|
---|
72 |
|
---|
73 | // IMachineDebugger methods
|
---|
74 | STDMETHOD(ResetStats());
|
---|
75 | STDMETHOD(DumpStats());
|
---|
76 |
|
---|
77 | // "public-private methods"
|
---|
78 | void flushQueuedSettings();
|
---|
79 |
|
---|
80 | // for VirtualBoxSupportErrorInfoImpl
|
---|
81 | static const wchar_t *getComponentName() { return L"MachineDebugger"; }
|
---|
82 |
|
---|
83 | private:
|
---|
84 | ComObjPtr <Console, ComWeakRef> mParent;
|
---|
85 | // flags whether settings have been queued because
|
---|
86 | // they could not be sent to the VM (not up yet, etc.)
|
---|
87 | int singlestepQueued;
|
---|
88 | int recompileUserQueued;
|
---|
89 | int recompileSupervisorQueued;
|
---|
90 | int patmEnabledQueued;
|
---|
91 | int csamEnabledQueued;
|
---|
92 | int mLogEnabledQueued;
|
---|
93 | uint32_t mVirtualTimeRateQueued;
|
---|
94 | bool fFlushMode;
|
---|
95 | };
|
---|
96 |
|
---|
97 | #endif // ____H_MACHINEDEBUGGER
|
---|