协议
CapabilityStore
在 fuchsia.component.sandbox/sandbox.fidl 中定义
表示“功能存储区”概念的协议,即仓库 。
[CapabilityStore] 充当组件运行时和客户端之间的主要桥梁 使它们能够操作和交换 [功能]。[CapabilityStore] 实例 包含一组 [Capability],其中每个 [Capability] 都具有客户端分配的 [CapabilityId]。
通常,程序不会将 [CapabilityStore] 或 [CapabilityId] 与其他 [CapabilityStore] 连接及其封闭功能旨在 是“本地”加入一个程序相反,如果某个程序想要与其他 程序,则应从存储中 [导出] [Capability],并将 [Capability] 发送到 目标程序,后者随后可以将功能 [导入] 自己的存储区。
[CapabilityStore] 还可用于管理功能生命周期。功能的生命周期是 将作用域限定为它所在的 [CapabilityStore];即删除 [CapabilityStore] 改为释放功能此外,[CapabilityStore] 支持 [Drop] API,用于删除单个 [Capability] 引用。(请注意, 一些功能(如 [DictionaryRef]),有多个引用,在这种情况下,所有 必须删除引用才能释放底层资源。)
关于语义的注意事项:[CapabilityStore] API 不会返回 [CapabilityId],因为 [CapabilityId]由客户端分配。相反,当某个方法从语义上返回 功能,可通过将目标 [CapabilityId] 作为输出参数来表示。
ConnectorCreate
从 [接收器] 创建 [连接器]。到 [Connector] 的传入连接将 发送到此 [Receiver]。
错误:
- 如果此存储区中已存在具有 
id的功能,则返回ID_ALREADY_EXISTS。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                NewCapabilityId
             | 
        
receiver | 
            
                Receiver
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_ConnectorCreate_Result
             | 
        
ConnectorOpen
通过提供的 [Connector] 功能打开一个连接,该连接将分派给 另一端的 [接收器]。
如果发生错误,系统会在 server_end 将其报告为 zx.Status 事件。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 - 如果 
id不是连接器功能,则为WRONG_TYPE。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
server_end | 
            
                handle<channel>
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_ConnectorOpen_Result
             | 
        
DictionaryCopy
创建一个包含以下所有条目的重复项的新字典
使用 id 访问字典,将 dest_id 分配给新字典。
此方法的运行时间与顶级条目数量呈线性关系
。
例如,如果字典包含嵌套的字典,则新的 创建的字典也会包含对那些嵌套的 字典,因为条目是复制的,而不是深度复制的。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 - 如果此存储区中已存在具有 
dest_id的功能,则返回ID_ALREADY_EXISTS。 - 如果 
id不是字典,则为WRONG_TYPE。 - 如果 
id中的某个功能无法复制,则为NOT_DUPLICATABLE。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
dest_id | 
            
                NewCapabilityId
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryCopy_Result
             | 
        
DictionaryCreate
使用客户端分配的 id 在此 CapabilityStore 中创建一个新的空字典。
错误:
- 如果此存储区中已存在具有 
id的功能,则返回ID_ALREADY_EXISTS。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryCreate_Result
             | 
        
DictionaryDrain
移除此字典中的所有条目,如果提供,则会在 contents 中返回这些条目。
如果未提供 contents,系统会舍弃所有项而不进行枚举。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 - 如果 
id不是字典,则为WRONG_TYPE。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
iterator | 
            
                server_end<DictionaryDrainIterator>?
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryDrain_Result
             | 
        
DictionaryEnumerate
使用 id 枚举字典中的项(键和值)。
创建每个值(功能)的副本。如果某个值无法复制 该值将为 null。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 - 如果 
id不是字典,则为WRONG_TYPE。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
iterator | 
            
                server_end<DictionaryEnumerateIterator>
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryEnumerate_Result
             | 
        
DictionaryGet
使用 id 从字典中获取一项功能的副本,
已加载到 dest_id 中。
错误:
- 如果 
id不是此存储区中可识别的功能 ID,则为ID_NOT_FOUND。 - 如果此存储区中已存在具有 
dest_id的功能,则返回ID_ALREADY_EXISTS。 - 如果 
id不是字典,则为WRONG_TYPE。 - 如果 
item.key无效,则返回INVALID_KEY。 - 如果字典不包含 
key,则返回ITEM_NOT_FOUND。 - 如果功能无法复制,则为 
NOT_DUPLICATABLE。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
key | 
            
                DictionaryKey
             | 
        
