blob: 57481d0089c1e51f523e095689b9e512017efe36 [file] [log] [blame] [edit]
// Copyright 2021 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.
deprecated_syntax;
library fuchsia.bluetooth.rfcomm.test;
using fuchsia.bluetooth as bt;
using fuchsia.bluetooth.bredr as bredr;
/// The status of the line.
///
/// These are defined in GSM 07.10 Section 5.4.6.3.10.
enum Status {
OK = 0;
OVERRUN_ERROR = 1;
PARITY_ERROR = 2;
FRAMING_ERROR = 3;
};
/// Provides additional methods to initiate RFCOMM protocol behavior. These methods
/// are strictly for testing.
[Discoverable]
protocol RfcommTest {
/// Disconnect the RFCOMM session with the connected peer.
///
/// This is a no-op if there is no connected peer with identifier `id`.
///
/// + request `id` is the unique identifier associated with the connected RFCOMM peer.
Disconnect(bt.PeerId id);
/// Notify the connected peer of a change in the remote line status.
///
/// This is a no-op if there is no connected peer with identifier `id`.
///
/// + request `id` is the unique identifier associated with the connected RFCOMM peer.
/// + request `channel_number` is the identifier of the RFCOMM channel whose line status changed.
/// + request `status` is the status of the line.
RemoteLineStatus(bt.PeerId id, bredr.RfcommChannel channel_number, Status status);
};