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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "media/midi/usb_midi_export.h" | 17 #include "media/midi/usb_midi_export.h" |
18 | 18 |
19 namespace media { | |
20 namespace midi { | 19 namespace midi { |
21 | 20 |
22 class MidiManagerUsb; | 21 class MidiManagerUsb; |
23 class UsbMidiDevice; | 22 class UsbMidiDevice; |
24 | 23 |
25 // Delegate class for UsbMidiDevice. | 24 // Delegate class for UsbMidiDevice. |
26 // Each method is called when an corresponding event arrives at the device. | 25 // Each method is called when an corresponding event arrives at the device. |
27 class USB_MIDI_EXPORT UsbMidiDeviceDelegate { | 26 class USB_MIDI_EXPORT UsbMidiDeviceDelegate { |
28 public: | 27 public: |
29 virtual ~UsbMidiDeviceDelegate() {} | 28 virtual ~UsbMidiDeviceDelegate() {} |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual std::string GetProductName() = 0; | 79 virtual std::string GetProductName() = 0; |
81 | 80 |
82 // Return the device version. | 81 // Return the device version. |
83 virtual std::string GetDeviceVersion() = 0; | 82 virtual std::string GetDeviceVersion() = 0; |
84 | 83 |
85 // Sends |data| to the given USB endpoint of this device. | 84 // Sends |data| to the given USB endpoint of this device. |
86 virtual void Send(int endpoint_number, const std::vector<uint8_t>& data) = 0; | 85 virtual void Send(int endpoint_number, const std::vector<uint8_t>& data) = 0; |
87 }; | 86 }; |
88 | 87 |
89 } // namespace midi | 88 } // namespace midi |
90 } // namespace media | |
91 | 89 |
92 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_H_ | 90 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_H_ |
OLD | NEW |