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 MEDIA_MIDI_USB_MIDI_DEVICE_H_ | 5 #ifndef MEDIA_MIDI_USB_MIDI_DEVICE_H_ |
6 #define MEDIA_MIDI_USB_MIDI_DEVICE_H_ | 6 #define MEDIA_MIDI_USB_MIDI_DEVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Otherwise |callback| will be called with |false| and empty devices. | 59 // Otherwise |callback| will be called with |false| and empty devices. |
60 // When this factory is destroyed during the operation, the operation | 60 // When this factory is destroyed during the operation, the operation |
61 // will be canceled silently (i.e. |callback| will not be called). | 61 // will be canceled silently (i.e. |callback| will not be called). |
62 // This function can be called at most once per instance. | 62 // This function can be called at most once per instance. |
63 virtual void EnumerateDevices(UsbMidiDeviceDelegate* delegate, | 63 virtual void EnumerateDevices(UsbMidiDeviceDelegate* delegate, |
64 Callback callback) = 0; | 64 Callback callback) = 0; |
65 }; | 65 }; |
66 | 66 |
67 virtual ~UsbMidiDevice() {} | 67 virtual ~UsbMidiDevice() {} |
68 | 68 |
69 // Returns the descriptor of this device. | 69 // Returns the descriptors of this device. |
70 virtual std::vector<uint8> GetDescriptor() = 0; | 70 virtual std::vector<uint8> GetDescriptors() = 0; |
| 71 |
| 72 // Return the name of the manufacturer. |
| 73 virtual std::string GetManufacturer() = 0; |
| 74 |
| 75 // Retur the name of the device. |
| 76 virtual std::string GetProductName() = 0; |
| 77 |
| 78 // Return the device version. |
| 79 virtual std::string GetDeviceVersion() = 0; |
71 | 80 |
72 // Sends |data| to the given USB endpoint of this device. | 81 // Sends |data| to the given USB endpoint of this device. |
73 virtual void Send(int endpoint_number, const std::vector<uint8>& data) = 0; | 82 virtual void Send(int endpoint_number, const std::vector<uint8>& data) = 0; |
74 }; | 83 }; |
75 | 84 |
76 } // namespace media | 85 } // namespace media |
77 | 86 |
78 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_H_ | 87 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_H_ |
OLD | NEW |