| // 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.sys2; |
| |
| /// Declares a capability used by a component, which was offered to the |
| /// component's environment. |
| xunion UseDecl { |
| UseServiceDecl service; |
| UseLegacyServiceDecl legacy_service; |
| UseDirectoryDecl directory; |
| UseStorageDecl storage; |
| }; |
| |
| /// Declares a service used by a component, which was offered to the component's |
| /// environment. |
| /// |
| /// To learn more about services, see: |
| /// https://fuchsia.dev/fuchsia-src/glossary#service |
| table UseServiceDecl { |
| /// The provider of the service relative to the component itself. Must |
| /// be |realm| or |framework|. |
| 1: Ref source; |
| |
| /// Path identifying the service, by which it was presented to this |
| /// component. |
| /// |
| /// Must be an absolute path starting with /. |
| 2: string:MAX_PATH_LENGTH source_path; |
| |
| /// The path where the capability should be installed in the component's |
| /// namespace. |
| /// |
| /// Must be an absolute path starting with /. |
| 3: string:MAX_PATH_LENGTH target_path; |
| }; |
| |
| /// Declares a legacy service used by a component, which was offered to the |
| /// component's environment. |
| /// |
| /// A legacy service is a service with a single instance, provided by a single |
| /// FIDL protocol. |
| table UseLegacyServiceDecl { |
| /// The provider of the legacy service relative to the component itself. |
| /// Must be |realm| or |framework|. |
| 1: Ref source; |
| |
| /// Path identifying the legacy service, by which it was presented to this |
| /// component. |
| 2: string:MAX_PATH_LENGTH source_path; |
| |
| /// The path where the capability should be installed in the component's |
| /// namespace. |
| /// |
| /// Must be an absolute path starting with /. |
| 3: string:MAX_PATH_LENGTH target_path; |
| }; |
| |
| /// Declares a directory used by a component, which was offered to the |
| /// component's environment. |
| table UseDirectoryDecl { |
| /// The provider of the directory relative to the component itself. Must |
| /// be |realm| or |framework|. |
| 1: Ref source; |
| |
| /// Path identifying the directory, by which it was presented to this |
| /// component. |
| 2: string:MAX_PATH_LENGTH source_path; |
| |
| /// The path where the capability should be installed in the component's |
| /// namespace. |
| /// |
| /// Must be an absolute path starting with /. |
| 3: string:MAX_PATH_LENGTH target_path; |
| }; |
| |
| /// Declares storage used by a component, which was offered to the component's |
| /// environment. |
| table UseStorageDecl { |
| /// Type of storage used by the component. |
| 1: StorageType type; |
| |
| /// The path where the capability should be installed in the component's |
| /// namespace. Must not be set if `type` is `META`. |
| /// |
| /// Must be an absolute path starting with /. |
| 2: string:MAX_PATH_LENGTH target_path; |
| }; |