1 // Copyright © 2015-2017 winapi-rs developers 2 // Licensed under the Apache License, Version 2.0 3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 5 // All files in the project carrying such notice may not be copied, modified, or distributed 6 // except according to those terms 7 //! this ALWAYS GENERATED file contains the definitions for the interfaces 8 use ctypes::c_void; 9 use shared::guiddef::{GUID, REFIID}; 10 use shared::minwindef::{DWORD, LPARAM, LPVOID, UINT}; 11 // use shared::winerror::{ERROR_NOT_FOUND, ERROR_UNSUPPORTED_TYPE, HRESULT_FROM_WIN32}; 12 use shared::wtypes::PROPERTYKEY; 13 use um::propidl::PROPVARIANT; 14 use um::propsys::IPropertyStore; 15 use um::unknwnbase::{IUnknown, IUnknownVtbl}; 16 use um::winnt::{HRESULT, LPCWSTR, LPWSTR}; 17 // pub const E_NOTFOUND: HRESULT = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); 18 // pub const E_UNSUPPORTED_TYPE: HRESULT = HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE); 19 pub const DEVICE_STATE_ACTIVE: DWORD = 0x00000001; 20 pub const DEVICE_STATE_DISABLED: DWORD = 0x00000002; 21 pub const DEVICE_STATE_NOTPRESENT: DWORD = 0x00000004; 22 pub const DEVICE_STATE_UNPLUGGED: DWORD = 0x00000008; 23 pub const DEVICE_STATEMASK_ALL: DWORD = 0x0000000F; 24 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_FormFactor, 25 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 0} 26 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_ControlPanelPageProvider, 27 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 1} 28 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_Association, 29 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 2} 30 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_PhysicalSpeakers, 31 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 3} 32 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_GUID, 33 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 4} 34 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_Disable_SysFx, 35 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 5} 36 pub const ENDPOINT_SYSFX_ENABLED: DWORD = 0x00000000; 37 pub const ENDPOINT_SYSFX_DISABLED: DWORD = 0x00000001; 38 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_FullRangeSpeakers, 39 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 6} 40 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_Supports_EventDriven_Mode, 41 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 7} 42 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_JackSubType, 43 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 8} 44 DEFINE_PROPERTYKEY!{PKEY_AudioEndpoint_Default_VolumeInDb, 45 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 9} 46 DEFINE_PROPERTYKEY!{PKEY_AudioEngine_DeviceFormat, 47 0xf19f064d, 0x82c, 0x4e27, 0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c, 0} 48 DEFINE_PROPERTYKEY!{PKEY_AudioEngine_OEMFormat, 49 0xe4870e26, 0x3cc5, 0x4cd2, 0xba, 0x46, 0xca, 0xa, 0x9a, 0x70, 0xed, 0x4, 3} 50 DEFINE_PROPERTYKEY!{PKEY_AudioEndpointLogo_IconEffects, 51 0xf1ab780d, 0x2010, 0x4ed3, 0xa3, 0xa6, 0x8b, 0x87, 0xf0, 0xf0, 0xc4, 0x76, 0} 52 DEFINE_PROPERTYKEY!{PKEY_AudioEndpointLogo_IconPath, 53 0xf1ab780d, 0x2010, 0x4ed3, 0xa3, 0xa6, 0x8b, 0x87, 0xf0, 0xf0, 0xc4, 0x76, 1} 54 DEFINE_PROPERTYKEY!{PKEY_AudioEndpointSettings_MenuText, 55 0x14242002, 0x0320, 0x4de4, 0x95, 0x55, 0xa7, 0xd8, 0x2b, 0x73, 0xc2, 0x86, 0} 56 DEFINE_PROPERTYKEY!{PKEY_AudioEndpointSettings_LaunchContract, 57 0x14242002, 0x0320, 0x4de4, 0x95, 0x55, 0xa7, 0xd8, 0x2b, 0x73, 0xc2, 0x86, 1} 58 STRUCT!{struct DIRECTX_AUDIO_ACTIVATION_PARAMS { 59 cbDirectXAudioActivationParams: DWORD, 60 guidAudioSession: GUID, 61 dwAudioStreamFlags: DWORD, 62 }} 63 pub type PDIRECTX_AUDIO_ACTIVATION_PARAMS = *mut DIRECTX_AUDIO_ACTIVATION_PARAMS; 64 ENUM!{enum EDataFlow { 65 eRender, 66 eCapture, 67 eAll, 68 EDataFlow_enum_count, 69 }} 70 ENUM!{enum ERole { 71 eConsole, 72 eMultimedia, 73 eCommunications, 74 ERole_enum_count, 75 }} 76 ENUM!{enum EndpointFormFactor { 77 RemoteNetworkDevice, 78 Speakers, 79 LineLevel, 80 Headphones, 81 Microphone, 82 Headset, 83 Handset, 84 UnknownDigitalPassthrough, 85 SPDIF, 86 DigitalAudioDisplayDevice, 87 UnknownFormFactor, 88 EndpointFormFactor_enum_count, 89 }} 90 pub const HDMI: EndpointFormFactor = DigitalAudioDisplayDevice; 91 DEFINE_GUID!{DEVINTERFACE_AUDIO_RENDER, 92 0xe6327cad, 0xdcec, 0x4949, 0xae, 0x8a, 0x99, 0x1e, 0x97, 0x6a, 0x79, 0xd2} 93 DEFINE_GUID!{DEVINTERFACE_AUDIO_CAPTURE, 94 0x2eef81be, 0x33fa, 0x4800, 0x96, 0x70, 0x1c, 0xd4, 0x74, 0x97, 0x2c, 0x3f} 95 DEFINE_GUID!{DEVINTERFACE_MIDI_OUTPUT, 96 0x6dc23320, 0xab33, 0x4ce4, 0x80, 0xd4, 0xbb, 0xb3, 0xeb, 0xbf, 0x28, 0x14} 97 DEFINE_GUID!{DEVINTERFACE_MIDI_INPUT, 98 0x504be32c, 0xccf6, 0x4d2c, 0xb7, 0x3f, 0x6f, 0x8b, 0x37, 0x47, 0xe2, 0x2b} 99 RIDL!{#[uuid(0x7991eec9, 0x7e89, 0x4d85, 0x83, 0x90, 0x6c, 0x70, 0x3c, 0xec, 0x60, 0xc0)] 100 interface IMMNotificationClient(IMMNotificationClientVtbl): IUnknown(IUnknownVtbl) { 101 fn OnDeviceStateChanged( 102 pwstrDeviceId: LPCWSTR, 103 dwNewState: DWORD, 104 ) -> HRESULT, 105 fn OnDeviceAdded( 106 pwstrDeviceId: LPCWSTR, 107 ) -> HRESULT, 108 fn OnDeviceRemoved( 109 pwstrDeviceId: LPCWSTR, 110 ) -> HRESULT, 111 fn OnDefaultDeviceChanged( 112 flow: EDataFlow, 113 role: ERole, 114 pwstrDefaultDeviceId: LPCWSTR, 115 ) -> HRESULT, 116 fn OnPropertyValueChanged( 117 pwstrDeviceId: LPCWSTR, 118 key: PROPERTYKEY, 119 ) -> HRESULT, 120 }} 121 RIDL!{#[uuid(0xd666063f, 0x1587, 0x4e43, 0x81, 0xf1, 0xb9, 0x48, 0xe8, 0x07, 0x36, 0x3f)] 122 interface IMMDevice(IMMDeviceVtbl): IUnknown(IUnknownVtbl) { 123 fn Activate( 124 iid: REFIID, 125 dwClsCtx: DWORD, 126 pActivationParams: *mut PROPVARIANT, 127 ppInterface: *mut LPVOID, 128 ) -> HRESULT, 129 fn OpenPropertyStore( 130 stgmAccess: DWORD, 131 ppProperties: *mut *mut IPropertyStore, 132 ) -> HRESULT, 133 fn GetId( 134 ppstrId: *mut LPWSTR, 135 ) -> HRESULT, 136 fn GetState( 137 pdwState: *mut DWORD, 138 ) -> HRESULT, 139 }} 140 RIDL!{#[uuid(0x0bd7a1be, 0x7a1a, 0x44db, 0x83, 0x97, 0xcc, 0x53, 0x92, 0x38, 0x7b, 0x5e)] 141 interface IMMDeviceCollection(IMMDeviceCollectionVtbl): IUnknown(IUnknownVtbl) { 142 fn GetCount( 143 pcDevices: *const UINT, 144 ) -> HRESULT, 145 fn Item( 146 nDevice: UINT, 147 ppDevice: *mut *mut IMMDevice, 148 ) -> HRESULT, 149 }} 150 RIDL!{#[uuid(0x1be09788, 0x6894, 0x4089, 0x85, 0x86, 0x9a, 0x2a, 0x6c, 0x26, 0x5a, 0xc5)] 151 interface IMMEndpoint(IMMEndpointVtbl): IUnknown(IUnknownVtbl) { 152 fn GetDataFlow( 153 pDataFlow: *mut EDataFlow, 154 ) -> HRESULT, 155 }} 156 RIDL!{#[uuid(0xa95664d2, 0x9614, 0x4f35, 0xa7, 0x46, 0xde, 0x8d, 0xb6, 0x36, 0x17, 0xe6)] 157 interface IMMDeviceEnumerator(IMMDeviceEnumeratorVtbl): IUnknown(IUnknownVtbl) { 158 fn EnumAudioEndpoints( 159 dataFlow: EDataFlow, 160 dwStateMask: DWORD, 161 ppDevices: *mut *mut IMMDeviceCollection, 162 ) -> HRESULT, 163 fn GetDefaultAudioEndpoint( 164 dataFlow: EDataFlow, 165 role: ERole, 166 ppEndpoint: *mut *mut IMMDevice, 167 ) -> HRESULT, 168 fn GetDevice( 169 pwstrId: LPCWSTR, 170 ppDevices: *mut *mut IMMDevice, 171 ) -> HRESULT, 172 fn RegisterEndpointNotificationCallback( 173 pClient: *mut IMMNotificationClient, 174 ) -> HRESULT, 175 fn UnregisterEndpointNotificationCallback( 176 pClient: *mut IMMNotificationClient, 177 ) -> HRESULT, 178 }} 179 RIDL!{#[uuid(0x3b0d0ea4, 0xd0a9, 0x4b0e, 0x93, 0x5b, 0x09, 0x51, 0x67, 0x46, 0xfa, 0xc0)] 180 interface IMMDeviceActivator(IMMDeviceActivatorVtbl): IUnknown(IUnknownVtbl) { 181 fn Activate( 182 iid: REFIID, 183 pDevice: *mut IMMDevice, 184 pActivationParams: *mut PROPVARIANT, 185 ppInterface: *mut *mut c_void, 186 ) -> HRESULT, 187 }} 188 RIDL!{#[uuid(0x41d949ab, 0x9862, 0x444a, 0x80, 0xf6, 0xc2, 0x61, 0x33, 0x4d, 0xa5, 0xeb)] 189 interface IActivateAudioInterfaceCompletionHandler(IActivateAudioInterfaceCompletionHandlerVtbl): 190 IUnknown(IUnknownVtbl) { 191 fn ActivateCompleted( 192 activateOperation: *mut IActivateAudioInterfaceAsyncOperation, 193 ) -> HRESULT, 194 }} 195 RIDL!{#[uuid(0x72a22d78, 0xcde4, 0x431d, 0xb8, 0xcc, 0x84, 0x3a, 0x71, 0x19, 0x9b, 0x6d)] 196 interface IActivateAudioInterfaceAsyncOperation(IActivateAudioInterfaceAsyncOperationVtbl): 197 IUnknown(IUnknownVtbl) { 198 fn GetActivateResult( 199 activateResult: *mut HRESULT, 200 activatedInterface: *mut *mut IUnknown, 201 ) -> HRESULT, 202 }} 203 extern "system" { ActivateAudioInterfaceAsync( deviceInterfacePath: LPCWSTR, riid: REFIID, activationParams: *mut PROPVARIANT, completionHandler: *mut IActivateAudioInterfaceCompletionHandler, activationOperation: *mut *mut IActivateAudioInterfaceAsyncOperation, ) -> HRESULT204 pub fn ActivateAudioInterfaceAsync( 205 deviceInterfacePath: LPCWSTR, 206 riid: REFIID, 207 activationParams: *mut PROPVARIANT, 208 completionHandler: *mut IActivateAudioInterfaceCompletionHandler, 209 activationOperation: *mut *mut IActivateAudioInterfaceAsyncOperation, 210 ) -> HRESULT; 211 } 212 STRUCT!{struct AudioExtensionParams { 213 AddPageParam: LPARAM, 214 pEndpoint: *mut IMMDevice, 215 pPnpInterface: *mut IMMDevice, 216 pPnpDevnode: *mut IMMDevice, 217 }} 218 DEFINE_GUID!{CLSID_MMDeviceEnumerator, 219 0xBCDE0395, 0xE52F, 0x467C, 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E} 220