blob: 143511c11459ad0004c1665ea1088daa4785a80a [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;
using fuchsia.component;
/// A reference to a capability source or destination relative to this
/// component.
xunion Ref {
1: RealmRef realm;
2: SelfRef self;
3: ChildRef child;
4: CollectionRef collection;
5: StorageRef storage;
6: 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.
fuchsia.component.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.
fuchsia.component.collection_name? collection;
};
/// A reference to one of the component's collections.
struct CollectionRef {
fuchsia.component.collection_name name;
};
/// A reference to one of the component's storage sections.
struct StorageRef {
string:fuchsia.component.MAX_STORAGE_NAME_LENGTH name;
};
/// A reference to the component framework itself.
struct FrameworkRef {
};