Commit 2301acb3 authored by Prashant Malani's avatar Prashant Malani Committed by Commit Bot

Update midis.mojom with new function definitions

This patch updates the midis.mojom file with struct definitions
and interface functions to pass device information to the ARC
client, as well as to request midis for port FDs for subdevices,
and to close all client connections to a particular device.

BUG=chromium:701005

Change-Id: Id9daeeb36b6c7328b5b332420d3afd163a3b48b5
Reviewed-on: https://chromium-review.googlesource.com/685261Reviewed-by: default avatarGreg Kerr <kerrnel@chromium.org>
Reviewed-by: default avatarLuis Hector Chavez <lhchavez@chromium.org>
Commit-Queue: Prashant Malani <pmalani@google.com>
Cr-Commit-Position: refs/heads/master@{#504809}
parent a240cac3
......@@ -7,17 +7,52 @@
module arc.mojom;
// This struct is used to send information to the client regarding a device
// which has been (dis)connected, and which the client can use to request
// subdevice ports from the daemon.
struct MidisDeviceInfo {
uint32 card;
uint32 device_num;
uint32 num_subdevices;
uint32 flags;
string name;
string manufacturer;
};
// This struct is used by the client to both request a subdevice port FD, as
// well as to close all its connections to a particular device. In the latter
// case, the |subdevice_num| field is left unused.
struct MidisRequest {
uint32 card;
uint32 device_num;
uint32 subdevice_num;
};
// This interface is used by the server to send device and other information
// to the client. It should be implemented by the client, and a handle to it
// should be passed to the server.
// Next Method ID: 0
// Next Method ID: 2
interface MidisClient {
OnDeviceAdded@0(MidisDeviceInfo device);
OnDeviceRemoved@1(MidisDeviceInfo device);
};
// This interface is used by the client to send messages / requests to the
// daemon. This should be implemented by midis.
// Next Method ID: 0
// Next Method ID: 3
interface MidisServer {
// Used to list out the MIDI devices that are currently connected to the
// midis daemon.
ListDevices@0() => (array<MidisDeviceInfo> devices);
// This function returns a handle(a Unix FD wrapped in a Mojo Handle)
// for a subdevice specified by |request|.
// In the event of an error, returns an empty handle.
RequestPort@1(MidisRequest request) => (handle port_handle);
// This function closes all open FDs the client may have on the specified
// device, and removes the client from the device's data structure.
CloseDevice@2(MidisRequest request);
};
// This interface is needed to get the midis server interface handle.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment