VirtualBox

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

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

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: AudioAdapterImpl.h 28800 2010-04-27 08:22:32Z 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.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_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 VirtualBoxSupportErrorInfoImpl<AudioAdapter, IAudioAdapter>,
33 public VirtualBoxSupportTranslation<AudioAdapter>,
34 VBOX_SCRIPTABLE_IMPL(IAudioAdapter)
35{
36public:
37
38 struct Data
39 {
40 Data();
41
42 BOOL mEnabled;
43 AudioDriverType_T mAudioDriver;
44 AudioControllerType_T mAudioController;
45 };
46
47 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (AudioAdapter)
48
49 DECLARE_NOT_AGGREGATABLE(AudioAdapter)
50
51 DECLARE_PROTECT_FINAL_CONSTRUCT()
52
53 BEGIN_COM_MAP(AudioAdapter)
54 COM_INTERFACE_ENTRY(ISupportErrorInfo)
55 COM_INTERFACE_ENTRY(IAudioAdapter)
56 COM_INTERFACE_ENTRY(IDispatch)
57 END_COM_MAP()
58
59 DECLARE_EMPTY_CTOR_DTOR (AudioAdapter)
60
61 HRESULT FinalConstruct();
62 void FinalRelease();
63
64 // public initializer/uninitializer for internal purposes only
65 HRESULT init(Machine *aParent);
66 HRESULT init(Machine *aParent, AudioAdapter *aThat);
67 HRESULT initCopy(Machine *aParent, AudioAdapter *aThat);
68 void uninit();
69
70 STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
71 STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
72 STDMETHOD(COMGETTER(AudioDriver))(AudioDriverType_T *aAudioDriverType);
73 STDMETHOD(COMSETTER(AudioDriver))(AudioDriverType_T aAudioDriverType);
74 STDMETHOD(COMGETTER(AudioController))(AudioControllerType_T *aAudioControllerType);
75 STDMETHOD(COMSETTER(AudioController))(AudioControllerType_T aAudioControllerType);
76
77 // public methods only for internal purposes
78
79 HRESULT loadSettings(const settings::AudioAdapter &data);
80 HRESULT saveSettings(settings::AudioAdapter &data);
81
82 void rollback();
83 void commit();
84 void copyFrom(AudioAdapter *aThat);
85
86 // for VirtualBoxSupportErrorInfoImpl
87 static const wchar_t *getComponentName() { return L"AudioAdapter"; }
88
89private:
90
91 Machine * const mParent;
92 const ComObjPtr<AudioAdapter> mPeer;
93
94 Backupable<Data> mData;
95};
96
97#endif // ____H_AUDIOADAPTER
98/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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