source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/mmdeviceapi.idl@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 8.1 KB
RevLine 
[1166]1/*
2 * Copyright (C) 2009 Maarten Lankhorst
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19import "unknwn.idl";
20import "propsys.idl";
21
22cpp_quote("#ifndef E_NOTFOUND")
23cpp_quote("#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)")
24cpp_quote("#endif")
25cpp_quote("#ifndef E_UNSUPPORTED_TYPE")
26cpp_quote("#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)")
27cpp_quote("#endif")
28
29cpp_quote("DEFINE_GUID(DEVINTERFACE_AUDIO_RENDER, 0xe6327cad,0xdcec,0x4949,0xae,0x8a,0x99,0x1e,0x97,0x6a,0x79,0xd2);")
30cpp_quote("DEFINE_GUID(DEVINTERFACE_AUDIO_CAPTURE, 0x2eef81be,0x33fa,0x4800,0x96,0x70,0x1c,0xd4,0x74,0x97,0x2c,0x3f);")
31
32cpp_quote("#define DEVICE_STATE_ACTIVE 0x1")
33cpp_quote("#define DEVICE_STATE_DISABLED 0x2")
34cpp_quote("#define DEVICE_STATE_NOTPRESENT 0x4")
35cpp_quote("#define DEVICE_STATE_UNPLUGGED 0x8")
36cpp_quote("#define DEVICE_STATEMASK_ALL 0xf")
37
38/* Generic PKEY_AudioEndPoint ID for grepping: {1da5d803-d492-4edd-8c23-e0c0ffee7f0e} */
39cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,0);")
40cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,1);")
41cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,2);")
42cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,3);")
43cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,4);")
44cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,5);")
45
46cpp_quote("#define ENDPOINT_SYSFX_ENABLED 0")
47cpp_quote("#define ENDPOINT_SYSFX_DISABLED 1")
48
49cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,6);")
50cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Supports_EventDriven_Mode,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,7);")
51cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_JackSubType,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,8);")
52
53cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat,0xf19f064d,0x082c,0x4e27,0xbc,0x73,0x68,0x82,0xa1,0xbb,0x8e,0x4c,0);")
54cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_OEMFormat,0xe4870e26,0x3cc5,0x4cd2,0xba,0x46,0xca,0x0a,0x9a,0x70,0xed,0x04,3);")
55
56typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS
57{
58 DWORD cbDirectXAudioActivationParams;
59 GUID guidAudioSession;
60 DWORD dwAudioStreamFlags;
61} DIRECTX_AUDIO_ACTIVATION_PARAMS, *PDIRECTX_AUDIO_ACTIVATION_PARAMS;
62
63typedef enum _EDataFlow
64{
65 eRender,
66 eCapture,
67 eAll,
68 EDataFlow_enum_count
69} EDataFlow;
70
71typedef enum _ERole
72{
73 eConsole,
74 eMultimedia,
75 eCommunications,
76 ERole_enum_count
77} ERole;
78
79typedef enum _EndpointFormFactor
80{
81 RemoteNetworkDevice,
82 Speakers,
83 LineLevel,
84 Headphones,
85 Microphone,
86 Headset,
87 Handset,
88 UnknownDigitalPassthrough,
89 SPDIF,
90 DigitalAudioDisplayDevice,
91 UnknownFormFactor,
92 EndpointFormFactor_enum_count
93} EndpointFormFactor;
94
95cpp_quote("#define HDMI DigitalAudioDisplayDevice")
96
97[
98 object,
99 local,
100 uuid(7991eec9-7e89-4d85-8390-6c703cec60c0),
101 nonextensible,
102 pointer_default(unique)
103]
104interface IMMNotificationClient : IUnknown
105{
106 [id(1)] HRESULT OnDeviceStateChanged(
107 [in] LPCWSTR pwstrDeviceId,
108 [in] DWORD dwNewState
109 );
110 [id(2)] HRESULT OnDeviceAdded(
111 [in] LPCWSTR pwstrDeviceId
112 );
113 [id(3)] HRESULT OnDeviceRemoved(
114 [in] LPCWSTR pwstrDeviceId
115 );
116 [id(4)] HRESULT OnDefaultDeviceChanged(
117 [in] EDataFlow flow,
118 [in] ERole role,
119 [in] LPCWSTR pwstrDeviceId
120 );
121 [id(5)] HRESULT OnPropertyValueChanged(
122 [in] LPCWSTR pwstrDeviceId,
123 [in] const PROPERTYKEY key
124 );
125}
126
127[
128 object,
129 local,
130 uuid(d666063f-1587-4e43-81f1-b948e807363f),
131 nonextensible,
132 pointer_default(unique)
133]
134interface IMMDevice : IUnknown
135{
136 [id(1)] HRESULT Activate(
137 [in] REFIID iid,
138 [in] DWORD dwClsCtx,
139 [in,unique] PROPVARIANT *pActivationParams,
140 [out,iid_is(iid)] void **ppv
141 );
142 [id(2)] HRESULT OpenPropertyStore(
143 [in] DWORD stgmAccess,
144 [out] IPropertyStore **ppProperties
145 );
146 [id(3)] HRESULT GetId(
147 [out] LPWSTR *ppstrId
148 );
149 [id(4)] HRESULT GetState(
150 [out] DWORD *pdwState
151 );
152}
153
154[
155 object,
156 local,
157 uuid(0bd7a1be-7a1a-44db-8397-cc5392387b5e),
158 nonextensible,
159 pointer_default(unique)
160]
161interface IMMDeviceCollection : IUnknown
162{
163 [id(1)] HRESULT GetCount(
164 [out] UINT *pcDevices
165 );
166 [id(2)] HRESULT Item(
167 [in] UINT nDevice,
168 [out] IMMDevice **ppdevice
169 );
170}
171
172[
173 object,
174 local,
175 uuid(1be09788-6894-4089-8586-9a2a6c265ac5),
176 nonextensible,
177 pointer_default(unique)
178]
179interface IMMEndpoint : IUnknown
180{
181 [id(1)] HRESULT GetDataFlow(
182 [out] EDataFlow *pDataFlow
183 );
184}
185
186[
187 object,
188 local,
189 uuid(a95664d2-9614-4f35-a746-de8db63617e6),
190 nonextensible,
191 pointer_default(unique)
192]
193interface IMMDeviceEnumerator : IUnknown
194{
195 [id(1)] HRESULT EnumAudioEndpoints(
196 [in] EDataFlow dataFlow,
197 [in] DWORD dwStateMask,
198 [out] IMMDeviceCollection **ppDevices
199 );
200 [id(2)] HRESULT GetDefaultAudioEndpoint(
201 [in] EDataFlow dataFlow,
202 [in] ERole role,
203 [out] IMMDevice **ppEndpoint
204 );
205 [id(3)] HRESULT GetDevice(
206 [in] LPCWSTR pwstrId,
207 [out] IMMDevice **ppDevice
208 );
209 [id(4)] HRESULT RegisterEndpointNotificationCallback(
210 [in] IMMNotificationClient *pClient
211 );
212 [id(5)] HRESULT UnregisterEndpointNotificationCallback(
213 [in] IMMNotificationClient *pClient
214 );
215}
216
217[
218 object,
219 local,
220 uuid(3b0d0ea4-d0a9-4b0e-935b-09516746fac0),
221 nonextensible,
222 pointer_default(unique)
223]
224interface IMMDeviceActivator : IUnknown
225{
226 [id(1)] HRESULT Activate(
227 [in] REFIID iid,
228 [in] IMMDevice *pDevice,
229 [in] PROPVARIANT *pActivationParams,
230 [out,iid_is(iid)] void **ppv
231 );
232}
233
234typedef struct _AudioExtensionParams
235{
236 LPARAM AddPageParam;
237 IMMDevice *pEndPoint;
238 IMMDevice *pPnpInterface;
239 IMMDevice *pPnpDevnode;
240} AudioExtensionParams;
241
242[
243 object,
244 local,
245 uuid(72a22d78-cde4-431d-b8cc-843a71199b6d),
246 nonextensible,
247 pointer_default(unique)
248]
249interface IActivateAudioInterfaceAsyncOperation : IUnknown
250{
251 HRESULT GetActivateResult(
252 [out] HRESULT *result,
253 [out] IUnknown **iface
254 );
255}
256
257[
258 object,
259 local,
260 uuid(41d949ab-9862-444a-80f6-c261334da5eb),
261 nonextensible,
262 pointer_default(unique)
263]
264interface IActivateAudioInterfaceCompletionHandler : IUnknown
265{
266 HRESULT ActivateCompleted(
267 [in] IActivateAudioInterfaceAsyncOperation *op
268 );
269}
270
271cpp_quote("HRESULT WINAPI ActivateAudioInterfaceAsync(")
272cpp_quote(" const WCHAR *path, REFIID riid, PROPVARIANT *params,")
273cpp_quote(" IActivateAudioInterfaceCompletionHandler *done_handler,")
274cpp_quote(" IActivateAudioInterfaceAsyncOperation **op);")
275
276[
277 uuid(2fdaafa3-7523-4f66-9957-9d5e7fe698f6),
278 version(1.0)
279]
280library MMDeviceAPILib
281{
282 [ uuid(bcde0395-e52f-467c-8e3d-c4579291692e) ] coclass MMDeviceEnumerator
283 {
284 [default] interface IMMDeviceEnumerator;
285 }
286}
Note: See TracBrowser for help on using the repository browser.