blob: c6659102061e2c3fc576e9e42ec9a9f6ba64d023 [file] [log] [blame]
// Copyright 2017 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.le;
using fuchsia.bluetooth as bt;
@deprecated("Use ServiceData instead")
type ServiceDataEntry = struct {
uuid bt.UuidString;
data vector<uint8>:MAX;
};
@deprecated("Use ManufacturerData instead")
type ManufacturerSpecificDataEntry = struct {
company_id uint16;
data vector<uint8>:MAX;
};
/// Represents advertising and scan response data advertised by a broadcaster or peripheral.
@deprecated("Use AdvertisingData instead")
type AdvertisingDataDeprecated = struct {
/// Name of the device.
name bt.DeviceName:optional;
/// The radio transmission power level reported in the advertisement.
tx_power_level box<bt.Int8>;
/// The appearance reported in the advertisemet.
appearance box<bt.UInt16>;
/// List of service UUIDs reported in the advertisement.
service_uuids vector<bt.UuidString>:<MAX, optional>;
/// Service data included in the advertisement.
service_data vector<ServiceDataEntry>:<MAX, optional>;
/// Manufacturer specific data entries.
manufacturer_specific_data vector<ManufacturerSpecificDataEntry>:<MAX, optional>;
/// Service UUIDs that were solicited in the advertisement. Peripherals can invite centrals that
/// expose certain services to connect to them using service solicitation.
solicited_service_uuids vector<bt.UuidString>:<MAX, optional>;
/// URIs included in the advertising packet.
/// These are full URIs (they are encoded/decoded automatically)
uris vector<string:MAX>:<MAX, optional>;
};
/// Represents a remote Bluetooth Low Energy device. A RemoteDevice can represent a central,
/// broadcaster, or peripheral based on the API from which it was received.
@deprecated("Use Peer instead")
type RemoteDevice = struct {
/// Identifier that uniquely identifies this device on the current system.
identifier bt.PeerIdString;
/// Whether or not this device is connectable. Non-connectable devices are typically acting in the
/// LE broadcaster role.
connectable bool;
/// The last known RSSI of this device, if known.
rssi box<bt.Int8>;
/// Advertising data broadcast by this device if this device is a broadcaster or peripheral.
advertising_data box<AdvertisingDataDeprecated>;
};
/// Filter parameters for use during a scan. A discovered peripheral or broadcaster will be reported
/// to applications only if it satisfies all of the provided filter parameters. Null fields will be
/// ignored.
@deprecated("Use Filter instead")
type ScanFilter = struct {
/// Filter based on advertised service UUIDs. A peripheral that advertises at least one of the
/// entries in `service_uuids` will satisfy this filter.
service_uuids vector<bt.UuidString>:<MAX, optional>;
/// Filter based on service data containing one of the given UUIDs.
service_data_uuids vector<bt.UuidString>:<MAX, optional>;
/// Filter based on a company identifier present in the manufacturer data. If this filter parameter
/// is set, then the advertising payload must contain manufacturer specific data with the provided
/// company identifier to satisfy this filter.
manufacturer_identifier box<bt.UInt16>;
/// Filter based on whether or not a device is connectable. For example, a client that is only
/// interested in peripherals that it can connect to can set this to true. Similarly a client can
/// scan only for braodcasters by setting this to false.
connectable box<bt.Bool>;
/// Filter results based on a portion of the advertised device name.
name_substring bt.DeviceName:optional;
/// Filter results based on the path loss of the radio wave. A device that matches this filter must
/// satisfy the following:
/// 1. Radio transmission power level and received signal strength must be available for the path
/// loss calculation;
/// 2. The calculated path loss value must be less than, or equal to, `max_path_loss`.
max_path_loss box<bt.Int8>;
};