VirtualBox

source: vbox/trunk/src/VBox/Main/include/AudioAdapterImpl.h@ 30714

Last change on this file since 30714 was 30714, checked in by vboxsync, 15 years ago

Main: remove SupportErrorInfo template magic

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/* $Id: AudioAdapterImpl.h 30714 2010-07-07 16:20:03Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2007 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.215389.xyz. 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_AUDIOADAPTER
21#define ____H_AUDIOADAPTER
22
23#include "VirtualBoxBase.h"
24
25namespace settings
26{
27 struct AudioAdapter;
28}
29
30class ATL_NO_VTABLE AudioAdapter :
31 public VirtualBoxBase,
32 public VirtualBoxSupportTranslation<AudioAdapter>,
33 VBOX_SCRIPTABLE_IMPL(IAudioAdapter)
34{
35public:
36
37 struct Data
38 {
39 Data();
40
41 BOOL mEnabled;
42 AudioDriverType_T mAudioDriver;
43 AudioControllerType_T mAudioController;
44 };
45
46 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(AudioAdapter, IAudioAdapter)
47
48 DECLARE_NOT_AGGREGATABLE(AudioAdapter)
49
50 DECLARE_PROTECT_FINAL_CONSTRUCT()
51
52 BEGIN_COM_MAP(AudioAdapter)
53 COM_INTERFACE_ENTRY(ISupportErrorInfo)
54 COM_INTERFACE_ENTRY(IAudioAdapter)
55 COM_INTERFACE_ENTRY(IDispatch)
56 END_COM_MAP()
57
58 DECLARE_EMPTY_CTOR_DTOR (AudioAdapter)
59
60 HRESULT FinalConstruct();
61 void FinalRelease();
62
63 // public initializer/uninitializer for internal purposes only
64 HRESULT init(Machine *aParent);
65 HRESULT init(Machine *aParent, AudioAdapter *aThat);
66 HRESULT initCopy(Machine *aParent, AudioAdapter *aThat);
67 void uninit();
68
69 STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
70 STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
71 STDMETHOD(COMGETTER(AudioDriver))(AudioDriverType_T *aAudioDriverType);
72 STDMETHOD(COMSETTER(AudioDriver))(AudioDriverType_T aAudioDriverType);
73 STDMETHOD(COMGETTER(AudioController))(AudioControllerType_T *aAudioControllerType);
74 STDMETHOD(COMSETTER(AudioController))(AudioControllerType_T aAudioControllerType);
75
76 // public methods only for internal purposes
77
78 HRESULT loadSettings(const settings::AudioAdapter &data);
79 HRESULT saveSettings(settings::AudioAdapter &data);
80
81 void rollback();
82 void commit();
83 void copyFrom(AudioAdapter *aThat);
84
85private:
86
87 Machine * const mParent;
88 const ComObjPtr<AudioAdapter> mPeer;
89
90 Backupable<Data> mData;
91};
92
93#endif // ____H_AUDIOADAPTER
94/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette