blob: aee5d8e5b086c971f031b48b6b45adb656db72c2 [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;
/// Declares a capability exposed to a component's containing realm, such as a
/// service exposed by the component or one of its children at runtime.
xunion ExposeDecl {
ExposeServiceDecl service;
ExposeDirectoryDecl directory;
};
/// Declares a service exposed to a component's containing realm, such as a
/// service exposed by the component or one of its children at runtime.
table ExposeServiceDecl {
/// The provider of the capability relative to the component itself.
1: ExposeSource source;
/// Path identifying the service, by which it was presented to this
/// component.
2: string:MAX_PATH_LENGTH source_path;
/// The path by which the capability is being exposed.
///
/// Must be an absolute path starting with /.
3: string:MAX_PATH_LENGTH target_path;
};
/// Declares a directory exposed to a component's containing realm, such as a
/// directory exposed by the component or one of its children at runtime.
table ExposeDirectoryDecl {
/// Path identifying the directory, by which it was presented to this
/// component.
1: string:MAX_PATH_LENGTH source_path;
/// The provider of the capability relative to the component itself.
2: ExposeSource source;
/// The path by which the capability is being exposed.
///
/// Must be an absolute path starting with /.
3: string:MAX_PATH_LENGTH target_path;
};
/// Identifies a source component of an ExposeDecl.
// TODO: Split ExposeSource by capability type.
xunion ExposeSource {
SelfRef myself;
ChildRef child;
};