blob: a874fe74b5effad68aed415cdf2b862227b61ca2 [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.term;
using zx;
const uint64 MAX_BUF = 900;
/// Defines a protocol to read and write to a Pty terminal.
protocol Pty {
/// Event stream when command is closed.
-> OnClose();
/// Event stream when data is available.
-> OnRead(vector<uint8>:MAX_BUF data);
/// Writes data.
Write(vector<uint8>:MAX_BUF data);
/// Sets the window size.
SetWindowSize(uint32 columns, uint32 rows);
};
/// Defines a protocol to create Pty terminal.
[Discoverable]
protocol Term {
CreatePty(vector<string> commandArgs, request<Pty> request) -> (zx.status status);
};