blob: 3730daed7a033574e8714f1c175a8a18e0d0edab [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.
flexible union Ref {
1: ParentRef parent;
2: SelfRef self;
3: ChildRef child;
4: CollectionRef collection;
5: FrameworkRef framework;
6: CapabilityRef capability;
7: DebugRef debug;
};
/// A reference to a component’s parent instance.
struct ParentRef {
};
/// A reference to the component itself.
struct SelfRef {
};
/// A reference to the environment's debug capabilities.
struct DebugRef {
};
/// 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.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.name? collection;
};
/// A reference to one of the component's collections.
struct CollectionRef {
fuchsia.component.name name;
};
/// A reference to the component framework itself.
struct FrameworkRef {
};
/// A reference to a capability declared in this component.
struct CapabilityRef {
string:fuchsia.component.MAX_NAME_LENGTH name;
};