dplayx: Map global memory anywhere if the standard address is unavailable.
[wine.git] / include / mmdeviceapi.idl
blob1c2bb18c33c51a9fffc0bd484b56fa81460e9929
1 /*
2 * Copyright (C) 2009 Maarten Lankhorst
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.
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.
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
19 import "unknwn.idl";
20 import "propsys.idl";
22 cpp_quote("#ifndef E_NOTFOUND")
23 cpp_quote("#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)")
24 cpp_quote("#endif")
25 cpp_quote("#ifndef E_UNSUPPORTED_TYPE")
26 cpp_quote("#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)")
27 cpp_quote("#endif")
29 cpp_quote("DEFINE_GUID(DEVINTERFACE_AUDIO_RENDER, 0xe6327cad,0xdcec,0x4949,0xae,0x8a,0x99,0x1e,0x97,0x6a,0x79,0xd2);")
30 cpp_quote("DEFINE_GUID(DEVINTERFACE_AUDIO_CAPTURE, 0x2eef81be,0x33fa,0x4800,0x96,0x70,0x1c,0xd4,0x74,0x97,0x2c,0x3f);")
32 cpp_quote("#define DEVICE_STATE_ACTIVE 0x1")
33 cpp_quote("#define DEVICE_STATE_DISABLED 0x2")
34 cpp_quote("#define DEVICE_STATE_NOTPRESENT 0x4")
35 cpp_quote("#define DEVICE_STATE_UNPLUGGED 0x8")
36 cpp_quote("#define DEVICE_STATEMASK_ALL 0xf")
38 /* Generic PKEY_AudioEndPoint ID for grepping: {1da5d803-d492-4edd-8c23-e0c0ffee7f0e} */
39 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,0);")
40 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,1);")
41 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,2);")
42 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,3);")
43 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,4);")
44 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,5);")
46 cpp_quote("#define ENDPOINT_SYSFX_ENABLED 0")
47 cpp_quote("#define ENDPOINT_SYSFX_DISABLED 1")
49 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,6);")
50 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Supports_EventDriven_Mode,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,7);")
51 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_JackSubType,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,8);")
53 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat,0xf19f064d,0x082c,0x4e27,0xbc,0x73,0x68,0x82,0xa1,0xbb,0x8e,0x4c,0);")
54 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_OEMFormat,0xe4870e26,0x3cc5,0x4cd2,0xba,0x46,0xca,0x0a,0x9a,0x70,0xed,0x04,3);")
56 typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS
58 DWORD cbDirectXAudioActivationParams;
59 GUID guidAudioSession;
60 DWORD dwAudioStreamFlags;
61 } DIRECTX_AUDIO_ACTIVATION_PARAMS, *PDIRECTX_AUDIO_ACTIVATION_PARAMS;
63 typedef enum _EDataFlow
65 eRender,
66 eCapture,
67 eAll,
68 EDataFlow_enum_count
69 } EDataFlow;
71 typedef enum _ERole
73 eConsole,
74 eMultimedia,
75 eCommunications,
76 ERole_enum_count
77 } ERole;
79 typedef enum _EndpointFormFactor
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;
95 cpp_quote("#define HDMI DigitalAudioDisplayDevice")
98 object,
99 local,
100 uuid(7991eec9-7e89-4d85-8390-6c703cec60c0),
101 nonextensible,
102 pointer_default(unique)
104 interface IMMNotificationClient : IUnknown
106 [id(1)] HRESULT OnDeviceStateChanged(
107 [in] LPCWSTR pwstrDeviceId,
108 [in] DWORD dwNewState
110 [id(2)] HRESULT OnDeviceAdded(
111 [in] LPCWSTR pwstrDeviceId
113 [id(3)] HRESULT OnDeviceRemoved(
114 [in] LPCWSTR pwstrDeviceId
116 [id(4)] HRESULT OnDefaultDeviceChanged(
117 [in] EDataFlow flow,
118 [in] ERole role,
119 [in] LPCWSTR pwstrDeviceId
121 [id(5)] HRESULT OnPropertyValueChanged(
122 [in] LPCWSTR pwstrDeviceId,
123 [in] const PROPERTYKEY key
128 object,
129 local,
130 uuid(d666063f-1587-4e43-81f1-b948e807363f),
131 nonextensible,
132 pointer_default(unique)
134 interface IMMDevice : IUnknown
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
142 [id(2)] HRESULT OpenPropertyStore(
143 [in] DWORD stgmAccess,
144 [out] IPropertyStore **ppProperties
146 [id(3)] HRESULT GetId(
147 [out] LPWSTR *ppstrId
149 [id(4)] HRESULT GetState(
150 [out] DWORD *pdwState
155 object,
156 local,
157 uuid(0bd7a1be-7a1a-44db-8397-cc5392387b5e),
158 nonextensible,
159 pointer_default(unique)
161 interface IMMDeviceCollection : IUnknown
163 [id(1)] HRESULT GetCount(
164 [out] UINT *pcDevices
166 [id(2)] HRESULT Item(
167 [in] UINT nDevice,
168 [out] IMMDevice **ppdevice
173 object,
174 local,
175 uuid(1be09788-6894-4089-8586-9a2a6c265ac5),
176 nonextensible,
177 pointer_default(unique)
179 interface IMMEndpoint : IUnknown
181 [id(1)] HRESULT GetDataFlow(
182 [out] EDataFlow *pDataFlow
187 object,
188 local,
189 uuid(a95664d2-9614-4f35-a746-de8db63617e6),
190 nonextensible,
191 pointer_default(unique)
193 interface IMMDeviceEnumerator : IUnknown
195 [id(1)] HRESULT EnumAudioEndpoints(
196 [in] EDataFlow dataFlow,
197 [in] DWORD dwStateMask,
198 [out] IMMDeviceCollection **ppDevices
200 [id(2)] HRESULT GetDefaultAudioEndpoint(
201 [in] EDataFlow dataFlow,
202 [in] ERole role,
203 [out] IMMDevice **ppEndpoint
205 [id(3)] HRESULT GetDevice(
206 [in] LPCWSTR pwstrId,
207 [out] IMMDevice **ppDevice
209 [id(4)] HRESULT RegisterEndpointNotificationCallback(
210 [in] IMMNotificationClient *pClient
212 [id(5)] HRESULT UnregisterEndpointNotificationCallback(
213 [in] IMMNotificationClient *pClient
218 object,
219 local,
220 uuid(3b0d0ea4-d0a9-4b0e-935b-09516746fac0),
221 nonextensible,
222 pointer_default(unique)
224 interface IMMDeviceActivator : IUnknown
226 [id(1)] HRESULT Activate(
227 [in] REFIID iid,
228 [in] IMMDevice *pDevice,
229 [in] PROPVARIANT *pActivationParams,
230 [out,iid_is(iid)] void **ppv
234 typedef struct _AudioExtensionParams
236 LPARAM AddPageParam;
237 IMMDevice *pEndPoint;
238 IMMDevice *pPnpInterface;
239 IMMDevice *pPnpDevnode;
240 } AudioExtensionParams;
243 object,
244 local,
245 uuid(72a22d78-cde4-431d-b8cc-843a71199b6d),
246 nonextensible,
247 pointer_default(unique)
249 interface IActivateAudioInterfaceAsyncOperation : IUnknown
251 HRESULT GetActivateResult(
252 [out] HRESULT *result,
253 [out] IUnknown **iface
258 object,
259 local,
260 uuid(41d949ab-9862-444a-80f6-c261334da5eb),
261 nonextensible,
262 pointer_default(unique)
264 interface IActivateAudioInterfaceCompletionHandler : IUnknown
266 HRESULT ActivateCompleted(
267 [in] IActivateAudioInterfaceAsyncOperation *op
271 cpp_quote("HRESULT WINAPI ActivateAudioInterfaceAsync(")
272 cpp_quote(" const WCHAR *path, REFIID riid, PROPVARIANT *params,")
273 cpp_quote(" IActivateAudioInterfaceCompletionHandler *done_handler,")
274 cpp_quote(" IActivateAudioInterfaceAsyncOperation **op);")
277 uuid(2fdaafa3-7523-4f66-9957-9d5e7fe698f6),
278 version(1.0)
280 library MMDeviceAPILib
282 [ uuid(bcde0395-e52f-467c-8e3d-c4579291692e) ] coclass MMDeviceEnumerator
284 [default] interface IMMDeviceEnumerator;