Mercurial > hg > ucis.core
annotate USBLib/Communication/IUsbDeviceRegistry.cs @ 94:3c1bba376dca
HTTP: Added support for cookies, improved prefix selector
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sat, 21 Jun 2014 00:40:33 +0200 |
parents | 99ed461509fe |
children |
rev | line source |
---|---|
21 | 1 ???using System; |
2 using System.Collections.Generic; | |
3 using UCIS.USBLib.Communication.LibUsb; | |
4 using UCIS.USBLib.Communication.LibUsb1; | |
5 using UCIS.USBLib.Communication.WinUsb; | |
6 | |
7 namespace UCIS.USBLib.Communication { | |
8 public interface IUsbDeviceRegistry { | |
9 IDictionary<String, Object> DeviceProperties { get; } | |
64
99ed461509fe
Fixed data type for USB vendor and product IDs
Ivo Smits <Ivo@UCIS.nl>
parents:
21
diff
changeset
|
10 UInt16 Vid { get; } |
99ed461509fe
Fixed data type for USB vendor and product IDs
Ivo Smits <Ivo@UCIS.nl>
parents:
21
diff
changeset
|
11 UInt16 Pid { get; } |
21 | 12 Byte InterfaceID { get; } |
13 | |
14 String Name { get; } //Device product name (or null if not available) | |
15 String Manufacturer { get; } //Device manufacturer name (or null if not available) | |
16 String FullName { get; } //Device manufacturer name and product name | |
17 String SymbolicName { get; } //Arbitrary string that uniquely identifies the device | |
18 | |
19 IUsbDevice Open(); | |
20 } | |
21 public static class UsbDevice { | |
22 public static IList<IUsbDeviceRegistry> AllDevices { | |
23 get { | |
24 List<IUsbDeviceRegistry> list = new List<IUsbDeviceRegistry>(); | |
25 if (Environment.OSVersion.Platform == PlatformID.Win32NT) { | |
26 foreach (IUsbDeviceRegistry reg in WinUsbRegistry.DeviceList) list.Add(reg); | |
27 foreach (IUsbDeviceRegistry reg in LibUsb0Registry.DeviceList) list.Add(reg); | |
28 } else { | |
29 foreach (IUsbDeviceRegistry reg in LibUsb1Registry.DeviceList) list.Add(reg); | |
30 } | |
31 return list; | |
32 } | |
33 } | |
34 } | |
35 } |