dest_id | 
            
                NewCapabilityId
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryGet_Result
             | 
        
DictionaryInsert
使用 id 将 item 插入字典。已将 item.value 移入字典,并且
其 ID 会在此调用成功时释放。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 - 如果 
id不是字典,则为WRONG_TYPE。 - 如果 
item.key无效,则返回INVALID_KEY。 - 如果字典已包含具有 
item.key的项,则返回ITEM_ALREADY_EXISTS。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
item | 
            
                DictionaryItem
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryInsert_Result
             | 
        
DictionaryKeys
使用 id 枚举字典中的键。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 - 如果 
id不是字典,则为WRONG_TYPE。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
iterator | 
            
                server_end<DictionaryKeysIterator>
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryKeys_Result
             | 
        
DictionaryLegacyExport
使用 id 将频道绑定到字典。该频道可以
使用 [DictionaryImportLegacy] 重新导入到 [CapabilityStore]。
这是旧版 API,支持与采用 [字典] 的 API 向后兼容 。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
server_end | 
            
                handle<channel>
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryLegacyExport_Result
             | 
        
DictionaryLegacyImport
以通道的形式导入字典。
这是旧版 API,支持与采用 [字典] 的 API 向后兼容 。
错误:
- 如果此存储区中已存在具有 
id的功能,则返回ID_ALREADY_EXISTS。 - 如果 
client_end不是有效的字典频道,则为BAD_CAPABILITY。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                NewCapabilityId
             | 
        
client_end | 
            
                handle<channel>
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryLegacyImport_Result
             | 
        
DictionaryRemove
使用 id 从字典中移除键。如果存在 dest_id,则加载值
否则舍弃该值。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 - 如果此存储区中已存在具有 
dest_id的功能,则返回ID_ALREADY_EXISTS。 - 如果 
id不是字典,则为WRONG_TYPE。 - 如果 
key无效,则返回INVALID_KEY。 - 如果字典不包含键,则返回 
ITEM_NOT_FOUND。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
key | 
            
                DictionaryKey
             | 
        
dest_id | 
            
                WrappedCapabilityId?
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_DictionaryRemove_Result
             | 
        
Drop
从此 CapabilityStore 中删除具有 id 的功能。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_Drop_Result
             | 
        
复制
使用 id 将 capability 复制到 dest_id。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 - 如果此存储区中已存在具有 
dest_id的功能,则返回ID_ALREADY_EXISTS。 - 如果无法复制 
id,则为NOT_DUPLICATABLE。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
dest_id | 
            
                NewCapabilityId
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_Duplicate_Result
             | 
        
导出
将具有客户端分配的标识符 id 的功能导出到
capability。此操作将从存储区中移除该功能。如果
这是不需要的,首先 [复制] 相应功能。
错误:
- 如果 
id不是此存储区中的有效功能 ID,则为ID_NOT_FOUND。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                CapabilityId
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_Export_Result
             | 
        
导入
使用客户端分配的 id 将 capability 导入此存储区。
错误:
- 如果此存储区中已存在具有 
id的功能,则返回ID_ALREADY_EXISTS。 - 如果 
capability不是有效的 [Capability],则为BAD_CAPABILITY。 
请求
| 名称 | 类型 | 
|---|---|
id | 
            
                NewCapabilityId
             | 
        
capability | 
            
                Capability
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                CapabilityStore_Import_Result
             | 
        
字典
在 fuchsia.component.sandbox/sandbox.fidl 中定义
DictionaryDrainIterator
在 fuchsia.component.sandbox/sandbox.fidl 中定义
GetNext
返回 [Dictionary.Drain] 调用的下一批结果,最多返回
limit 条结果。limit 不得超过 [MAX_DICTIONARY_ITERATOR_CHUNK]。
每个返回的 capability 都将分配一个从
start_id起。
除了 items 之外,返回 end_id,其比预留的最高 ID 大一个
由 [GetNext] 提交。end_id 可用作下一次调用 [GetNext] 的 start_id。
如果 [GetNext] 返回错误,服务器也会关闭通道。
错误:
- 如果 
[start_id, limit)范围内的某个 ID 在此范围内已存在,则返回ID_ALREADY_EXISTS商店。 - 如果 
limit为0或大于MAX_DICTIONARY_ITERATOR_CHUNK,则为INVALID_ARGS。 
请求
| 名称 | 类型 | 
|---|---|
start_id | 
            
                CapabilityId
             | 
        
