blob: 71edeb29fe582976567e0ffb1a785d7c3a2359e1 [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.hardware.bluetooth;
using fuchsia.bluetooth.test;
using zx;
const MAX_NAME_LENGTH uint32 = 32;
/// Used for spawning virtual Bluetooth devices.
protocol VirtualController {
/// Creates a child device, and returns the name of the child created.
CreateEmulator() -> (struct {
name string:<MAX_NAME_LENGTH, optional>;
}) error zx.status;
/// Creates a virtual Bluetooth serial device, speaking the BT HCI UART
/// protocol on the provided handle.
/// The zircon channel is closed in the event of an error.
CreateLoopbackDevice(resource struct {
channel zx.handle:CHANNEL;
});
};
/// Represents the bt-emulator device protocol. A bt-emulator device is used for configuring and
/// publishing fake bt-hci devices.
protocol Emulator {
/// Opens a fake controller management channel.
/// Only one channel to this protocol can be open on a given bt-hci-emulator
/// device.
Open(resource struct {
channel server_end:fuchsia.bluetooth.test.HciEmulator;
});
};