| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.hardware.midi; |
| |
| using zx; |
| |
| /// Describes what type of MIDI device an implementation of Device represents |
| enum Direction : uint8 { |
| /// A MIDI source |
| SOURCE = 1; |
| /// A MIDI sink |
| SINK = 2; |
| }; |
| |
| protocol Device { |
| /// Get direction of the MIDI device |
| GetDirection() -> (Direction direction); |
| |
| /// Reads MIDI data from a MIDI source |
| Read(uint64 count) -> (bytes data) error zx.status; |
| |
| /// Reads MIDI data to a MIDI sink |
| Write(bytes data) -> (uint64 actual) error zx.status; |
| }; |