blob: 1e7f40acbc4eedd2936020c8428cc060aaca6fd3 [file] [log] [blame]
// 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.io2;
using zx;
@deprecated("devices will be services in the future")
type DeviceSignal = strict bits : uint32 {
/// Indicates the device is ready for reading.
READABLE = 0x01000000; // ZX_USER_SIGNAL_0
/// Indicates the device is ready for writing.
WRITABLE = 0x02000000; // ZX_USER_SIGNAL_1
/// Indicates the device has encountered an error state.
ERROR = 0x04000000; // ZX_USER_SIGNAL_2
/// Indicates the device has hung up on the current connection.
HANGUP = 0x08000000; // ZX_USER_SIGNAL_3
/// Indicates an out-of-band state transition has occurred.
OOB = 0x10000000; // ZX_USER_SIGNAL_4
};
/// The object may be cast to the shared interface of devices.
@deprecated("devices will be services in the future")
type DeviceInfo = resource table {
/// An optional event which transmits information about a device's state.
///
/// The [`DeviceSignal`] values may be observed on this event.
1: unused zx.handle:EVENTPAIR;
};
/// The object may be cast to a Tty interface.
@deprecated("tty functionalities may be covered by a tty service")
type TtyInfo = resource table {
/// An optional event which transmits information about a device's state.
///
/// The [`DeviceSignal`] values may be observed on this event.
1: event zx.handle:EVENTPAIR;
};