协议
Builder
在 fuchsia.component.test/realm_builder.fidl 中定义
构建
组装正在构建的领域,并返回领域中根组件的网址,然后该网址可用于在已正确设置 fuchsia-test-component 的任何集合中创建新组件。调用此方法后,该领域的所有领域通道都将无法再使用。如果在此领域中使用了 AddLocalChild 函数,则必须提供 runner 参数,因为此运行程序通道将用于通知客户端何时开始和停止运行任何本地组件实现。
错误:
INVALID_COMPONENT_DECL:组件声明未通过验证。BUILD_ALREADY_CALLED:已在此渠道上多次调用Build函数。
请求
| 名称 | 类型 |
|---|---|
runner |
client_end:fuchsia.component.runner/ComponentRunner
|
响应
| 名称 | 类型 |
|---|---|
payload |
Builder_Build_Result
|
领域
在 fuchsia.component.test/realm_builder.fidl 中定义
AddCapability
向领域添加功能。
请求
| 名称 | 类型 |
|---|---|
capability |
fuchsia.component.decl/Capability
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddCapability_Result
|
AddChild
向领域添加组件。
url 可以采用以下格式之一:
- 绝对组件网址(例如“fuchsia-pkg://fuchsia.com/some-package#meta/some-component.cm”)
- 指向子打包组件的相对路径组件网址(例如“some-subpackage#meta/subpackaged-component.cm”);或
- 一个相对片段网址(例如
#meta/other-component.cm;请参阅 https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only),用于指示提供给RealmBuilderFactory::Create*()的pkg_dir中的组件清单的路径。
Realm Builder 客户端通常会将句柄传递给自己的 /pkg 目录,并将 other-component 捆绑到同一软件包中。
在这三种网址类型中,只有通过仅片段网址添加的组件声明可以通过 GetComponentDecl/ReplaceComponentDecl 进行修改,因为领域构建器实际上会根据组件清单和提供的 pkg_dir 中捆绑的文件(通常来自领域构建器客户端组件和通过仅片段网址添加的组件共享的软件包)执行自己的组件解析。
错误:
CHILD_ALREADY_EXISTS:此领域已包含具有给定名称的子级。INVALID_MANIFEST_EXTENSION:url的结尾不是.cmDECL_NOT_FOUND:测试软件包不包含仅片段组件网址引用的组件声明。DECL_READ_ERROR:尝试从测试软件包中读取仅含 fragment 的组件网址所引用的组件声明时,遇到 I/O 错误。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/child_name
|
url |
fuchsia.url/Url
|
options |
ChildOptions
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddChild_Result
|
AddChildFromDecl
向此领域添加一个组件,其声明设置为 decl。启动后,该组件将共享测试软件包作为其软件包目录,并可以访问其中的任何资源。
错误:
CHILD_ALREADY_EXISTS:此领域已包含具有给定名称的子级。INVALID_COMPONENT_DECL:decl验证失败。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/child_name
|
decl |
fuchsia.component.decl/Component
|
options |
ChildOptions
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddChildFromDecl_Result
|
AddChildRealm
添加一个子领域,该子领域可以使用 child_realm 的客户端端构建。
错误:
CHILD_ALREADY_EXISTS:此领域已包含具有给定名称的子级。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/name
|
options |
ChildOptions
|
child_realm |
server_end:Realm
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddChildRealm_Result
|
AddChildRealmFromDecl
添加一个子领域,该领域可以使用 child_realm 的客户端构建,其内容从 decl 初始化。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/name
|
decl |
fuchsia.component.decl/Component
|
options |
ChildOptions
|
child_realm |
server_end:Realm
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddChildRealmFromDecl_Result
|
AddChildRealmFromRelativeUrl
添加一个子领域,该领域可以使用 child_realm 的客户端构建,其内容从 relative_url 初始化。relative_url 必须是仅包含片段的网址。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/name
|
relative_url |
fuchsia.url/Url
|
options |
ChildOptions
|
child_realm |
server_end:Realm
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddChildRealmFromRelativeUrl_Result
|
AddCollection
向领域添加集合。
请求
| 名称 | 类型 |
|---|---|
collection |
fuchsia.component.decl/Collection
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddCollection_Result
|
AddEnvironment
向领域添加环境。
请求
| 名称 | 类型 |
|---|---|
environment |
fuchsia.component.decl/Environment
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddEnvironment_Result
|
AddLocalChild
向领域添加一个组件,其实现将由客户端提供。当此组件应启动时,传入 Build 的运行器通道将收到一个组件的启动请求,该组件的 ProgramDecl 包含所构建领域的根中的名字对象,该领域用于要在 program 键 LOCAL_COMPONENT_NAME 下运行的子级。
错误:
CHILD_ALREADY_EXISTS:此领域已包含具有给定名称的子级。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/child_name
|
options |
ChildOptions
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddLocalChild_Result
|
AddRoute
与 AddRouteFromDictionary 相同,但它不接受 from_dictionary,而是始终将其设置为“.”。
已弃用 - 请改用 AddRouteFromDictionary
请求
| 名称 | 类型 |
|---|---|
capabilities |
vector<Capability>
|
from |
fuchsia.component.decl/Ref
|
to |
vector<fuchsia.component.decl/Ref>
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddRoute_Result
|
AddRouteFromDictionary
更改领域中的组件清单,使 to 中的每个组件都具有 from 提供的 capabilities 中每个项的有效功能路由。
错误:
NO_SUCH_SOURCE:from引用了不存在的子级。NO_SUCH_TARGET:to引用了不存在的子级。CAPABILITIES_EMPTY:capabilities为空。TARGETS_EMPTY:to为空。SOURCE_AND_TARGET_MATCH:from等于to中的某个元素。INVALID_COMPONENT_DECL:请求的路由导致其中一个相关清单未能通过验证。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
capabilities |
vector<Capability>
|
from |
fuchsia.component.decl/Ref
|
from_dictionary |
fuchsia.component.decl/dictionary_path
|
to |
vector<fuchsia.component.decl/Ref>
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddRouteFromDictionary_Result
|
AddStorage
创建新的存储功能并将其路由到提供的目标。
(可选)可以将提供的通道连接到此存储功能的 fuchsia.sys2.StorageAdmin 协议。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/name
|
to |
vector<fuchsia.component.decl/Ref>
|
storage_admin |
server_end:fuchsia.component/StorageAdmin?
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_AddStorage_Result
|
GetComponentDecl
返回给定组件的组件声明。name 必须引用以下组件之一:
- 具有本地实现的组件
- 旧版组件
- 使用仅包含 fragment 的网址添加的组件(通常,组件与 realm builder 客户端捆绑在同一软件包中,共享同一
/pkg目录,例如#meta/other-component.cm;请参阅 https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only) - 自动生成的领域(例如:根)
错误:
NO_SUCH_CHILD:此领域不包含具有给定名称的子领域。CHILD_DECL_NOT_VISIBLE:无法为引用的子级提取组件声明,因为该子级是使用现代(非旧版)绝对网址或子打包组件的相对路径网址添加到领域的。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/child_name
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_GetComponentDecl_Result
|
GetRealmDecl
返回此领域的组件声明。
错误:
BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_GetRealmDecl_Result
|
InitMutableConfigFromPackage
在使用提供给构建器的值之前,先加载 name 的任何打包配置。
允许调用 SetConfigValue 来替换打包的配置。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/name
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_InitMutableConfigFromPackage_Result
|
InitMutableConfigToEmpty
仅使用为 name 的配置提供给构建器的值。
允许调用 SetConfigValue 来提供配置。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/name
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_InitMutableConfigToEmpty_Result
|
ReadOnlyDirectory
为此领域中的组件提供目录功能。该目录将是只读的(即具有 r* 权限),并且将包含 directory_contents 中所述的内容。
错误:
NO_SUCH_TARGET:offer-to引用了不存在的子级。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/name
|
to |
vector<fuchsia.component.decl/Ref>
|
directory_contents |
DirectoryContents
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_ReadOnlyDirectory_Result
|
ReplaceComponentDecl
替换给定组件的组件声明。name 必须引用以下组件之一:
- 具有本地实现的组件
- 旧版组件
- 使用仅包含 fragment 的网址添加的组件(通常,组件与 realm builder 客户端捆绑在同一软件包中,共享同一
/pkg目录,例如#meta/other-component.cm;请参阅 https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only) - 自动生成的领域(例如:根)
错误:
NO_SUCH_CHILD:此领域不包含具有给定名称的子领域。CHILD_ALREADY_EXISTS:声明被替换的组件已通过 Realm Builder 添加了一个子组件,该子组件与component_decl.children中的元素同名。CHILD_DECL_NOT_VISIBLE:无法为引用的子级操作组件声明,因为该子级是使用绝对(而非相对)和现代(而非旧版)网址添加到领域的。INVALID_COMPONENT_DECL:component_decl验证失败。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/child_name
|
component_decl |
fuchsia.component.decl/Component
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_ReplaceComponentDecl_Result
|
ReplaceRealmDecl
替换此领域的组件声明。
错误:
INVALID_COMPONENT_DECL:component_decl验证失败。BUILD_ALREADY_CALLED:已为此领域调用Builder.Build函数,因此无法再使用此Realm渠道。
请求
| 名称 | 类型 |
|---|---|
component_decl |
fuchsia.component.decl/Component
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_ReplaceRealmDecl_Result
|
SetConfigValue
为 key 指定的字段设置配置值。
指定的组件必须具有包含此字段的配置架构。
该值必须符合架构定义的所有限制条件。
必须在 InitMutableConfigFromPackage 或 InitMutableConfigToEmpty 之后调用此方法。
错误:
NO_CONFIG_SCHEMA:组件没有配置架构NO_SUCH_CONFIG_FIELD:在组件的配置架构中找不到keyCONFIG_VALUE_INVALID:value不符合配置架构限制条件
请求
| 名称 | 类型 |
|---|---|
name |
fuchsia.component/name
|
key |
fuchsia.component.decl/ConfigKey
|
value |
fuchsia.component.decl/ConfigValueSpec
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_SetConfigValue_Result
|
UseNestedComponentManager
告知领域构建器服务器此领域正在使用嵌套组件管理器。客户端库应该已经将领域的声明替换为直通组件管理器声明(根网址除外)。 此方法将安排 [Builder.Build] 将领域生成的网址安装为此组件管理器中的根网址。
请求
| 名称 | 类型 |
|---|---|
component_manager_relative_url |
fuchsia.url/Url
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_UseNestedComponentManager_Result
|
RealmBuilderFactory
在 fuchsia.component.test/realm_builder.fidl 中定义
此协议可用于指示 Realm Builder Server 开始创建新领域。
创建
创建新的 RealmBuilder。realm_server_end 的客户端可用于更改正在构建的领域,例如向领域添加新的子级或在它们之间添加功能路由。builder_server_end 的客户端端用于最终确定领域,之后可以在集合中启动该领域。
pkg_dir_handle 是测试包的句柄。Realm Builder 客户端通常会将句柄传递给自己的 /pkg 目录,并将 other-component 捆绑到同一软件包中。
请求
| 名称 | 类型 |
|---|---|
pkg_dir_handle |
client_end:fuchsia.io/Directory
|
realm_server_end |
server_end:Realm
|
builder_server_end |
server_end:Builder
|
响应
| 名称 | 类型 |
|---|---|
payload |
RealmBuilderFactory_Create_Result
|
CreateFromRelativeUrl
与 Create 相同,但默认情况下,领域不为空,而是包含位于测试软件包中 relative_url 指示的路径处的清单内容,该路径必须是仅包含 fragment 的网址(例如 #meta/other-component.cm;请参阅 https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only)。
请求
| 名称 | 类型 |
|---|---|
pkg_dir_handle |
client_end:fuchsia.io/Directory
|
relative_url |
fuchsia.url/Url
|
realm_server_end |
server_end:Realm
|
builder_server_end |
server_end:Builder
|
响应
| 名称 | 类型 |
|---|---|
payload |
RealmBuilderFactory_CreateFromRelativeUrl_Result
|
STRUCTS
Builder_Build_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
root_component_url |
string:4096
|
无默认应用 |
DirectoryContents 资源
在 fuchsia.component.test/realm_builder.fidl 中定义
应由领域构建器服务器提供的目录的内容。
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
entries |
vector<DirectoryEntry>:1024
|
无默认应用 |
DirectoryEntry 资源
在 fuchsia.component.test/realm_builder.fidl 中定义
目录中的条目。
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
file_path |
fuchsia.component/name
|
文件的路径。有效示例包括 |
无默认应用 |
file_contents |
fuchsia.mem/Buffer
|
文件的内容。 |
无默认应用 |
RealmBuilderFactory_CreateFromRelativeUrl_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
RealmBuilderFactory_Create_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddCapability_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddChildFromDecl_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddChildRealmFromDecl_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddChildRealmFromRelativeUrl_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddChildRealm_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddChild_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddCollection_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddEnvironment_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddLocalChild_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddRouteFromDictionary_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddRoute_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_AddStorage_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_GetComponentDecl_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
component_decl |
fuchsia.component.decl/Component
|
无默认应用 |
Realm_GetRealmDecl_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
component_decl |
fuchsia.component.decl/Component
|
无默认应用 |
Realm_InitMutableConfigFromPackage_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_InitMutableConfigToEmpty_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_ReadOnlyDirectory_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_ReplaceComponentDecl_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_ReplaceRealmDecl_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_SetConfigValue_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
Realm_UseNestedComponentManager_Response
在 fuchsia.component.test/realm_builder.fidl 中定义
<EMPTY>
枚举
RealmBuilderError 灵活
类型:uint32
在 fuchsia.component.test/realm_builder.fidl 中定义
Realm 和 Builder 协议可能返回的错误。
| 名称 | 值 | 说明 |
|---|---|---|
CHILD_ALREADY_EXISTS |
0 |
无法将子级添加到领域,因为领域中已存在具有该名称的子级。 |
INVALID_MANIFEST_EXTENSION |
1 |
向 |
INVALID_COMPONENT_DECL |
2 |
组件声明未通过验证。 |
NO_SUCH_CHILD |
3 |
引用的子级不存在。 |
CHILD_DECL_NOT_VISIBLE |
4 |
RealmBuilder 无法查看或操纵所引用子项的组件声明,因为该子项是使用既非仅片段也非旧版网址的网址添加到领域的。 |
NO_SUCH_SOURCE |
5 |
来源不存在。 |
NO_SUCH_TARGET |
6 |
目标不存在。 |
CAPABILITIES_EMPTY |
7 |
|
TARGETS_EMPTY |
8 |
|
SOURCE_AND_TARGET_MATCH |
9 |
|
DECL_NOT_FOUND |
10 |
测试软件包不包含仅 fragment 组件网址引用的组件声明。 |
DECL_READ_ERROR |
11 |
尝试从测试软件包中读取由仅片段组件网址引用的组件声明时,遇到了 I/O 错误。 |
BUILD_ALREADY_CALLED |
12 |
此渠道上已多次调用 |
CAPABILITY_INVALID |
13 |
某项功能无效。如果必填字段为空或收到不受支持的类型,就可能会发生这种情况。 |
INVALID_CHILD_REALM_HANDLE |
14 |
客户端为子领域提供的句柄不可用。 |
IMMUTABLE_PROGRAM |
15 |
对旧版或本地组件调用了 |
URL_IS_NOT_RELATIVE |
16 |
提供给 |
INVALID_PKG_DIR_HANDLE |
17 |
客户端为测试的 pkg 目录提供的句柄不可用。 |
NO_CONFIG_SCHEMA |
18 |
该组件未定义配置架构。不允许尝试设置配置值。 |
NO_SUCH_CONFIG_FIELD |
19 |
组件的配置架构没有具有该名称的字段。 |
CONFIG_VALUE_INVALID |
20 |
配置值无效。这可能意味着类型不匹配,或者字符串/向量长度等约束条件存在问题。 |
CONFIG_OVERRIDE_UNSUPPORTED |
21 |
无法设置配置值,因为领域尚未选择其替换政策。 新增:9
|
TABLES
ChildOptions
在 fuchsia.component.test/realm_builder.fidl 中定义
在将子级添加到领域时,可以对子级设置的属性。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
startup |
fuchsia.component.decl/StartupMode
|
如需了解此类型,请参阅 https://fuchsia.dev/go/components/declaration#StartupMode。
默认为 |
2 |
environment |
fuchsia.component/name
|
为子作业指定一个自定义环境,以便在其中运行。 |
3 |
on_terminate |
fuchsia.component.decl/OnTerminate
|
如需了解此类型,请参阅 https://fuchsia.dev/go/components/declaration#OnTerminate。
默认为 |
4 |
config_overrides |
vector<fuchsia.component.decl/ConfigOverride>
|
要应用于子组件的结构化配置替换。 只能提供由子组件声明为可由父组件替换的键。如需了解替换,请参阅 [fuchsia.component.decl/ConfigOverride]。 新增:13
|
配置
在 fuchsia.component.test/realm_builder.fidl 中定义
配置功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
功能的名称。 |
2 |
as |
fuchsia.component/name
|
功能重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
availability |
fuchsia.component.decl/Availability
|
可选。如果 |
字典
在 fuchsia.component.test/realm_builder.fidl 中定义
字典功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
字典的名称。 |
2 |
as |
fuchsia.component/name
|
字典的重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
type |
fuchsia.component.decl/DependencyType
|
如需了解此类型,请参阅 https://fuchsia.dev/go/components/declaration#DependencyType。此字段是可选字段,默认值为 |
4 |
availability |
fuchsia.component.decl/Availability
|
可选。如果 |
6 |
path |
string:4095
|
可选。使用此字典的路径(如果目标是本地组件)。 添加:HEAD
|
目录
在 fuchsia.component.test/realm_builder.fidl 中定义
目录功能。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
功能的名称。这不是目录的路径。 而是用于路由的名称。 |
2 |
as |
fuchsia.component/name
|
功能重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
type |
fuchsia.component.decl/DependencyType
|
如需了解此类型,请参阅 https://fuchsia.dev/go/components/declaration#DependencyType。此字段是可选字段,默认值为 |
4 |
subdir |
string:4095
|
此目录中要提供的子目录(而非根目录)。例如,如果您将 |
5 |
rights |
fuchsia.io/Rights
|
使用此目录的组件可设置的最大权限。 如果此字段被路由到本地组件,则为必填字段,否则为可选字段。 |
6 |
path |
string:4095
|
安装目录的路径。路径应以斜杠开头,但不得以斜杠结尾,例如 |
7 |
availability |
fuchsia.component.decl/Availability
|
可选。如果 新增:10
|
事件
在 fuchsia.component.test/realm_builder.fidl 中定义
事件功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
功能的名称。 |
2 |
as |
fuchsia.component/name
|
功能重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
filter |
fuchsia.data/Dictionary
|
要应用于事件的过滤条件。 |
4 |
availability |
fuchsia.component.decl/Availability
|
可选。如果 新增:10
|
EventStream
在 fuchsia.component.test/realm_builder.fidl 中定义
event_stream 功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
功能的名称。 |
2 |
as |
fuchsia.component/name
|
功能重命名,可在路由到另一个 |
3 |
path |
string:4095
|
设置 event_stream 的安装路径。 |
4 |
filter |
fuchsia.data/Dictionary
|
要应用于事件的过滤条件。 |
5 |
scope |
vector<fuchsia.component.decl/Ref>
|
此组件下的对象列表,用于缩小事件范围。 示例:#my_child_component、#my_child_collection。 |
协议
在 fuchsia.component.test/realm_builder.fidl 中定义
协议功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
功能的名称。这通常是 FIDL 协议的名称,例如 |
2 |
as |
fuchsia.component/name
|
功能重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
type |
fuchsia.component.decl/DependencyType
|
如需了解此类型,请参阅 https://fuchsia.dev/go/components/declaration#DependencyType。此字段是可选字段,默认值为 |
4 |
path |
string:4095
|
替换协议的安装路径。系统将使用此值,而不是 |
5 |
availability |
fuchsia.component.decl/Availability
|
可选。如果 新增:10
|
解析器
在 fuchsia.component.test/realm_builder.fidl 中定义
解析器功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
解析器的名称。 |
2 |
as |
fuchsia.component/name
|
解析器的重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
path |
string:4095
|
替换解析器的安装路径。系统将使用此值,而不是 |
跑酷游戏
在 fuchsia.component.test/realm_builder.fidl 中定义
运行器功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
运行器的名称。 |
2 |
as |
fuchsia.component/name
|
运行器的重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
path |
string:4095
|
替换运行器的安装路径。系统将使用此值,而不是 |
服务
在 fuchsia.component.test/realm_builder.fidl 中定义
服务功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
功能的名称。这通常是 FIDL 服务的名称,例如 |
2 |
as |
fuchsia.component/name
|
功能重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
path |
string:4095
|
替换服务的安装路径。系统将使用此值,而不是 |
4 |
availability |
fuchsia.component.decl/Availability
|
可选。如果 新增:10
|
存储
在 fuchsia.component.test/realm_builder.fidl 中定义
存储功能
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
fuchsia.component/name
|
功能的名称。这不是目录的路径。 而是用于路由的名称。 |
2 |
as |
fuchsia.component/name
|
功能重命名,可在路由到其他组件时设置。此字段是可选字段。 |
3 |
path |
fuchsia.component/name
|
安装目录的路径。路径应以斜杠开头,但不得以斜杠结尾,例如 |
4 |
availability |
fuchsia.component.decl/Availability
|
可选。如果 新增:10
|
UNIONS
Builder_Build_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Builder_Build_Response
|
|
2 |
err |
RealmBuilderError
|
功能灵活
在 fuchsia.component.test/realm_builder.fidl 中定义
可以使用 AddRoute 在领域周围路由的功能。
一旦此文件中先前以此名称定义的其他定义被移除,此定义将被重命名为 Capability。
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
protocol |
Protocol
|
|
2 |
directory |
Directory
|
|
3 |
storage |
Storage
|
|
4 |
service |
Service
|
|
6 |
event_stream |
EventStream
|
新增:9
|
7 |
config |
Config
|
新增:20
|
8 |
dictionary |
Dictionary
|
新增:25
|
9 |
resolver |
Resolver
|
新增:24
|
10 |
runner |
Runner
|
新增:24
|
RealmBuilderFactory_CreateFromRelativeUrl_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
RealmBuilderFactory_CreateFromRelativeUrl_Response
|
|
2 |
err |
RealmBuilderError
|
RealmBuilderFactory_Create_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
RealmBuilderFactory_Create_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddCapability_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddCapability_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddChildFromDecl_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddChildFromDecl_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddChildRealmFromDecl_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddChildRealmFromDecl_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddChildRealmFromRelativeUrl_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddChildRealmFromRelativeUrl_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddChildRealm_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddChildRealm_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddChild_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddChild_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddCollection_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddCollection_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddEnvironment_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddEnvironment_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddLocalChild_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddLocalChild_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddRouteFromDictionary_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddRouteFromDictionary_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddRoute_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddRoute_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_AddStorage_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_AddStorage_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_GetComponentDecl_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_GetComponentDecl_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_GetRealmDecl_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_GetRealmDecl_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_InitMutableConfigFromPackage_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_InitMutableConfigFromPackage_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_InitMutableConfigToEmpty_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_InitMutableConfigToEmpty_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_ReadOnlyDirectory_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_ReadOnlyDirectory_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_ReplaceComponentDecl_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_ReplaceComponentDecl_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_ReplaceRealmDecl_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_ReplaceRealmDecl_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_SetConfigValue_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_SetConfigValue_Response
|
|
2 |
err |
RealmBuilderError
|
Realm_UseNestedComponentManager_Result strict
在 fuchsia.component.test/realm_builder.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_UseNestedComponentManager_Response
|
|
2 |
err |
RealmBuilderError
|
常量
| 名称 | 值 | 类型 | 说明 |
|---|---|---|---|
| LOCAL_COMPONENT_NAME_KEY | LOCAL_COMPONENT_NAME |
String |
|
| MAX_DIRECTORY_ENTRIES |
1024
|
uint32 |
一次调用 |