| // Copyright 2022 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. |
| { |
| include: [ |
| "inspect/offer.shard.cml", |
| "syslog/client.shard.cml", |
| "trace/client.shard.cml", |
| ], |
| program: { |
| runner: "elf", |
| binary: "bin/camera_device_watcher_bin", |
| }, |
| collections: [ |
| { |
| name: "csi_camera_devices", |
| durability: "single_run", |
| }, |
| { |
| name: "usb_camera_devices", |
| durability: "single_run", |
| }, |
| ], |
| capabilities: [ |
| { |
| protocol: [ |
| "fuchsia.camera.test.DeviceWatcherTester", |
| "fuchsia.camera3.DeviceWatcher", |
| ], |
| }, |
| ], |
| use: [ |
| { |
| directory: "dev-camera", |
| rights: [ "r*" ], |
| path: "/dev/class/camera", |
| }, |
| { |
| protocol: [ "fuchsia.component.Realm" ], |
| from: "framework", |
| }, |
| ], |
| offer: [ |
| { |
| protocol: [ |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.sysmem2.Allocator", |
| ], |
| from: "parent", |
| to: [ |
| "#csi_camera_devices", |
| "#usb_camera_devices", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.metrics.MetricEventLoggerFactory", |
| "fuchsia.ui.policy.DeviceListenerRegistry", |
| ], |
| from: "parent", |
| to: [ |
| "#csi_camera_devices", |
| "#usb_camera_devices", |
| ], |
| }, |
| { |
| directory: "dev-camera", |
| from: "parent", |
| to: [ |
| "#csi_camera_devices", |
| "#usb_camera_devices", |
| ], |
| }, |
| ], |
| expose: [ |
| { |
| protocol: [ |
| "fuchsia.camera.test.DeviceWatcherTester", |
| "fuchsia.camera3.DeviceWatcher", |
| ], |
| from: "self", |
| }, |
| ], |
| } |