blob: 0902a638366baaac79067eb78051fc2b2c101d0e [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.bluetooth.sys;
using fuchsia.bluetooth as bt;
using zx;
/// Information about a Bluetooth controller and its associated host-subsystem state.
type HostInfo = table {
/// Uniquely identifies a host on the current system.
/// This field is always present.
1: id bt.HostId;
/// The Bluetooth technologies that are supported by this adapter.
/// This field is always present.
2: technology TechnologyType;
/// The identity address - this is always the Public address of the host.
/// # Deprecation
/// The `addresses` field provides more information about the host.
/// This field is always present.
@available(deprecated=11, removed=12, note="Removed in 12, use HostInfo.addresses instead")
3: address bt.Address;
/// Indicates whether or not this is the active host. The system has one active host which
/// handles all Bluetooth procedures.
4: active bool;
/// The local name of this host. This is the name that is visible to other devices when this
/// host is in the discoverable mode.
5: local_name bt.DeviceName;
/// Whether or not the local adapter is currently discoverable over BR/EDR and
/// LE physical channels.
6: discoverable bool;
/// Whether or not device discovery is currently being performed.
7: discovering bool;
/// The addresses (LE and/or BR/EDR) associated with the host.
/// The Public address is always reported first.
/// This field is always present.
8: addresses vector<bt.Address>:MAX;
/// Protocol used to observe and manage the Bluetooth controllers on the system.
closed protocol HostWatcher {
/// Obtain a list of all available Bluetooth controllers and their state. A response is sent
/// only if this list has changed since the last time the client has sent this message.
strict Watch() -> (struct {
hosts vector<HostInfo>:MAX;
/// Designates the host with the given `id` as active. All Bluetooth procedures will be routed
/// over this host. Any previously assigned active host will be disabled and all of its pending
/// procedures will be terminated.
/// * error This can fail if a host with `id` was not found.
strict SetActive(struct {
id bt.HostId;
}) -> () error zx.Status;