Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: device/usb/usb_device_handle.h

Issue 580963002: Add a service to track devices selected by the user. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 DEVICE_USB_USB_DEVICE_HANDLE_H_ 5 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_H_
6 #define DEVICE_USB_USB_DEVICE_HANDLE_H_ 6 #define DEVICE_USB_USB_DEVICE_HANDLE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 virtual bool ClaimInterface(const int interface_number) = 0; 54 virtual bool ClaimInterface(const int interface_number) = 0;
55 virtual bool ReleaseInterface(const int interface_number) = 0; 55 virtual bool ReleaseInterface(const int interface_number) = 0;
56 virtual bool SetInterfaceAlternateSetting(const int interface_number, 56 virtual bool SetInterfaceAlternateSetting(const int interface_number,
57 const int alternate_setting) = 0; 57 const int alternate_setting) = 0;
58 virtual bool ResetDevice() = 0; 58 virtual bool ResetDevice() = 0;
59 virtual bool GetManufacturer(base::string16* manufacturer) = 0; 59 virtual bool GetManufacturer(base::string16* manufacturer) = 0;
60 virtual bool GetProduct(base::string16* product) = 0; 60 virtual bool GetProduct(base::string16* product) = 0;
61 virtual bool GetSerial(base::string16* serial) = 0; 61 virtual bool GetSerial(base::string16* serial) = 0;
62 62
63 // Async IO. Can be called on any thread. 63 // Async IO. Can be called on any thread.
64 virtual void ControlTransfer(const UsbEndpointDirection direction, 64 virtual void ControlTransfer(UsbEndpointDirection direction,
65 const TransferRequestType request_type, 65 TransferRequestType request_type,
66 const TransferRecipient recipient, 66 TransferRecipient recipient,
67 const uint8 request, 67 uint8 request,
68 const uint16 value, 68 uint16 value,
69 const uint16 index, 69 uint16 index,
70 net::IOBuffer* buffer, 70 net::IOBuffer* buffer,
71 const size_t length, 71 size_t length,
72 const unsigned int timeout, 72 unsigned int timeout,
73 const UsbTransferCallback& callback) = 0; 73 const UsbTransferCallback& callback) = 0;
74 74
75 virtual void BulkTransfer(const UsbEndpointDirection direction, 75 virtual void BulkTransfer(UsbEndpointDirection direction,
76 const uint8 endpoint, 76 uint8 endpoint,
77 net::IOBuffer* buffer, 77 net::IOBuffer* buffer,
78 const size_t length, 78 size_t length,
79 const unsigned int timeout, 79 unsigned int timeout,
80 const UsbTransferCallback& callback) = 0; 80 const UsbTransferCallback& callback) = 0;
81 81
82 virtual void InterruptTransfer(const UsbEndpointDirection direction, 82 virtual void InterruptTransfer(UsbEndpointDirection direction,
83 const uint8 endpoint, 83 uint8 endpoint,
84 net::IOBuffer* buffer, 84 net::IOBuffer* buffer,
85 const size_t length, 85 size_t length,
86 const unsigned int timeout, 86 unsigned int timeout,
87 const UsbTransferCallback& callback) = 0; 87 const UsbTransferCallback& callback) = 0;
88 88
89 virtual void IsochronousTransfer(const UsbEndpointDirection direction, 89 virtual void IsochronousTransfer(UsbEndpointDirection direction,
90 const uint8 endpoint, 90 uint8 endpoint,
91 net::IOBuffer* buffer, 91 net::IOBuffer* buffer,
92 const size_t length, 92 size_t length,
93 const unsigned int packets, 93 unsigned int packets,
94 const unsigned int packet_length, 94 unsigned int packet_length,
95 const unsigned int timeout, 95 unsigned int timeout,
96 const UsbTransferCallback& callback) = 0; 96 const UsbTransferCallback& callback) = 0;
97 97
98 protected: 98 protected:
99 friend class base::RefCountedThreadSafe<UsbDeviceHandle>; 99 friend class base::RefCountedThreadSafe<UsbDeviceHandle>;
100 100
101 UsbDeviceHandle() {}; 101 UsbDeviceHandle() {};
102 102
103 virtual ~UsbDeviceHandle() {}; 103 virtual ~UsbDeviceHandle() {};
104 104
105 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); 105 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle);
106 }; 106 };
107 107
108 } // namespace device 108 } // namespace device
109 109
110 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_ 110 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698