| // 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; |
| |
| using fuchsia.component; |
| |
| /// The type of storage offered by this component. |
| enum StorageType { |
| /// General data storage. |
| DATA = 1; |
| |
| /// Cache storage that may be deleted at any time by the system. |
| CACHE = 2; |
| |
| /// Meta storage that will be used by component manager to persist metadata |
| /// and other information about the component |
| META = 3; |
| }; |
| |
| /// Declares a storage capability backed by a directory from which data, cache, |
| /// or meta storage can be offered. |
| table StorageDecl { |
| /// The name of this storage |
| 1: string:fuchsia.component.MAX_STORAGE_NAME_LENGTH name; |
| |
| /// The provider of the underlying directory capability relative to the |
| /// component itself. Must be `realm`, `self`, or `child`. |
| 2: Ref source; |
| |
| /// The incoming path to the directory capability. If "source == SELF", this |
| /// is a path in the component's outgoing directory. Otherwise, it is the |
| /// path by which the capability was presented to the component. |
| 3: string:fuchsia.component.MAX_PATH_LENGTH source_path; |
| }; |