• Home
  • Raw
  • Download

Lines Matching defs:LibusbConnection

115 struct LibusbConnection : public Connection {  struct
117 LibusbConnection* self = nullptr; argument
124 LibusbConnection* self; argument
130 explicit LibusbConnection(unique_device device) in LibusbConnection() argument
133 ~LibusbConnection() { Stop(); } in ~LibusbConnection() argument
135 void HandlePacket(amessage& msg, std::optional<Block> payload) { in HandlePacket()
144 void Cleanup(ReadBlock* read_block) REQUIRES(read_mutex_) { in Cleanup()
153 bool MaybeCleanup(ReadBlock* read_block) REQUIRES(read_mutex_) { in MaybeCleanup()
168 static void LIBUSB_CALL header_read_cb(libusb_transfer* transfer) { in header_read_cb()
218 static void LIBUSB_CALL payload_read_cb(libusb_transfer* transfer) { in payload_read_cb()
255 static void LIBUSB_CALL write_cb(libusb_transfer* transfer) { in write_cb()
276 bool DoTlsHandshake(RSA*, std::string*) final { in DoTlsHandshake()
281 void CreateRead(ReadBlock* read, bool header) { in CreateRead()
291 void SubmitRead(ReadBlock* read, size_t length) { in SubmitRead()
302 void SubmitWrite(Block&& block) REQUIRES(write_mutex_) { in SubmitWrite()
326 bool Write(std::unique_ptr<apacket> packet) final { in Write()
358 std::optional<libusb_device_descriptor> GetDeviceDescriptor() { in GetDeviceDescriptor()
369 bool FindInterface(libusb_device_descriptor* device_desc) { in FindInterface()
472 std::string GetUsbDeviceAddress() const { return std::string("usb:") + device_address_; } in GetUsbDeviceAddress()
474 std::string GetSerial() { in GetSerial()
496 bool OpenDevice(std::string* error) { in OpenDevice()
555 void CancelReadTransfer(ReadBlock* read_block) REQUIRES(read_mutex_) { in CancelReadTransfer()
575 void CloseDevice() { in CloseDevice()
645 bool StartImpl(std::string* error) { in StartImpl()
660 void OnError(const std::string& error) { in OnError()
668 virtual bool Attach(std::string* error) override final { in Attach()
684 virtual bool Detach(std::string* error) override final { in Detach()
690 virtual void Reset() override final { in Reset()
719 static std::optional<std::shared_ptr<LibusbConnection>> Create(unique_device device) { in Create() argument
769 unique_device device_;
770 unique_device_handle device_handle_;
771 std::string device_address_;
772 std::string serial_ = "<unknown>";
774 uint32_t interface_num_;
798 static std::unordered_map<libusb_device*, std::weak_ptr<LibusbConnection>> usb_handles argument