limit | 
            
                uint32
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                DictionaryDrainIterator_GetNext_Result
             | 
        
DictionaryEnumerateIterator
在 fuchsia.component.sandbox/sandbox.fidl 中定义
GetNext
返回 [Dictionary.Enumerate] 调用的下一批结果,最多返回
limit 条结果。limit 不得超过 [MAX_DICTIONARY_ITERATOR_CHUNK]。
每个 items 的值都与原始 capability 重复
([CapabilityStore.Duplicate]),除非无法复制,否则它会
为 null。
每个返回的 capability 都将分配一个从
start_id起。
除了 items 之外,返回 end_id,其比预留的最高 ID 大一个
由 [GetNext] 提交。end_id 可用作下一次调用 [GetNext] 的 start_id。
如果 [GetNext] 返回错误,服务器也会关闭通道。
错误:
- 如果 
[start_id, limit)范围内的某个 ID 在此范围内已存在,则返回ID_ALREADY_EXISTS商店。 - 如果 
limit为0或大于MAX_DICTIONARY_ITERATOR_CHUNK,则为INVALID_ARGS。 
请求
| 名称 | 类型 | 
|---|---|
start_id | 
            
                CapabilityId
             | 
        
limit | 
            
                uint32
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                DictionaryEnumerateIterator_GetNext_Result
             | 
        
DictionaryKeysIterator
在 fuchsia.component.sandbox/sandbox.fidl 中定义
GetNext
请求
<空>
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                DictionaryKeysIterator_GetNext_Result
             | 
        
接收器
在 fuchsia.component.sandbox/sandbox.fidl 中定义
接收器由组件提供,并允许它们接收频道 架构。
接收
向此接收器发送一个通道。
请求
| 名称 | 类型 | 
|---|---|
channel | 
            
                handle<channel>
             | 
        
路由器
在 fuchsia.component.sandbox/sandbox.fidl 中定义
路由器允许客户端请求功能。
路线
请求
| 名称 | 类型 | 
|---|---|
payload | 
            
                RouteRequest
             | 
        
响应
| 名称 | 类型 | 
|---|---|
payload | 
            
                Router_Route_Result
             | 
        
结构体
CapabilityStore_ConnectorCreate_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_ConnectorOpen_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryCopy_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryCreate_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryDrain_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryEnumerate_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryGet_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryInsert_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryKeys_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryLegacyExport_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryLegacyImport_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_DictionaryRemove_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_Drop_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_Duplicate_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
CapabilityStore_Export_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
capability | 
            
                Capability
             | 
            无默认设置 | 
CapabilityStore_Import_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
连接器资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
token | 
            
                Token
             | 
            无默认设置 | 
DictionaryDrainIterator_GetNext_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
items | 
            
                vector<DictionaryItem>[128]
             | 
            无默认设置 | |
end_id | 
            
                CapabilityId
             | 
            无默认设置 | 
DictionaryEnumerateIterator_GetNext_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
items | 
            
                vector<DictionaryOptionalItem>[128]
             | 
            无默认设置 | |
end_id | 
            
                CapabilityId
             | 
            无默认设置 | 
DictionaryItem
在 fuchsia.component.sandbox/sandbox.fidl 中定义
DictionaryRef 中的键值对。
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
key | 
            
                DictionaryKey
             | 
            无默认设置 | |
value | 
            
                CapabilityId
             | 
            无默认设置 | 
DictionaryKeysIterator_GetNext_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
keys | 
            
                vector<string>[128]
             | 
            无默认设置 | 
DictionaryOptionalItem 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
DictionaryRef 中的键值对,其中的值可能会被省略。 这对于可能希望省略值的 API 非常有用,例如 重复。
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
key | 
            
                DictionaryKey
             | 
            无默认设置 | |
value | 
            
                WrappedCapabilityId?
             | 
            无默认设置 | 
DictionaryRef 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
token | 
            
                Token
             | 
            无默认设置 | 
DirEntry 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
token | 
            
                Token
             | 
            无默认设置 | 
InstanceToken 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
表示组件树中的实例,组件可以是 实例或组件管理器的实例。
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
token | 
            
                Token
             | 
            无默认设置 | 
ProtocolPayload 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
包含一个协议开放请求。
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
channel | 
            
                handle<channel>
             | 
            无默认设置 | 
Router_Route_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
capability | 
            
                Capability
             | 
            无默认设置 | 
