blob: c5bb10ce3b5639313e4bc8f5ad77baa590f4e8f4 [file] [log] [blame]
// 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;
/// A reference to a capability source or destination relative to this
/// component.
xunion Ref {
RealmRef realm;
SelfRef self;
ChildRef child;
CollectionRef collection;
StorageRef storage;
FrameworkRef framework;
};
/// A reference to a component’s containing realm, i.e. the parent component.
struct RealmRef {};
/// A reference to the component itself.
struct SelfRef {};
/// A reference to one of the component's child instances.
struct ChildRef {
/// The name assigned to the child by its parent. If `collection` is set,
/// `name` is scoped to `collection` and the child is a dynamic instance.
/// Required.
child_name name;
/// The collection `name` belongs to. If omitted, `name` references a static
/// instance. This field must be omitted if the `ChildRef` is being used in
/// a component declaration. Optional.
collection_name? collection;
};
/// A reference to one of the component's collections.
struct CollectionRef {
collection_name name;
};
/// A reference to one of the component's storage sections.
struct StorageRef {
string:MAX_STORAGE_NAME_LENGTH name;
};
/// A reference to the component framework itself.
struct FrameworkRef {};