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