1882
|
1 # Stubs for usb.backend.libusb1 (Python 3)
|
|
2 #
|
|
3 # NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
4
|
|
5 from ctypes import *
|
|
6 import usb.libloader as _objfinalizer
|
|
7 import usb.libloader
|
|
8 from typing import Any, Optional
|
|
9
|
|
10 LIBUSB_ERROR_IO: int
|
|
11 LIBUSB_ERROR_INVALID_PARAM: int
|
|
12 LIBUSB_ERROR_ACCESS: int
|
|
13 LIBUSB_ERROR_NO_DEVICE: int
|
|
14 LIBUSB_ERROR_NOT_FOUND: int
|
|
15 LIBUSB_ERROR_BUSY: int
|
|
16 LIBUSB_ERROR_TIMEOUT: int
|
|
17 LIBUSB_ERROR_OVERFLOW: int
|
|
18 LIBUSB_ERROR_PIPE: int
|
|
19 LIBUSB_ERROR_INTERRUPTED: int
|
|
20 LIBUSB_ERROR_NO_MEM: int
|
|
21 LIBUSB_ERROR_NOT_SUPPORTED: int
|
|
22 LIBUSB_TRANSFER_ERROR: int
|
|
23 LIBUSB_TRANSFER_TIMED_OUT: int
|
|
24 LIBUSB_TRANSFER_CANCELLED: int
|
|
25 LIBUSB_TRANSFER_STALL: int
|
|
26 LIBUSB_TRANSFER_NO_DEVICE: int
|
|
27 LIBUSB_TRANSFER_OVERFLOW: int
|
|
28
|
|
29 class _libusb_endpoint_descriptor(Structure): ...
|
|
30 class _libusb_interface_descriptor(Structure): ...
|
|
31 class _libusb_interface(Structure): ...
|
|
32 class _libusb_config_descriptor(Structure): ...
|
|
33 class _libusb_device_descriptor(Structure): ...
|
|
34 class _libusb_iso_packet_descriptor(Structure): ...
|
|
35 class _libusb_transfer(Structure): ...
|
|
36
|
|
37 class _Device(_objfinalizer.AutoFinalizedObject):
|
|
38 devid: Any = ...
|
|
39 def __init__(self, devid: Any) -> None: ...
|
|
40
|
|
41 class _WrapDescriptor:
|
|
42 obj: Any = ...
|
|
43 desc: Any = ...
|
|
44 def __init__(self, desc: Any, obj: Optional[Any] = ...) -> None: ...
|
|
45 def __getattr__(self, name: Any): ...
|
|
46
|
|
47 class _ConfigDescriptor(_objfinalizer.AutoFinalizedObject):
|
|
48 desc: Any = ...
|
|
49 def __init__(self, desc: Any) -> None: ...
|
|
50 def __getattr__(self, name: Any): ...
|
|
51
|
|
52 class _DevIterator(_objfinalizer.AutoFinalizedObject):
|
|
53 dev_list: Any = ...
|
|
54 num_devs: Any = ...
|
|
55 def __init__(self, ctx: Any) -> None: ...
|
|
56 def __iter__(self) -> None: ...
|
|
57
|
|
58 class _DeviceHandle:
|
|
59 handle: Any = ...
|
|
60 devid: Any = ...
|
|
61 def __init__(self, dev: Any) -> None: ...
|
|
62
|
|
63 class _IsoTransferHandler(_objfinalizer.AutoFinalizedObject):
|
|
64 transfer: Any = ...
|
|
65 def __init__(self, dev_handle: Any, ep: Any, buff: Any, timeout: Any) -> None: ...
|
|
66 def submit(self, ctx: Optional[Any] = ...): ...
|
|
67
|
|
68 class _LibUSB(usb.backend.IBackend):
|
|
69 lib: Any = ...
|
|
70 ctx: Any = ...
|
|
71 def __init__(self, lib: Any) -> None: ...
|
|
72 def enumerate_devices(self): ...
|
|
73 def get_device_descriptor(self, dev: Any): ...
|
|
74 def get_configuration_descriptor(self, dev: Any, config: Any): ...
|
|
75 def get_interface_descriptor(self, dev: Any, intf: Any, alt: Any, config: Any): ...
|
|
76 def get_endpoint_descriptor(self, dev: Any, ep: Any, intf: Any, alt: Any, config: Any): ...
|
|
77 def open_device(self, dev: Any): ...
|
|
78 def close_device(self, dev_handle: Any) -> None: ...
|
|
79 def set_configuration(self, dev_handle: Any, config_value: Any) -> None: ...
|
|
80 def get_configuration(self, dev_handle: Any): ...
|
|
81 def set_interface_altsetting(self, dev_handle: Any, intf: Any, altsetting: Any) -> None: ...
|
|
82 def claim_interface(self, dev_handle: Any, intf: Any) -> None: ...
|
|
83 def release_interface(self, dev_handle: Any, intf: Any) -> None: ...
|
|
84 def bulk_write(self, dev_handle: Any, ep: Any, intf: Any, data: Any, timeout: Any): ...
|
|
85 def bulk_read(self, dev_handle: Any, ep: Any, intf: Any, buff: Any, timeout: Any): ...
|
|
86 def intr_write(self, dev_handle: Any, ep: Any, intf: Any, data: Any, timeout: Any): ...
|
|
87 def intr_read(self, dev_handle: Any, ep: Any, intf: Any, buff: Any, timeout: Any): ...
|
|
88 def iso_write(self, dev_handle: Any, ep: Any, intf: Any, data: Any, timeout: Any): ...
|
|
89 def iso_read(self, dev_handle: Any, ep: Any, intf: Any, buff: Any, timeout: Any): ...
|
|
90 def ctrl_transfer(self, dev_handle: Any, bmRequestType: Any, bRequest: Any, wValue: Any, wIndex: Any, data: Any, timeout: Any): ...
|
|
91 def clear_halt(self, dev_handle: Any, ep: Any) -> None: ...
|
|
92 def reset_device(self, dev_handle: Any) -> None: ...
|
|
93 def is_kernel_driver_active(self, dev_handle: Any, intf: Any): ...
|
|
94 def detach_kernel_driver(self, dev_handle: Any, intf: Any) -> None: ...
|
|
95 def attach_kernel_driver(self, dev_handle: Any, intf: Any) -> None: ...
|
|
96
|
|
97 def get_backend(find_library: Optional[Any] = ...): ...
|
|
98
|
|
99 # Names in __all__ with no definition:
|
|
100 # LIBUSB_ERROR_OTHERLIBUSB_TRANSFER_COMPLETED
|
|
101 # LIBUSB_SUCESS
|