单位
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<空>
WrappedCapabilityId
在 fuchsia.component.sandbox/sandbox.fidl 中定义
封装在结构体中的 [CapabilityId]。如果您要将 [CapabilityId] 放入 box<>,这非常有用,
FIDL 不支持纯整数类型。
| 字段 | 类型 | 说明 | 默认 | 
|---|---|---|---|
id | 
            
                CapabilityId
             | 
            无默认设置 | 
精英
库存状况严格
类型:uint32
在 fuchsia.component.sandbox/availability.fidl 中定义
说明功能的预期可用性。
有些功能可能并不适用于所有系统配置。在这些
则可用情况会在相应链的 OPTIONAL 中声明
公开/提供/使用,并且该功能会在void
系统配置,在这种情况下,无需通过
特定功能(例如无头系统上的图形功能)。
| 名称 | 值 | 说明 | 
|---|---|---|
必需 | 
            1 | 
            该功能必须可用。如果无法路由功能, 错误。  | 
        
可选 | 
            2 | 
            在 use 声明内:如果无法运行该组件,组件可以正常工作 获取相应功能。 在 Offer/expose 声明内:可能无法使用该功能 某些系统配置中的延迟。由此推论,目标组件必须 对该 capability 没有必需的依赖项。  | 
        
SAME_AS_TARGET | 
            3 | 
            如果相应优惠或公开声明的目标需要 则该行为等同于“必需”功能。如果 target 可以选择性依赖于 capability,那么 等同于可选属性。这对于 希望根据内部路由更改路由可用性。 use 声明中不允许使用此值。  | 
        
过渡 | 
            4 | 
            源可以完全省略路由,甚至不必进行路由
 TRANSITIONAL 适用于引入新技术的软转场, 功能。  | 
        
CapabilityStoreError 柔性
类型:uint32
在 fuchsia.component.sandbox/sandbox.fidl 中定义
从 [CapabilityStore] 中的方法返回的错误。
| 名称 | 值 | 说明 | 
|---|---|---|
ID_NOT_FOUND | 
            1 | 
            找不到与指定键或 [CapabilityId] 匹配的功能。  | 
        
ID_ALREADY_EXISTS | 
            2 | 
            已存在与给定键或 [CapabilityId] 匹配的功能。  | 
        
BAD_CAPABILITY | 
            3 | 
            [Capability] 无效。例如,  | 
        
WRONG_TYPE | 
            4 | 
            对于请求的操作,[CapabilityId] 的类型有误。  | 
        
NOT_DUPLICATABLE | 
            5 | 
            执行此操作需要复制的功能可以 。  | 
        
ITEM_NOT_FOUND | 
            6 | 
            未在字典中找到与指定键匹配的项。  | 
        
ITEM_ALREADY_EXISTS | 
            7 | 
            字典中已存在具有指定键的项。  | 
        
INVALID_KEY | 
            8 | 
            密钥无效。如需了解有效键的限制条件,请参阅以下网址中的文档: https://fuchsia.dev/reference/cml#names.  | 
        
INVALID_ARGS | 
            9 | 
            一个或多个参数无效。  | 
        
DictionaryError 柔性
类型:uint32
在 fuchsia.component.sandbox/sandbox.fidl 中定义
从 [CapabilityStore/Dictionary*] 方法返回的错误。
| 名称 | 值 | 说明 | 
|---|---|---|
NOT_FOUND | 
            1 | 
            字典未包含具有给定键的项。  | 
        
ALREADY_EXISTS | 
            2 | 
            字典已包含具有给定键的项。  | 
        
BAD_CAPABILITY | 
            3 | 
            功能无效。 功能必须由沙盒创建,通过
  | 
        
INVALID_KEY | 
            4 | 
            密钥无效。如需了解有效键的限制条件,请参阅以下网址中的文档: https://fuchsia.dev/reference/cml#names.  | 
        
NOT_CLONEABLE | 
            5 | 
            执行该操作需要克隆的功能可以 无法克隆  | 
        
RouterError 柔性
类型:uint32
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| 名称 | 值 | 说明 | 
|---|---|---|
NOT_FOUND | 
            1 | 
            路由器未能找到该功能。  | 
        
INVALID_ARGS | 
            2 | 
            提供给函数的参数无效。  | 
        
表格
RouteRequest 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
路线请求。
| Ordinal | 字段 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            requesting | 
            
                InstanceToken
             | 
            请求功能的组件。  | 
        
2 | 
            metadata | 
            
                DictionaryRef
             | 
            与此功能请求关联的元数据。  | 
        
