| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ | 5 #ifndef COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ |
| 6 #define COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ | 6 #define COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // The platform device handle will be closed when UsbDeviceHandle destructs. | 51 // The platform device handle will be closed when UsbDeviceHandle destructs. |
| 52 virtual void Close() = 0; | 52 virtual void Close() = 0; |
| 53 | 53 |
| 54 // Device manipulation operations. These methods are blocking and must be | 54 // Device manipulation operations. These methods are blocking and must be |
| 55 // called on FILE thread. | 55 // called on FILE thread. |
| 56 virtual bool ClaimInterface(const int interface_number) = 0; | 56 virtual bool ClaimInterface(const int interface_number) = 0; |
| 57 virtual bool ReleaseInterface(const int interface_number) = 0; | 57 virtual bool ReleaseInterface(const int interface_number) = 0; |
| 58 virtual bool SetInterfaceAlternateSetting(const int interface_number, | 58 virtual bool SetInterfaceAlternateSetting(const int interface_number, |
| 59 const int alternate_setting) = 0; | 59 const int alternate_setting) = 0; |
| 60 virtual bool ResetDevice() = 0; | 60 virtual bool ResetDevice() = 0; |
| 61 virtual bool GetManufacturer(base::string16* manufacturer) = 0; |
| 62 virtual bool GetProduct(base::string16* product) = 0; |
| 61 virtual bool GetSerial(base::string16* serial) = 0; | 63 virtual bool GetSerial(base::string16* serial) = 0; |
| 62 | 64 |
| 63 // Async IO. Can be called on any thread. | 65 // Async IO. Can be called on any thread. |
| 64 virtual void ControlTransfer(const UsbEndpointDirection direction, | 66 virtual void ControlTransfer(const UsbEndpointDirection direction, |
| 65 const TransferRequestType request_type, | 67 const TransferRequestType request_type, |
| 66 const TransferRecipient recipient, | 68 const TransferRecipient recipient, |
| 67 const uint8 request, | 69 const uint8 request, |
| 68 const uint16 value, | 70 const uint16 value, |
| 69 const uint16 index, | 71 const uint16 index, |
| 70 net::IOBuffer* buffer, | 72 net::IOBuffer* buffer, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 101 UsbDeviceHandle() {}; | 103 UsbDeviceHandle() {}; |
| 102 | 104 |
| 103 virtual ~UsbDeviceHandle() {}; | 105 virtual ~UsbDeviceHandle() {}; |
| 104 | 106 |
| 105 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); | 107 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); |
| 106 }; | 108 }; |
| 107 | 109 |
| 108 } // namespace usb_service | 110 } // namespace usb_service |
| 109 | 111 |
| 110 #endif // COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ | 112 #endif // COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ |
| OLD | NEW |