{"version":3,"file":"HIDTypes.js","sourceRoot":"","sources":["../../../TS/HID/HIDTypes.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,cAAc,CAAC,SAAc;IAEzC,OAAO;QACH,WAAW,EAAE,EAAE;QACf,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,MAAM,EAAE,SAAS,CAAC,MAAM;KAC3B,CAAC;AACN,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAsB;IAE/C,OAAO,GAAG,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;AACxE,CAAC","sourcesContent":["export interface HIDDeviceFound\r\n{\r\n collections: HIDCollection[],\r\n productId: number,\r\n productName: string,\r\n vendorId: number,\r\n opened: boolean\r\n}\r\n\r\nexport interface HIDCollection { reportIds: number[], usage: number, usagePage: number }\r\nexport interface HIDDeviceFilter { vendorId: number, productId: number, usagePage: number, usage: number }\r\nexport interface HIDRequestDeviceOptions { filters: HIDDeviceFilter[] }\r\nexport interface HIDReport { reportId: number, data: string }\r\nexport interface HIDOpResult { success: boolean, message: string, hidDevicesFound: HIDDeviceFound[] | undefined }\r\n\r\nexport function ParseHIDDevice(rawDevice: any): HIDDeviceFound \r\n{\r\n return {\r\n collections: [], // Do we need collection support?\r\n productId: rawDevice.productId,\r\n productName: rawDevice.productName,\r\n vendorId: rawDevice.vendorId,\r\n opened: rawDevice.opened\r\n };\r\n}\r\n\r\nexport function HIDDeviceKey(device: HIDDeviceFound): string\r\n{\r\n return `${device.productName}${device.productId}${device.vendorId}`;\r\n}\r\n"]}