协议
Binder
在 fuchsia.component/binder.fidl 中定义
框架提供的协议,允许使用该协议的组件绑定到公开该协议的组件。连接到此协议的操作将触发绑定。因此,此协议不包含任何方法。如需详细了解绑定,请参阅 https://fuchsia.dev/fuchsia-src/concepts/components/v2/lifecycle#binding。
当组件连接到协议时,公开此功能的组件(如果尚未运行)将会启动。如果启动失败,组件框架将使用 zx.Status 墓志铭关闭通道的服务器端。
ChildIterator
在 fuchsia.component/realm.fidl 中定义
用于遍历领域中子级列表的协议。
下一步
推进迭代器并返回下一批子项。
返回 ChildRef 的向量。当没有更多子节点时,返回空向量。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
children |
vector<fuchsia.component.decl/ChildRef>:128
|
控制器
在 fuchsia.component/controller.fidl 中定义
用于对组件进行操作的协议。
使用 Realm.CreateChild 方法创建组件时,用户可能会获得对 Controller 的访问权限。您还可以使用 Realm.OpenController 方法获取现有子组件的 Controller。
销毁
销毁此组件。当此方法返回时,组件要么已被销毁,要么在发生错误时未发生销毁。
错误:
ACCESS_DENIED:不允许销毁此组件。 目前,如果组件是其父级的静态子级,则可能会发生这种情况。INTERNAL:某些原因导致销毁失败 - 组件管理器的日志将包含更多详细信息。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
Controller_Destroy_Result
|
GetExposedDictionary
返回包含组件公开功能的字典。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
Controller_GetExposedDictionary_Result
|
GetOutputDictionary
返回对组件输出字典的引用,该字典可通过 fuchsia.component.runtime.Capabilities API 进行交互。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
Controller_GetOutputDictionary_Result
|
IsStarted
如果此实例当前正在运行,则返回 true。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
Controller_IsStarted_Result
|
OpenExposedDir
打开受控组件的公开目录,通过该目录,组件通过 ComponentDecl.exposes 公开的功能在成功时可用。
绑定到公开的目录需要解析组件,但在请求需要启动组件的功能之前/除非请求需要启动组件的功能,否则不会启动该组件。
如果此组件被销毁,则与 exposed_dir 的所有未完成连接都将关闭。
错误:
INSTANCE_CANNOT_RESOLVE:此组件未能解析。
请求
| 名称 | 类型 |
|---|---|
exposed_dir |
server_end:fuchsia.io/Directory
|
响应
| 名称 | 类型 |
|---|---|
payload |
Controller_OpenExposedDir_Result
|
开始
启动组件,并视需要提供要提供给组件的其他句柄。如果实例当前正在运行,则返回 INSTANCE_ALREADY_RUNNING。
请求
| 名称 | 类型 |
|---|---|
args |
StartChildArgs
|
execution_controller |
server_end:ExecutionController
|
响应
| 名称 | 类型 |
|---|---|
payload |
Controller_Start_Result
|
EventStream
在 fuchsia.component/events.fidl 中定义
组件层次结构上的事件监听器。 无法在平台之外使用。
GetNext
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
events |
vector<Event>
|
WaitForReady
立即返回。用于指示 FIDL 连接已完成。对于非静态数据流,需要执行此操作,以验证在组件启动之前订阅已完成。
请求
<EMPTY>
响应
<EMPTY>
ExecutionController
在 fuchsia.component/controller.fidl 中定义
OnStop
当子进程因 Stop 被调用、子进程自行退出或任何其他原因而停止时,系统会调用 OnStop,然后关闭此通道。
响应
| 名称 | 类型 |
|---|---|
stopped_payload |
StoppedPayload
|
停止
对此组件发起停止操作。完成后,系统会使用已停止的载荷调用 OnStop,并且此通道会关闭。
请注意,组件可能随时自行停止运行,因此可能会在调用 Stop 之前收到 OnStop。
请求
<EMPTY>
Introspector
在 fuchsia.component/introspector.fidl 中定义
组件实例用于获取其自身领域中组件相关信息的协议。
此协议目前仅支持获取名字对象,但可以扩展到其他特权信息,例如组件的网址。
组件框架会向使用框架中的 fuchsia.component.Introspector 的组件提供此功能。
GetMoniker
获取与所提供令牌对应的组件的此领域相对名字。运行程序可通过 fuchsia.component.runner/ComponentStartInfo.component_instance 获取令牌。
如果令牌无效或不对应于此领域下的组件,则返回 Error.INSTANCE_NOT_FOUND。
请求
| 名称 | 类型 |
|---|---|
component_instance |
handle<event>
|
响应
| 名称 | 类型 |
|---|---|
payload |
Introspector_GetMoniker_Result
|
命名空间
在 fuchsia.component/namespace.fidl 中定义
用于执行命名空间操作的协议。
创建
请求
| 名称 | 类型 |
|---|---|
entries |
vector<NamespaceInputEntry>
|
响应
| 名称 | 类型 |
|---|---|
payload |
Namespace_Create_Result
|
Create2
请求
| 名称 | 类型 |
|---|---|
entries |
vector<NamespaceInputEntry2>
|
响应
| 名称 | 类型 |
|---|---|
payload |
Namespace_Create2_Result
|
Realm
在 fuchsia.component/realm.fidl 中定义
组件实例用于管理其自身领域(例如,用于绑定到其子级)的协议。
对此协议的请求将按照接收顺序进行处理。 希望并行发送请求的客户端应打开多个连接。
组件框架会向使用 fuchsia.component.Realm 的组件提供此服务。
CreateChild
动态创建子组件实例。当此函数成功返回时,实例存在,但可能未运行。
子实例的环境由集合的环境决定。decl 不得设置 environment。
如果为 decl.startup == EAGER 或 collection.durability == SINGLE_RUN,[CreateChild] 将启动组件,并在组件启动后返回。否则,[CreateChild] 将在创建组件后立即返回,而不会启动或解析该组件。
错误:
INVALID_ARGUMENTS:collection不是有效的引用,或者child不是有效的声明。COLLECTION_NOT_FOUND:collection不存在。INSTANCE_ALREADY_EXISTS:decl.name已存在于collection中。INSTANCE_CANNOT_RESOLVE:child的组件声明未能解析到SingleRun集合中。NO_SPACE:无法为新实例分配存储空间。INSTANCE_DIED:此领域已不存在。
请求
| 名称 | 类型 |
|---|---|
collection |
fuchsia.component.decl/CollectionRef
|
decl |
fuchsia.component.decl/Child
|
args |
CreateChildArgs
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_CreateChild_Result
|
DestroyChild
销毁动态创建的组件实例。当此函数返回时,实例会被销毁并停止运行。不过,在此函数返回后,组件资源(例如其隔离存储空间)的清理可能会在后台进行。
错误:
INVALID_ARGUMENTS:child不是有效的引用,或者未引用动态实例。INSTANCE_NOT_FOUND:child不存在。COLLECTION_NOT_FOUND:collection不存在。INSTANCE_DIED:此领域已不存在。
请求
| 名称 | 类型 |
|---|---|
child |
fuchsia.component.decl/ChildRef
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_DestroyChild_Result
|
GetChildOutputDictionary
返回对子级输出字典的引用,该字典可通过使用 fuchsia.component.runtime.Capabilities API 进行交互。
请求
| 名称 | 类型 |
|---|---|
child |
fuchsia.component.decl/ChildRef
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_GetChildOutputDictionary_Result
|
GetChildOutputDictionaryDeprecated
请求
| 名称 | 类型 |
|---|---|
child |
fuchsia.component.decl/ChildRef
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_GetChildOutputDictionaryDeprecated_Result
|
GetResolvedInfo
返回此组件的解析器提供给组件框架的信息集。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_GetResolvedInfo_Result
|
ListChildren
返回一个迭代器,用于列出集合中的所有实例。
注意:结果不一定一致。在迭代器处于活动状态时,系统可能会创建或销毁实例,但在此方法返回后,迭代器不会观察到这些更改。
错误:
INVALID_ARGUMENTS:collection不是有效的引用,或者iter没有ZX_RIGHT_WAIT。COLLECTION_NOT_FOUND:collection不存在。INSTANCE_DIED:此领域已不存在。- 如果
iter没有标准通道权限,此函数可能会返回ACCESS_DENIED,或者组件管理器可能会关闭iter。
请求
| 名称 | 类型 |
|---|---|
collection |
fuchsia.component.decl/CollectionRef
|
iter |
server_end:ChildIterator
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_ListChildren_Result
|
OpenController
对子组件执行操作。请参阅 Controller 的文档。
错误:
INVALID_ARGUMENTS:child不是有效的子引用。INSTANCE_NOT_FOUND:child不存在。INSTANCE_DIED:此领域已不存在。
请求
| 名称 | 类型 |
|---|---|
child |
fuchsia.component.decl/ChildRef
|
controller |
server_end:Controller
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_OpenController_Result
|
OpenExposedDir
打开子组件的公开目录。当此函数成功返回时,exposed_dir 会绑定到一个目录,该目录包含子级通过 ComponentDecl.exposes 向其领域公开的功能(通过组件清单中的“expose”声明指定)。子组件不会因该调用而启动。
只要 child 存在,exposed_dir 就会处于打开状态。
错误:
INVALID_ARGUMENTS:child不是有效的子引用。INSTANCE_NOT_FOUND:child不存在。INSTANCE_CANNOT_RESOLVE:child的组件声明未能解析。INSTANCE_DIED:此领域已不存在。
请求
| 名称 | 类型 |
|---|---|
child |
fuchsia.component.decl/ChildRef
|
exposed_dir |
server_end:fuchsia.io/Directory
|
响应
| 名称 | 类型 |
|---|---|
payload |
Realm_OpenExposedDir_Result
|
StorageAdmin
在 fuchsia.component/storage_admin.fidl 中定义
DeleteAllStorageContents
删除所有存储空间的内容。存储目录会保留,因此任何使用存储空间的组件都可以继续使用存储空间来创建新文件和目录。
仅当根本无法清除任何存储空间时,才会返回 Error::INTERNAL。 即使在删除过程中发生一些错误,也会成功返回。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
StorageAdmin_DeleteAllStorageContents_Result
|
DeleteComponentStorage
删除此组件的存储空间内容。在存储后备目录中保留组件的子目录本身。提供的名字对象是相对于声明存储功能的组件而言的。
请求
| 名称 | 类型 |
|---|---|
relative_moniker |
string:4096
|
响应
| 名称 | 类型 |
|---|---|
payload |
StorageAdmin_DeleteComponentStorage_Result
|
GetStatus
获取存储空间的当前状态。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
StorageAdmin_GetStatus_Result
|
ListStorageInRealm
列出指定领域下使用存储功能的后代组件。提供的名字对象是相对于声明存储功能的组件而言的。
如果领域不存在,则返回 INSTANCE_NOT_FOUND;如果 |relative_moniker| 格式不正确,则返回 INVALID_ARGS。
请求
| 名称 | 类型 |
|---|---|
relative_moniker |
string:4096
|
iterator |
server_end:StorageIterator
|
响应
| 名称 | 类型 |
|---|---|
payload |
StorageAdmin_ListStorageInRealm_Result
|
OpenComponentStorageById
打开给定存储空间 ID 的隔离目录。为此存储空间创建后备子目录(如果尚未创建)。
请求
| 名称 | 类型 |
|---|---|
id |
string:64
|
object |
server_end:fuchsia.io/Node
|
响应
| 名称 | 类型 |
|---|---|
payload |
StorageAdmin_OpenComponentStorageById_Result
|
OpenStorage
打开给定组件的隔离目录。提供的名字对象是相对于声明存储功能的组件而言的。为此存储空间创建后备子目录(如果尚未创建)。
请求
| 名称 | 类型 |
|---|---|
relative_moniker |
string:4096
|
object |
server_end:fuchsia.io/Node
|
响应
| 名称 | 类型 |
|---|---|
payload |
StorageAdmin_OpenStorage_Result
|
StorageIterator
在 fuchsia.component/storage_admin.fidl 中定义
一种迭代器协议,用于使用存储功能返回一组组件。如需了解详情,请参阅 |StorageAdmin.ListStorageInRealm|。
下一步
使用存储功能检索下一组组件。返回的绰号相对于声明存储功能组件。在返回所有组件后返回一个空向量。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
relative_monikers |
vector<string:4096>
|
STRUCTS
Controller_Destroy_Response
在 fuchsia.component/controller.fidl 中定义
<EMPTY>
Controller_GetExposedDictionary_Response 资源
在 fuchsia.component/controller.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
dictionary |
fuchsia.component.sandbox/DictionaryRef
|
无默认应用 |
Controller_GetOutputDictionary_Response 资源
在 fuchsia.component/controller.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
dictionary |
handle<eventpair>
|
无默认应用 |
Controller_IsStarted_Response 资源
在 fuchsia.component/controller.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
is_started |
bool
|
无默认应用 |
Controller_OpenExposedDir_Response
在 fuchsia.component/controller.fidl 中定义
<EMPTY>
Controller_Start_Response
在 fuchsia.component/controller.fidl 中定义
<EMPTY>
Introspector_GetMoniker_Response
在 fuchsia.component/introspector.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
moniker |
string:4096
|
无默认应用 |
NamespaceInputEntry 资源
在 fuchsia.component/namespace.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
path |
string:4095
|
无默认应用 | |
dictionary |
client_end:fuchsia.component.sandbox/Dictionary
|
无默认应用 |
NamespaceInputEntry2 资源
在 fuchsia.component/namespace.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
path |
string:4095
|
条目在命名空间中的路径。 |
无默认应用 |
capability |
handle<eventpair>
|
要安装在命名空间中的功能(使用 fuchsia.component.runtime.Capabilities 创建)。目前仅支持字典。 |
无默认应用 |
Namespace_Create2_Response 资源
在 fuchsia.component/namespace.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
entries |
vector<NamespaceEntry>
|
无默认应用 |
Namespace_Create_Response 资源
在 fuchsia.component/namespace.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
entries |
vector<NamespaceEntry>
|
无默认应用 |
Realm_CreateChild_Response
在 fuchsia.component/realm.fidl 中定义
<EMPTY>
Realm_DestroyChild_Response
在 fuchsia.component/realm.fidl 中定义
<EMPTY>
Realm_GetChildOutputDictionaryDeprecated_Response 资源
在 fuchsia.component/realm.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
dictionary |
fuchsia.component.sandbox/DictionaryRef
|
无默认应用 |
Realm_GetChildOutputDictionary_Response 资源
在 fuchsia.component/realm.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
dictionary |
handle<eventpair>
|
无默认应用 |
Realm_GetResolvedInfo_Response 资源
在 fuchsia.component/realm.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
resolved_info |
fuchsia.component.resolution/Component
|
无默认应用 |
Realm_ListChildren_Response
在 fuchsia.component/realm.fidl 中定义
<EMPTY>
Realm_OpenController_Response
在 fuchsia.component/realm.fidl 中定义
<EMPTY>
Realm_OpenExposedDir_Response
在 fuchsia.component/realm.fidl 中定义
<EMPTY>
StorageAdmin_DeleteAllStorageContents_Response
在 fuchsia.component/storage_admin.fidl 中定义
<EMPTY>
StorageAdmin_DeleteComponentStorage_Response
在 fuchsia.component/storage_admin.fidl 中定义
<EMPTY>
StorageAdmin_ListStorageInRealm_Response
在 fuchsia.component/storage_admin.fidl 中定义
<EMPTY>
StorageAdmin_OpenComponentStorageById_Response
在 fuchsia.component/storage_admin.fidl 中定义
<EMPTY>
StorageAdmin_OpenStorage_Response
在 fuchsia.component/storage_admin.fidl 中定义
<EMPTY>
枚举
DeletionError strict
类型:uint32
在 fuchsia.component/storage_admin.fidl 中定义
| 名称 | 值 | 说明 |
|---|---|---|
建立联系 |
1 |
向存储空间提供商发送请求时出错。 |
PROTOCOL |
2 |
存储空间提供方在响应协议请求时返回了错误。 |
NONE_AVAILABLE |
3 |
没有可删除的存储空间。 |
不支持 |
4 |
不支持此调用。 |
错误灵活
类型:uint32
在 fuchsia.component/error.fidl 中定义
组件框架协议的标准错误代码。
| 名称 | 值 | 说明 |
|---|---|---|
INTERNAL |
1 |
组件管理器在执行操作时遇到未指明的错误。 |
INVALID_ARGUMENTS |
2 |
至少有一个参数的格式无效。 |
不支持 |
3 |
此功能尚不受支持。 |
ACCESS_DENIED |
4 |
调用方无权执行指定的操作,或者提供给调用的某个句柄权限不足。 |
INSTANCE_NOT_FOUND |
5 |
找不到组件实例。 |
INSTANCE_ALREADY_EXISTS |
6 |
组件实例已存在。 |
INSTANCE_CANNOT_START |
7 |
无法启动组件实例。 |
INSTANCE_CANNOT_RESOLVE |
8 |
未能解析组件的声明。 |
COLLECTION_NOT_FOUND |
9 |
找不到组件集合。 |
RESOURCE_UNAVAILABLE |
10 |
资源不足,无法执行操作。 |
INSTANCE_DIED |
11 |
组件实例意外终止。 |
RESOURCE_NOT_FOUND |
12 |
请求的资源不存在。 |
INSTANCE_CANNOT_UNRESOLVE |
13 |
未能取消解决组件。 |
INSTANCE_ALREADY_STARTED |
14 |
组件实例已启动。 添加时间:14
|
DEPENDENCY_CYCLE |
15 |
功能路由会创建依赖项循环。 添加:29
|
EventType strict
类型:uint32
在 fuchsia.component/events.fidl 中定义
这些 EventType 用于 EventStream 协议。 它们是 hooks.rs 中 EventType 枚举的 FIDL 版本,具有相同的含义。
| 名称 | 值 | 说明 |
|---|---|---|
CAPABILITY_REQUESTED |
1 |
已请求此组件提供的功能。事件载荷会携带请求渠道。 |
已发现 |
3 |
发现了一个组件实例。这是组件生命周期的第一阶段。对于动态子组件,在创建时分派;对于静态子组件,在解析其父组件时分派;对于根组件,在组件管理器启动时分派。 |
已销毁 |
4 |
实例已被销毁,不再存在。 |
RESOLVED |
5 |
实例的声明首次成功解析。 |
全球之旅 |
6 |
根据组件管理器,此实例已启动。但是,如果这是可执行组件,则运行程序还需要执行进一步的工作来启动该组件。 |
已停止 |
7 |
已成功停止一个实例。 |
DEBUG_STARTED |
8 |
与 STARTED 类似,但载荷会携带一个事件对,订阅者可以使用该事件对来推迟组件的启动。这样,调试程序等便可以在创建任何进程之前执行一些设置。 |
UNRESOLVED |
9 |
已成功将一个实例标记为未解决。 |
NamespaceError 柔性
类型:uint32
在 fuchsia.component/namespace.fidl 中定义
命名空间中的方法返回的错误。
| 名称 | 值 | 说明 |
|---|---|---|
SHADOW |
1 |
父级的父级与另一个命名空间条目共用一个前缀 |
复制 |
2 |
两个条目具有相同的命名空间路径。 |
转化 |
3 |
未能将命名空间字典转换为目录。 |
BAD_ENTRY |
4 |
命名空间条目无效。 |
DICTIONARY_READ |
5 |
读取其中一个字典时出错。 |
StatusError strict
类型:uint32
在 fuchsia.component/storage_admin.fidl 中定义
| 名称 | 值 | 说明 |
|---|---|---|
提供方 |
1 |
存储空间提供方针对请求返回了错误,或与提供方的连接意外关闭。 |
RESPONSE_INVALID |
2 |
存储空间提供商返回的信息似乎无效。 |
STATUS_UNKNOWN |
3 |
对存储提供程序的调用成功,但返回了意外的空数据。 |
不支持 |
4 |
不支持此调用。 |
TABLES
CapabilityRequestedPayload 资源
在 fuchsia.component/events.fidl 中定义
CapabilityRequested 事件的载荷
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
name
|
功能的名称。 |
2 |
capability |
handle<channel>
|
指向要托管功能的通道的服务器端的句柄。 |
CreateChildArgs 资源
在 fuchsia.component/realm.fidl 中定义
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
numbered_handles |
vector<fuchsia.process/HandleInfo>:128
|
要传递给组件实例的带编号的句柄。 如果组件的运行程序不支持编号句柄,则应关闭这些句柄。 |
2 |
dynamic_offers |
vector<fuchsia.component.decl/Offer>:128
|
将定位到组件实例的动态优惠。 如果在此向量中包含 任何类型的优惠(例如协议、目录)都可以用作动态优惠。任何对静态优惠有效的来源也对动态优惠有效。此外,与静态 offer 不同,动态 offer 可以使用“同级”动态子组件作为来源,方法是将来源设置为设置了 动态优惠始终定位到新创建的子组件。因此, 如果动态 offer 的来源(即 如需将此字段设置为非空值,则创建子组件的集合必须指定 |
3 |
controller |
server_end:Controller
|
此组件的控制器,可用于影响组件的生命周期。 添加时间:14
|
4 |
dictionary |
fuchsia.component.sandbox/DictionaryRef
|
包含组件实例的额外功能的字典。
此字段应被视为已弃用,取而代之的是 Added: HEAD
|
5 |
additional_inputs |
handle<eventpair>
|
使用 fuchsia.component.runtime.Capabilities 创建的字典的句柄,其中包含应添加到所创建子项的输入中的其他功能。 Added: HEAD
|
DebugStartedPayload 资源
在 fuchsia.component/events.fidl 中定义
DebugStarted 事件的载荷。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
runtime_dir |
client_end:fuchsia.io/Directory
|
由运行程序提供的目录,用于显示有关组件的运行时和运行程序特定信息。另一端则在 ComponentStartInfo 中发送给运行程序。 例如,可以查询该组件是否为 ELF 组件,以及是否支持下文所述的 break_on_start 协议。 |
2 |
break_on_start |
handle<eventpair>
|
一个事件对,可供调试程序用来推迟组件的启动,例如,ELF 调试程序可以在保留事件对的同时在作业上设置异常通道,然后丢弃事件对以通知运行程序可以创建进程。另一端则在 ComponentStartInfo 中发送给运行程序。 |
DestroyedPayload
在 fuchsia.component/events.fidl 中定义
Destroyed 事件的载荷。
| 序数 | 字段 | 类型 | 说明 |
|---|
DiscoveredPayload
在 fuchsia.component/events.fidl 中定义
“已发现”事件的载荷。
| 序数 | 字段 | 类型 | 说明 |
|---|
活动资源
在 fuchsia.component/events.fidl 中定义
包含单个事件的所有相关信息
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
header |
EventHeader
|
生成此事件的组件的相关信息。 |
2 |
payload |
EventPayload
|
某些事件类型的可选载荷 |
EventHeader
在 fuchsia.component/events.fidl 中定义
提供目标组件实例相关元数据的头。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
event_type |
EventType
|
与事件对应的事件类型 |
2 |
moniker |
string:4096
|
用于标识组件实例的相对名字对象。相对于事件范围。 |
3 |
component_url |
fuchsia.url/Url
|
用于解析组件的网址。 |
4 |
timestamp |
zx/InstantBoot
|
事件发生时的启动时间。 新增:25
|
NamespaceEntry 资源
在 fuchsia.component/controller.fidl 中定义
单个组件命名空间条目,用于描述命名空间装载点 (path) 及其后备目录 (directory)。此类型通常在向量内组合。如需了解详情,请参阅 ComponentStartInfo.ns。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
path |
string:4095
|
目录的装载点,包括前导斜杠。例如:“/pkg”“/svc”或“/config/data”。 |
2 |
directory |
client_end:fuchsia.io/Directory
|
装载在上述 |
PurgedPayload
在 fuchsia.component/events.fidl 中定义
已清除事件的载荷。
| 序数 | 字段 | 类型 | 说明 |
|---|
ResolvedPayload
在 fuchsia.component/events.fidl 中定义
已解决事件的载荷。
| 序数 | 字段 | 类型 | 说明 |
|---|
StartChildArgs 资源
在 fuchsia.component/controller.fidl 中定义
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
numbered_handles |
vector<fuchsia.process/HandleInfo>:128
|
要传递给组件实例的带编号的句柄。 如果组件的运行程序不支持编号句柄,则应关闭这些句柄。 如果设置,此处给出的值将替换 CreateChildArgs 中给出的句柄。 |
2 |
namespace_entries |
vector<NamespaceEntry>:32
|
组件管理器生成的命名空间将扩展为包含此处列出的所有命名空间条目,然后再提供给组件的运行程序。 如果存在任何冲突条目,则在启动组件时会发生错误。 |
3 |
dictionary |
fuchsia.component.sandbox/DictionaryRef
|
包含组件实例的额外功能的字典。
此字段应被视为已弃用,取而代之的是 Added: HEAD
|
4 |
additional_inputs |
handle<eventpair>
|
使用 fuchsia.component.runtime.Capabilities 创建的字典的句柄,其中包含应添加到已启动程序的输入中的其他功能。 Added: HEAD
|
StartedPayload
在 fuchsia.component/events.fidl 中定义
“已开始”事件的载荷。
| 序数 | 字段 | 类型 | 说明 |
|---|
StoppedPayload
在 fuchsia.component/events.fidl 中定义
Stopped 事件的载荷。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
status |
zx/Result
|
在 fuchsia.component.runner/ComponentController 协议通道上设置的墓志铭。这是组件的退出状态。ComponentController 协议的定义中介绍了可能的状态值及其含义。 |
2 |
exit_code |
int64
|
组件实例的退出代码。请注意,并非所有组件 都会在停止时返回退出代码 许多程序运行时都有退出代码的概念。Runner 可以在适用时将该值映射到此字段。例如,ELF 运行程序将在此处发布 Zircon 进程返回代码。 添加:23
|
StorageStatus
在 fuchsia.component/storage_admin.fidl 中定义
有关存储空间状态的元数据
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
total_size |
uint64
|
|
2 |
used_size |
uint64
|
UnresolvedPayload
在 fuchsia.component/events.fidl 中定义
未解决事件的载荷。
| 序数 | 字段 | 类型 | 说明 |
|---|
UNIONS
Controller_Destroy_Result strict
在 fuchsia.component/controller.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Controller_Destroy_Response
|
|
2 |
err |
Error
|
|
3 |
framework_err |
internal
|
Controller_GetExposedDictionary_Result strict resource
在 fuchsia.component/controller.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Controller_GetExposedDictionary_Response
|
|
2 |
err |
Error
|
|
3 |
framework_err |
internal
|
Controller_GetOutputDictionary_Result strict resource
在 fuchsia.component/controller.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Controller_GetOutputDictionary_Response
|
|
2 |
err |
Error
|
|
3 |
framework_err |
internal
|
Controller_IsStarted_Result strict resource
在 fuchsia.component/controller.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Controller_IsStarted_Response
|
|
2 |
err |
Error
|
|
3 |
framework_err |
internal
|
Controller_OpenExposedDir_Result strict
在 fuchsia.component/controller.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Controller_OpenExposedDir_Response
|
|
2 |
err |
Error
|
Controller_Start_Result strict
在 fuchsia.component/controller.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Controller_Start_Response
|
|
2 |
err |
Error
|
|
3 |
framework_err |
internal
|
EventPayload 柔性 资源
在 fuchsia.component/events.fidl 中定义
封装某些事件类型的其他数据/协议。
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
capability_requested |
CapabilityRequestedPayload
|
CapabilityRequested 事件的载荷 |
2 |
purged |
PurgedPayload
|
已清除事件的载荷。 |
4 |
discovered |
DiscoveredPayload
|
“已发现”事件的载荷。 已弃用:22
|
5 |
destroyed |
DestroyedPayload
|
Destroyed 事件的载荷。 |
6 |
resolved |
ResolvedPayload
|
“已解决”事件的载荷 |
7 |
started |
StartedPayload
|
“已开始”事件的载荷 |
8 |
stopped |
StoppedPayload
|
Stopped 事件的载荷 |
9 |
debug_started |
DebugStartedPayload
|
DebugStarted 事件的载荷 |
10 |
unresolved |
UnresolvedPayload
|
未解决事件的载荷 |
Introspector_GetMoniker_Result strict
在 fuchsia.component/introspector.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Introspector_GetMoniker_Response
|
|
2 |
err |
Error
|
|
3 |
framework_err |
internal
|
Namespace_Create2_Result strict resource
在 fuchsia.component/namespace.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Namespace_Create2_Response
|
|
2 |
err |
NamespaceError
|
|
3 |
framework_err |
internal
|
Namespace_Create_Result strict resource
在 fuchsia.component/namespace.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Namespace_Create_Response
|
|
2 |
err |
NamespaceError
|
|
3 |
framework_err |
internal
|
Realm_CreateChild_Result strict
在 fuchsia.component/realm.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_CreateChild_Response
|
|
2 |
err |
Error
|
Realm_DestroyChild_Result strict
在 fuchsia.component/realm.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_DestroyChild_Response
|
|
2 |
err |
Error
|
Realm_GetChildOutputDictionaryDeprecated_Result strict resource
在 fuchsia.component/realm.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_GetChildOutputDictionaryDeprecated_Response
|
|
2 |
err |
Error
|
Realm_GetChildOutputDictionary_Result strict resource
在 fuchsia.component/realm.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_GetChildOutputDictionary_Response
|
|
2 |
err |
Error
|
Realm_GetResolvedInfo_Result strict resource
在 fuchsia.component/realm.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_GetResolvedInfo_Response
|
|
2 |
err |
Error
|
Realm_ListChildren_Result strict
在 fuchsia.component/realm.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_ListChildren_Response
|
|
2 |
err |
Error
|
Realm_OpenController_Result strict
在 fuchsia.component/realm.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_OpenController_Response
|
|
2 |
err |
Error
|
Realm_OpenExposedDir_Result strict
在 fuchsia.component/realm.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Realm_OpenExposedDir_Response
|
|
2 |
err |
Error
|
StorageAdmin_DeleteAllStorageContents_Result strict
在 fuchsia.component/storage_admin.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
StorageAdmin_DeleteAllStorageContents_Response
|
|
2 |
err |
DeletionError
|
StorageAdmin_DeleteComponentStorage_Result strict
在 fuchsia.component/storage_admin.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
StorageAdmin_DeleteComponentStorage_Response
|
|
2 |
err |
Error
|
StorageAdmin_GetStatus_Result strict
在 fuchsia.component/storage_admin.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
StorageStatus
|
|
2 |
err |
StatusError
|
StorageAdmin_ListStorageInRealm_Result strict
在 fuchsia.component/storage_admin.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
StorageAdmin_ListStorageInRealm_Response
|
|
2 |
err |
Error
|
StorageAdmin_OpenComponentStorageById_Result strict
在 fuchsia.component/storage_admin.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
StorageAdmin_OpenComponentStorageById_Response
|
|
2 |
err |
Error
|
StorageAdmin_OpenStorage_Result strict
在 fuchsia.component/storage_admin.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
StorageAdmin_OpenStorage_Response
|
|
2 |
err |
Error
|
常量
| 名称 | 值 | 类型 | 说明 |
|---|---|---|---|
| MAX_CAPABILITY_ID_LENGTH |
50
|
uint64 |
功能 ID 的字符串长度上限。 此值目前是任意设置的。 新增:11
|
| MAX_CHILD_COUNT |
128
|
uint32 |
调用 |
| MAX_CHILD_NAME_LENGTH |
1024
|
uint32 |
|
| MAX_DYNAMIC_OFFER_COUNT |
128
|
uint32 |
可定位到已创建组件的动态优惠数量上限。 |
| MAX_ERROR_DESCRIPTION_LENGTH |
100
|
uint64 |
错误说明的字符串长度上限。 新增:11
|
| MAX_HANDLE_COUNT |
128
|
uint32 |
可传递给已创建组件的句柄数量上限。 |
| MAX_MONIKER_LENGTH |
4096
|
uint32 |
|
| MAX_NAMESPACE_COUNT |
32
|
uint32 |
添加时间:14
|
| MAX_NAME_LENGTH |
fuchsia.io/MAX_NAME_LENGTH
|
uint64 |
添加时间:19
|
| MAX_NUM_EVENTS_RECEIVED |
100
|
uint64 |
接收器可监听的事件数量上限。 |
| MAX_PATH_LENGTH |
fuchsia.io/MAX_PATH_LENGTH
|
uint64 |
新增:15
|
| MAX_STORAGE_ID_LENGTH |
64
|
uint32 |
存储实例 ID 的长度上限。 存储实例 ID 是一个 256 位 UUID,以十六进制表示法编码时长度为 64 个字符。 新增:30
|
| MAX_SUBSCRIPTION_REQUESTS |
2
|
uint32 |
每个事件订阅的请求数上限。 |
| MAX_URL_SCHEME_LENGTH |
MAX_NAME_LENGTH
|
uint64 |
添加时间:19
|
别名
| 名称 | 值 | 说明 |
|---|---|---|
| child_name |
string[MAX_CHILD_NAME_LENGTH] |
|
| 名字 |
string[MAX_NAME_LENGTH] |
|
| url_scheme |
string[MAX_URL_SCHEME_LENGTH] |