diff options
Diffstat (limited to 'fastboot/usb_windows.cpp')
-rw-r--r-- | fastboot/usb_windows.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fastboot/usb_windows.cpp b/fastboot/usb_windows.cpp index 0e5fba125..8c60a7173 100644 --- a/fastboot/usb_windows.cpp +++ b/fastboot/usb_windows.cpp @@ -66,7 +66,7 @@ struct usb_handle { std::string interface_name; }; -class WindowsUsbTransport : public Transport { +class WindowsUsbTransport : public UsbTransport { public: WindowsUsbTransport(std::unique_ptr<usb_handle> handle) : handle_(std::move(handle)) {} ~WindowsUsbTransport() override = default; @@ -74,6 +74,7 @@ class WindowsUsbTransport : public Transport { ssize_t Read(void* data, size_t len) override; ssize_t Write(const void* data, size_t len) override; int Close() override; + int Reset() override; private: std::unique_ptr<usb_handle> handle_; @@ -261,6 +262,12 @@ int WindowsUsbTransport::Close() { return 0; } +int WindowsUsbTransport::Reset() { + DBG("usb_reset currently unsupported\n\n"); + // TODO, this is a bit complicated since it is using ADB + return -1; +} + int recognized_device(usb_handle* handle, ifc_match_func callback) { struct usb_ifc_info info; USB_DEVICE_DESCRIPTOR device_desc; @@ -366,8 +373,7 @@ static std::unique_ptr<usb_handle> find_usb_device(ifc_match_func callback) { return handle; } -Transport* usb_open(ifc_match_func callback) -{ +UsbTransport* usb_open(ifc_match_func callback, uint32_t) { std::unique_ptr<usb_handle> handle = find_usb_device(callback); return handle ? new WindowsUsbTransport(std::move(handle)) : nullptr; } |