协议
字典
在 fuchsia.component.sandbox/sandbox.fidl 中定义
克隆
创建与同一基础字典的新连接。
使用 Copy
创建包含所有现有条目的克隆的新字典。
请求
<EMPTY>
响应
名称 | 类型 |
---|---|
payload |
Dictionary_Clone_Result
|
复制
创建一个新字典,其中包含此字典中所有条目的克隆。
例如,如果此字典包含嵌套字典,则新创建的字典将包含对这些嵌套字典的引用,因为条目是克隆而不是复制的。
请求
<EMPTY>
响应
名称 | 类型 |
---|---|
payload |
Dictionary_Copy_Result
|
排水
移除此字典中的所有条目。
如果未提供 contents
,系统会舍弃所有项,而不枚举这些项。
请求
名称 | 类型 |
---|---|
contents |
server_end<DictionaryIterator>?
|
枚举
枚举此字典中的条目。
在枚举期间为每一项创建克隆。
请求
名称 | 类型 |
---|---|
contents |
server_end<DictionaryIterator>
|
获取
从此字典获取功能的克隆。
- 如果字典不包含键,则抛出
DictionaryError.NOT_FOUND
错误。
请求
名称 | 类型 |
---|---|
key |
DictionaryKey
|
响应
名称 | 类型 |
---|---|
payload |
Dictionary_Get_Result
|
插入
将键值对插入字典。
- 如果字典已包含具有相同键的项,则会收到
DictionaryError.ALREADY_EXISTS
错误。
请求
名称 | 类型 |
---|---|
key |
DictionaryKey
|
value |
Capability
|
响应
名称 | 类型 |
---|---|
payload |
Dictionary_Insert_Result
|
立即查阅
返回该字典中的所有项,并按键以自然顺序进行排序。
此操作会创建值的浅层克隆。
请求
<EMPTY>
响应
名称 | 类型 |
---|---|
payload |
Dictionary_Read_Result
|
移除
从字典中移除键,并返回 Capability 值。
- 如果字典不包含键,则抛出
DictionaryError.NOT_FOUND
错误。
请求
名称 | 类型 |
---|---|
key |
DictionaryKey
|
响应
名称 | 类型 |
---|---|
payload |
Dictionary_Remove_Result
|
DictionaryIterator
在 fuchsia.component.sandbox/sandbox.fidl 中定义
GetNext
请求
<EMPTY>
响应
名称 | 类型 |
---|---|
payload |
DictionaryIterator_GetNext_Result
|
工厂
在 fuchsia.component.sandbox/sandbox.fidl 中定义
Factory 协议处理:
- 沙盒类型的实例化。
- 控制给定令牌的沙盒对象。
ConnectToSender
针对提供的发送器功能执行操作。
使用引用基岩对象的令牌,并在 server_end
上提供相应的 FIDL 表示法。server_end
的对等体是对基岩对象的另一个引用。删除控制通道会减少对象的一个引用。
请求
名称 | 类型 |
---|---|
capability |
SenderCapability
|
server_end |
server_end<Sender>
|
CreateDictionary
创建一个新的空 Dictionary。
请求
<EMPTY>
响应
名称 | 类型 |
---|---|
payload |
Factory_CreateDictionary_Result
|
CreateSender
从客户端提供的 Receiver
创建 Sender
。
请求
名称 | 类型 |
---|---|
receiver |
Receiver
|
响应
名称 | 类型 |
---|---|
payload |
Factory_CreateSender_Result
|
HandleCapability
在 fuchsia.component.sandbox/sandbox.fidl 中定义
Clone2
请求
名称 | 类型 |
---|---|
request |
server_end<fuchsia.unknown/Cloneable>
|
GetHandle
请求
<EMPTY>
响应
名称 | 类型 |
---|---|
payload |
HandleCapability_GetHandle_Result
|
接收器
在 fuchsia.component.sandbox/sandbox.fidl 中定义
接收器由客户端提供,允许它们从框架接收通道。
接收
向此接收器发送一个通道。
请求
名称 | 类型 |
---|---|
channel |
handle<channel>
|
路由器
在 fuchsia.component.sandbox/sandbox.fidl 中定义
路由器允许客户端请求功能。
路线
请求
名称 | 类型 |
---|---|
payload |
RouteRequest
|
响应
名称 | 类型 |
---|---|
payload |
Router_Route_Result
|
发件人
在 fuchsia.component.sandbox/sandbox.fidl 中定义
发送方允许客户端向框架发送通道,以便其连接。
发送
通过该发送者发送通道。
请求
名称 | 类型 |
---|---|
channel |
handle<channel>
|
结构
ComponentToken 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
表示框架中的一个组件。 目前没有方法,因为它将用作令牌。
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
token |
handle<eventpair>
|
无默认取景方式 |
DictionaryItem 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
Dictionary 中的键值对。
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
key |
DictionaryKey
|
无默认取景方式 | |
value |
Capability
|
无默认取景方式 |
DictionaryIterator_GetNext_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
items |
vector<DictionaryItem>[128]
|
无默认取景方式 |
Dictionary_Clone_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
dictionary |
Dictionary
|
无默认取景方式 |
Dictionary_Copy_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
dictionary |
Dictionary
|
无默认取景方式 |
Dictionary_Get_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
capability |
Capability
|
无默认取景方式 |
Dictionary_Insert_Response
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<EMPTY>
Dictionary_Read_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
items |
vector<DictionaryItem>
|
无默认取景方式 |
Dictionary_Remove_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
capability |
Capability
|
无默认取景方式 |
Factory_CreateDictionary_Response resource
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
dictionary |
Dictionary
|
无默认取景方式 |
Factory_CreateSender_Response resource
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
capability |
SenderCapability
|
无默认取景方式 |
HandleCapability_GetHandle_Response资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
handle |
handle<handle>
|
无默认取景方式 |
ProtocolPayload 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
包含协议打开请求。
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
channel |
handle<channel>
|
无默认取景方式 |
Router_Route_Response 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
capability |
Capability
|
无默认取景方式 |
SenderCapability 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
野战 | 类型 | 说明 | 默认 |
---|---|---|---|
token |
handle<eventpair>
|
无默认取景方式 |
UnitCapability
在 fuchsia.component.sandbox/sandbox.fidl 中定义
<EMPTY>
枚举
可用性严格
类型:uint32
在 fuchsia.component.sandbox/availability.fidl 中定义
描述功能的预期可用性。
某些功能可能并非在所有系统配置中都有。在这种情况下,可用性将沿着公开/优惠/使用链声明为 OPTIONAL
,并且在系统配置没有必要路由或提供特定功能(例如,无头系统上的图形功能)时,该功能将从 void
路由。
名称 | 值 | 说明 |
---|---|---|
必需 |
1 |
该功能必须可用。未能路由该 capability 就是错误。 |
可选 |
2 |
在 use 声明中:如果组件无法获取相应 capability,则可以正常运行。 在优惠/公开声明内:该功能在某些系统配置中可能不可用。因此,目标组件不得依赖于相应 capability。 |
SAME_AS_TARGET |
3 |
如果相应优惠或公开声明的目标需要该 capability,则此行为相当于 required。如果目标对 capability 有可选依赖项,则该行为等同于可选属性。对于想要根据内部组件更改其路由可用性的容器组件而言,这非常有用。 不允许在 use 声明中使用此值。 |
过渡 |
4 |
来源可以完全省略路由,甚至无需从 TRANSITIONAL 用于引入新功能的软转换。 |
DictionaryError 灵活
类型:uint32
在 fuchsia.component.sandbox/sandbox.fidl 中定义
从 Dictionary 中的方法返回的错误。
名称 | 值 | 说明 |
---|---|---|
NOT_FOUND |
1 |
字典中不包含具有给定键的项。 |
ALREADY_EXISTS |
2 |
字典已包含具有给定键的项。 |
BAD_CAPABILITY |
3 |
功能无效。 功能必须由沙盒通过 |
INVALID_KEY |
4 |
密钥无效。如需了解有效键的约束条件,请参阅 https://fuchsia.dev/reference/cml#names。 |
HandleCapabilityError 严格
类型:uint32
在 fuchsia.component.sandbox/sandbox.fidl 中定义
名称 | 值 | 说明 |
---|---|---|
不可用 |
1 |
RouterError 柔性
类型:uint32
在 fuchsia.component.sandbox/sandbox.fidl 中定义
名称 | 值 | 说明 |
---|---|---|
NOT_FOUND |
1 |
路由器未能找到该功能。 |
INVALID_ARGS |
2 |
提供给该函数的参数无效。 |
表
RouteRequest 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
路线请求。
序数 | 野战 | 类型 | 说明 |
---|---|---|---|
1 |
availability |
Availability
|
所请求的此功能的可用性。 |
2 |
requesting |
ComponentToken
|
请求该功能的组件。 |
联合
功能灵活 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
unit |
UnitCapability
|
|
2 |
handle |
HandleCapability
|
|
3 |
data |
DataCapability
|
|
4 |
dictionary |
Dictionary
|
|
5 |
sender |
SenderCapability
|
|
6 |
directory |
fuchsia.io/Directory
|
|
7 |
router |
Router
|
DataCapability 灵活
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
bytes |
vector<uint8>[8192]
|
|
2 |
string |
string[8192]
|
|
3 |
int64 |
int64
|
|
4 |
uint64 |
uint64
|
DictionaryIterator_GetNext_Result strict 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
DictionaryIterator_GetNext_Response
|
|
3 |
framework_err |
internal
|
Dictionary_Clone_Result strict 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Dictionary_Clone_Response
|
|
3 |
framework_err |
internal
|
Dictionary_Copy_Result strict 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Dictionary_Copy_Response
|
|
3 |
framework_err |
internal
|
Dictionary_Get_Result strict 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Dictionary_Get_Response
|
|
2 |
err |
DictionaryError
|
|
3 |
framework_err |
internal
|
Dictionary_Insert_Result 严格
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Dictionary_Insert_Response
|
|
2 |
err |
DictionaryError
|
|
3 |
framework_err |
internal
|
Dictionary_Read_Result strict 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Dictionary_Read_Response
|
|
3 |
framework_err |
internal
|
Dictionary_Remove_Result strict 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Dictionary_Remove_Response
|
|
2 |
err |
DictionaryError
|
|
3 |
framework_err |
internal
|
Factory_CreateDictionary_Result strict 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Factory_CreateDictionary_Response
|
|
3 |
framework_err |
internal
|
Factory_CreateSender_Result strict 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Factory_CreateSender_Response
|
|
3 |
framework_err |
internal
|
HandleCapability_GetHandle_Result 严格的 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
HandleCapability_GetHandle_Response
|
|
2 |
err |
HandleCapabilityError
|
Router_Route_Result 严格 资源
在 fuchsia.component.sandbox/sandbox.fidl 中定义
序数 | 变体 | 类型 | 说明 |
---|---|---|---|
1 |
response |
Router_Route_Response
|
|
2 |
err |
RouterError
|
|
3 |
framework_err |
internal
|
常量
名称 | 值 | 类型 | 说明 |
---|---|---|---|
MAX_DATA_LENGTH |
8192
|
uint32 |
[DataCapability] 中的最大字节数。 |
MAX_DICTIONARY_ITEMS_CHUNK |
128
|
uint32 |
[DictionaryIterator] 返回的项数上限。 |
MAX_NAME_LENGTH |
fuchsia.io/MAX_NAME_LENGTH
|
uint64 |
字典键的最大长度。这与 fuchsia.component.MAX_NAME_LENGTH 一致。 添加了:HEAD
|
别名
名称 | 值 | 说明 |
---|---|---|
DictionaryKey |
string [MAX_NAME_LENGTH ] |
DictionaryItem 的键。如需了解有效键的约束条件,请参阅 https://fuchsia.dev/reference/cml#names。 添加了:HEAD
|