| 962 | } |
| 963 | |
| 964 | struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned short vendor_id, unsigned short product_id) |
| 965 | { |
| 966 | struct hid_device_info *root = NULL; |
| 967 | hid_mutex_guard l( &g_DevicesMutex ); |
| 968 | for ( hid_device_ref<CHIDDevice> pDevice = g_Devices; pDevice; pDevice = pDevice->next ) |
| 969 | { |
| 970 | const hid_device_info *info = pDevice->GetDeviceInfo(); |
| 971 | if ( ( vendor_id == 0 && product_id == 0 ) || |
| 972 | ( vendor_id == info->vendor_id && product_id == info->product_id ) ) |
| 973 | { |
| 974 | hid_device_info *dev = CopyHIDDeviceInfo( info ); |
| 975 | dev->next = root; |
| 976 | root = dev; |
| 977 | } |
| 978 | } |
| 979 | return root; |
| 980 | } |
| 981 | |
| 982 | void HID_API_EXPORT HID_API_CALL hid_free_enumeration(struct hid_device_info *devs) |
| 983 | { |
nothing calls this directly
no test coverage detected