blob: 96a7b413dac9c7c7838c91c21f6977fe836068a5 [file] [log] [blame]
// 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.
{
// This manifest shard defines the capability routing for bt-init components. We use a CML shard
// to allow child components to come from different URLs in production and test.
//
// CML files that include it to define a usable bt-init component should declare:
// 1. A `bt-gap` child component, with the URL set to the appropriate package and manifest.
// 2. A `bt-rfcomm` child component, with the URL set to the appropriate bt-rfcomm package.
// 3. A `bt-fastpair-provider` child component, with the URL set to the appropriate package.
// e.g.:
// children: [
// {
// name: "bt-gap",
// url: "fuchsia-pkg://fuchsia.com/bt-gap#meta/bt-gap.cm",
// },
// {
// name: "bt-rfcomm",
// url: "fuchsia-pkg://fuchsia.com/bt-rfcomm#meta/bt-rfcomm.cm",
// },
// {
// name: "bt-fastpair-provider",
// url: "fuchsia-pkg://fuchsia.com/bt-fastpair-provider#meta/bt-fastpair-provider.cm",
// },
// ],
include: [
"inspect/client.shard.cml",
"syslog/client.shard.cml",
],
program: {
runner: "elf",
binary: "bin/bt_init",
},
collections: [
{
name: "bt-host-collection",
durability: "single_run",
},
],
capabilities: [
{
protocol: [
"fuchsia.bluetooth.bredr.Profile",
"fuchsia.bluetooth.sys.Pairing",
],
},
],
use: [
{
protocol: "fuchsia.component.Realm",
from: "framework",
},
{
protocol: [ "fuchsia.bluetooth.snoop.Snoop" ],
from: "parent",
availability: "optional",
},
{
directory: "dev-bt-hci",
rights: [ "r*" ],
path: "/dev/class/bt-hci",
},
],
offer: [
{
directory: "dev-bt-hci",
from: "parent",
to: [ "#bt-host-collection" ],
},
{
protocol: [ "fuchsia.bluetooth.host.Receiver" ],
from: "#bt-gap",
to: [ "#bt-host-collection" ],
},
{
protocol: [
"fuchsia.device.NameProvider",
"fuchsia.stash.SecureStore",
],
from: "parent",
to: [ "#bt-gap" ],
},
{
protocol: [ "fuchsia.logger.LogSink" ],
from: "parent",
to: [
"#bt-fastpair-provider",
"#bt-gap",
"#bt-rfcomm",
],
},
{
protocol: [ "fuchsia.bluetooth.bredr.Profile" ],
from: "#bt-gap",
to: [ "#bt-rfcomm" ],
},
{
storage: "data",
from: "parent",
to: [ "#bt-fastpair-provider" ],
},
{
protocol: [ "fuchsia.metrics.MetricEventLoggerFactory" ],
from: "parent",
to: [ "#bt-fastpair-provider" ],
availability: "same_as_target",
},
{
protocol: [
"fuchsia.bluetooth.gatt2.Server",
"fuchsia.bluetooth.le.Peripheral",
"fuchsia.bluetooth.sys.HostWatcher",
"fuchsia.bluetooth.sys.Pairing",
],
from: "#bt-gap",
to: [ "#bt-fastpair-provider" ],
},
{
protocol: [ "fuchsia.bluetooth.bredr.Profile" ],
from: "self",
to: [ "#bt-fastpair-provider" ],
},
],
expose: [
{
protocol: [
"fuchsia.bluetooth.gatt.Server",
"fuchsia.bluetooth.gatt2.Server",
"fuchsia.bluetooth.le.Central",
"fuchsia.bluetooth.le.Peripheral",
"fuchsia.bluetooth.sys.Access",
"fuchsia.bluetooth.sys.Bootstrap",
"fuchsia.bluetooth.sys.Configuration",
"fuchsia.bluetooth.sys.HostWatcher",
],
from: "#bt-gap",
},
{
protocol: [ "fuchsia.bluetooth.fastpair.Provider" ],
from: "#bt-fastpair-provider",
},
{
protocol: [
"fuchsia.bluetooth.bredr.Profile",
"fuchsia.bluetooth.sys.Pairing",
],
from: "self",
},
],
config: {
autostart_snoop: { type: "bool" },
},
}