ReactOS  0.4.14-dev-55-g2da92ac
mmdeviceapi.idl
Go to the documentation of this file.
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 
19 import "unknwn.idl";
20 import "propsys.idl";
21 
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")
28 
29 
30 cpp_quote("#define DEVICE_STATE_ACTIVE 0x1")
31 cpp_quote("#define DEVICE_STATE_DISABLED 0x2")
32 cpp_quote("#define DEVICE_STATE_NOTPRESENT 0x4")
33 cpp_quote("#define DEVICE_STATE_UNPLUGGED 0x8")
34 cpp_quote("#define DEVICE_STATEMASK_ALL 0xf")
35 
36 /* Generic PKEY_AudioEndPoint ID for grepping: {1da5d803-d492-4edd-8c23-e0c0ffee7f0e} */
37 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,0);")
38 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,1);")
39 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,2);")
40 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,3);")
41 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,4);")
42 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,5);")
43 
44 cpp_quote("#define ENDPOINT_SYSFX_ENABLED 0")
45 cpp_quote("#define ENDPOINT_SYSFX_DISABLED 1")
46 
47 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,6);")
48 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Supports_EventDriven_Mode,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,7);")
49 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_JackSubType,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,8);")
50 
51 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat,0xf19f064d,0x082c,0x4e27,0xbc,0x73,0x68,0x82,0xa1,0xbb,0x8e,0x4c,0);")
52 cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_OEMFormat,0xe4870e26,0x3cc5,0x4cd2,0xba,0x46,0xca,0x0a,0x9a,0x70,0xed,0x04,3);")
53 
55 {
60 
61 typedef enum _EDataFlow
62 {
67 } EDataFlow;
68 
69 typedef enum _ERole
70 {
75 } ERole;
76 
77 typedef enum _EndpointFormFactor
78 {
92 
93 cpp_quote("#define HDMI DigitalAudioDisplayDevice")
94 
95 [
96  object,
97  local,
98  uuid(7991eec9-7e89-4d85-8390-6c703cec60c0),
99  nonextensible,
101 ]
103 {
105  [in] LPCWSTR pwstrDeviceId,
106  [in] DWORD dwNewState
107  );
108  [id(2)] HRESULT OnDeviceAdded(
109  [in] LPCWSTR pwstrDeviceId
110  );
112  [in] LPCWSTR pwstrDeviceId
113  );
115  [in] EDataFlow flow,
116  [in] ERole role,
117  [in] LPCWSTR pwstrDeviceId
118  );
120  [in] LPCWSTR pwstrDeviceId,
121  [in] const PROPERTYKEY key
122  );
123 }
124 
125 [
126  object,
127  local,
128  uuid(d666063f-1587-4e43-81f1-b948e807363f),
129  nonextensible,
131 ]
132 interface IMMDevice : IUnknown
133 {
134  [id(1)] HRESULT Activate(
135  [in] REFIID iid,
136  [in] DWORD dwClsCtx,
137  [in,unique] PROPVARIANT *pActivationParams,
138  [out,iid_is(iid)] void **ppv
139  );
141  [in] DWORD stgmAccess,
142  [out] IPropertyStore **ppProperties
143  );
144  [id(3)] HRESULT GetId(
145  [out] LPWSTR *ppstrId
146  );
147  [id(4)] HRESULT GetState(
148  [out] DWORD *pdwState
149  );
150 }
151 
152 [
153  object,
154  local,
155  uuid(0bd7a1be-7a1a-44db-8397-cc5392387b5e),
156  nonextensible,
158 ]
160 {
161  [id(1)] HRESULT GetCount(
162  [out] UINT *pcDevices
163  );
164  [id(2)] HRESULT Item(
165  [in] UINT nDevice,
166  [out] IMMDevice **ppdevice
167  );
168 }
169 
170 [
171  object,
172  local,
173  uuid(1be09788-6894-4089-8586-9a2a6c265ac5),
174  nonextensible,
176 ]
178 {
179  [id(1)] HRESULT GetDataFlow(
180  [out] EDataFlow *pDataFlow
181  );
182 }
183 
184 [
185  object,
186  local,
187  uuid(a95664d2-9614-4f35-a746-de8db63617e6),
188  nonextensible,
190 ]
192 {
194  [in] EDataFlow dataFlow,
195  [in] DWORD dwStateMask,
196  [out] IMMDeviceCollection **ppDevices
197  );
199  [in] EDataFlow dataFlow,
200  [in] ERole role,
201  [out] IMMDevice **ppEndpoint
202  );
203  [id(3)] HRESULT GetDevice(
204  [in] LPCWSTR pwstrId,
205  [out] IMMDevice **ppDevice
206  );
208  [in] IMMNotificationClient *pClient
209  );
211  [in] IMMNotificationClient *pClient
212  );
213 }
214 
215 [
216  object,
217  local,
218  uuid(3b0d0ea4-d0a9-4b0e-935b-09516746fac0),
219  nonextensible,
221 ]
222 interface IMMDeviceActivator : IUnknown
223 {
224  [id(1)] HRESULT Activate(
225  [in] REFIID iid,
226  [in] IMMDevice *pDevice,
227  [in] PROPVARIANT *pActivationParams,
228  [out,iid_is(iid)] void **ppv
229  );
230 }
231 
232 typedef struct _AudioExtensionParams
233 {
234  LPARAM AddPageParam;
239 
240 [
241  uuid(2fdaafa3-7523-4f66-9957-9d5e7fe698f6),
242  version(1.0)
243 ]
245 {
246  [ uuid(bcde0395-e52f-467c-8e3d-c4579291692e) ] coclass MMDeviceEnumerator
247  {
248  [default] interface IMMDeviceEnumerator;
249  }
250 }
_EndpointFormFactor
Definition: mmdeviceapi.idl:77
_ERole
Definition: mmdeviceapi.idl:69
#define REFIID
Definition: guiddef.h:118
HRESULT Activate([in] REFIID iid, [in] DWORD dwClsCtx, [in, unique] PROPVARIANT *pActivationParams, [out, iid_is(iid)] void **ppv)
HRESULT GetCount([out] UINT *pcDevices)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HRESULT OnPropertyValueChanged([in] LPCWSTR pwstrDeviceId, [in] const PROPERTYKEY key)
AudioExtensionParams
HRESULT GetDefaultAudioEndpoint([in] EDataFlow dataFlow, [in] ERole role, [out] IMMDevice **ppEndpoint)
REFIID LPVOID * ppv
Definition: atlbase.h:39
struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS DIRECTX_AUDIO_ACTIVATION_PARAMS
enum _ERole ERole
HRESULT UnregisterEndpointNotificationCallback([in] IMMNotificationClient *pClient)
FT_Library library
Definition: cffdrivr.c:654
coclass AMMultiMediaStream cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);") cpp_quote("DEFINE_GUID(CLSID_AMAudioStream
HRESULT GetDataFlow([out] EDataFlow *pDataFlow)
IMMDevice * pPnpDevnode
enum _EDataFlow EDataFlow
HRESULT OnDeviceAdded([in] LPCWSTR pwstrDeviceId)
_EDataFlow
Definition: mmdeviceapi.idl:61
static const WCHAR version[]
Definition: asmname.c:64
LONG_PTR LPARAM
Definition: windef.h:208
HRESULT OnDeviceRemoved([in] LPCWSTR pwstrDeviceId)
DEVICE_STATEMASK_ALL DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 0)
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
enum _EndpointFormFactor EndpointFormFactor
LONG HRESULT
Definition: typedefs.h:77
const GLubyte * c
Definition: glext.h:8905
HRESULT RegisterEndpointNotificationCallback([in] IMMNotificationClient *pClient)
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS * PDIRECTX_AUDIO_ACTIVATION_PARAMS
IMMDevice * pEndPoint
HRESULT OnDeviceStateChanged([in] LPCWSTR pwstrDeviceId, [in] DWORD dwNewState)
HRESULT Item([in] UINT nDevice, [out] IMMDevice **ppdevice)
HRESULT OpenPropertyStore([in] DWORD stgmAccess, [out] IPropertyStore **ppProperties)
HRESULT GetId([out] LPWSTR *ppstrId)
HRESULT GetDevice([in] LPCWSTR pwstrId, [out] IMMDevice **ppDevice)
HRESULT EnumAudioEndpoints([in] EDataFlow dataFlow, [in] DWORD dwStateMask, [out] IMMDeviceCollection **ppDevices)
#define local
Definition: zutil.h:30
#define f1(x, y, z)
Definition: sha1.c:30
GLuint in
Definition: glext.h:9616
static unsigned char pointer_default
Definition: parser.tab.c:114
unsigned int UINT
Definition: ndis.h:50
IMMDevice * pPnpInterface
HRESULT GetState([out] DWORD *pdwState)
GLenum GLuint id
Definition: glext.h:5579
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HRESULT OnDefaultDeviceChanged([in] EDataFlow flow, [in] ERole role, [in] LPCWSTR pwstrDeviceId)
void * object
Definition: jmemsys.h:48
Definition: path.c:42