联合体
功能灵活 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            unit | 
            
                Unit
             | 
            |
2 | 
            handle | 
            
                handle<handle>
             | 
            |
3 | 
            data | 
            
                Data
             | 
            |
4 | 
            dictionary | 
            
                DictionaryRef
             | 
            |
5 | 
            connector | 
            
                Connector
             | 
            |
6 | 
            directory | 
            
                fuchsia.io/Directory
             | 
            |
7 | 
            router | 
            
                Router
             | 
            |
8 | 
            dir_entry | 
            
                DirEntry
             | 
            
CapabilityStore_ConnectorCreate_Result 严格
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_ConnectorCreate_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_ConnectorOpen_Result 严格
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_ConnectorOpen_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryCopy_Result strict
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryCopy_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryCreate_Result strict
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryCreate_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryDrain_Result strict
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryDrain_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryEnumerate_Result 严格
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryEnumerate_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryGet_Result 严格
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryGet_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryInsert_Result 严格
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryInsert_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryKeys_Result strict
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryKeys_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryLegacyExport_Result strict
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryLegacyExport_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryLegacyImport_Result strict
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryLegacyImport_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_DictionaryRemove_Result strict
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_DictionaryRemove_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_Drop_Result 严格
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_Drop_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_Duplicate_Result 严格
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_Duplicate_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_Export_Result 严格的 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_Export_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
CapabilityStore_Import_Result strict
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                CapabilityStore_Import_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
数据灵活
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            bytes | 
            
                vector<uint8>[8192]
             | 
            |
2 | 
            string | 
            
                string[8192]
             | 
            |
3 | 
            int64 | 
            
                int64
             | 
            |
4 | 
            uint64 | 
            
                uint64
             | 
            
DictionaryDrainIterator_GetNext_Result 严格的 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                DictionaryDrainIterator_GetNext_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
DictionaryEnumerateIterator_GetNext_Result 严格的资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                DictionaryEnumerateIterator_GetNext_Response
             | 
            |
2 | 
            err | 
            
                CapabilityStoreError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
DictionaryKeysIterator_GetNext_Result 严格资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                DictionaryKeysIterator_GetNext_Response
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
Router_Route_Result 严格资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
| Ordinal | 变体 | 类型 | 说明 | 
|---|---|---|---|
1 | 
            response | 
            
                Router_Route_Response
             | 
            |
2 | 
            err | 
            
                RouterError
             | 
            |
3 | 
            framework_err | 
            
                internal
             | 
            
常量
| 名称 | 值 | 类型 | 说明 | 
|---|---|---|---|
| MAX_DATA_LENGTH | 
                    8192
                 | 
                uint32 | 
            [数据] 中的字节数上限。 添加时间:HEAD 
 | 
        
| MAX_DICTIONARY_ITERATOR_CHUNK | 
                    128
                 | 
                uint32 | 
            字典迭代器返回的项数上限。 添加时间:HEAD 
 | 
        
| MAX_NAME_LENGTH | 
                    fuchsia.io/MAX_NAME_LENGTH
                 | 
                uint64 | 
            字典键的最大长度。这应与 fuchsia.component.MAX_NAME_LENGTH。 添加时间:HEAD 
 | 
        
ALIASES
| 名称 | 值 | 说明 | 
|---|---|---|
| CapabilityId | 
                uint64 | 
            客户端为 [CapabilityStore] 中的 [Capability] 指定的 ID。 该 ID 相对于 [CapabilityStore]。如果两个 [CapabilityStore]分配了同一 ID 的功能, 它们之间没有关系 添加时间:HEAD 
 | 
        
| DictionaryKey | 
                string[MAX_NAME_LENGTH] | 
            DictionaryItem 的键。如需了解有效键的限制条件,请参阅以下网址中的文档: https://fuchsia.dev/reference/cml#names. 添加时间:HEAD 
 | 
        
| NewCapabilityId | 
                uint64 | 
            客户端为 [CapabilityStore] 中的新 [Capability] 指定的 ID。与 [CapabilityId] 相同, 但用于区分 [CapabilityStore] 方法中的输出参数。 添加时间:HEAD 
 | 
        
| 令牌 | 
                zx/Handle | 
            令牌表示基岩对象。词元是引用计数,丢弃 所有令牌计数均移除对象。 添加时间:HEAD 
 | 
        
| WrappedNewCapabilityId | 
                fuchsia.component.sandbox/WrappedCapabilityId | 
            添加时间:HEAD 
 |