fuchsia.component

新增:7

通訊協定

繫結機制

定義於 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。

新增:14

刪除

刪除這個元件。這個方法傳回時,元件會遭到刪除,或是在發生錯誤時不會刪除。

錯誤:

  • ACCESS_DENIED:不允許刪除這個元件。目前,如果元件是父項的靜態子項,就可能發生這種情況。
  • INTERNAL:有問題導致無法成功刪除,元件管理服務的記錄會提供更多詳細資料。
新增:HEAD

要求

<EMPTY>

回應

名稱類型
payload Controller_Destroy_Result

GetExposedDictionary

傳回字典,內容包含元件公開的功能。

新增:HEAD

要求

<EMPTY>

回應

名稱類型
payload Controller_GetExposedDictionary_Result

GetOutputDictionary

傳回元件輸出字典的參照,可透過 fuchsia.component.runtime.Capabilities API 與其互動。

新增:HEAD

要求

<EMPTY>

回應

名稱類型
payload Controller_GetOutputDictionary_Result

IsStarted

如果這個執行個體目前正在執行,則傳回 true。

要求

<EMPTY>

回應

名稱類型
payload Controller_IsStarted_Result

OpenExposedDir

開啟受控元件的公開目錄,並透過該目錄提供元件透過 ComponentDecl.exposes 公開的功能 (如果成功)。

如要繫結至公開目錄,必須先解析元件,但除非有需要,否則能力不會啟動。

如果這個元件遭到刪除,系統會關閉與 exposed_dir 的所有未完成連線。

錯誤:

  • INSTANCE_CANNOT_RESOLVE:無法解析這個元件。
新增:30

要求

名稱類型
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

元件階層事件的監聽器。無法在平台外使用。

新增:11

GetNext

要求

<EMPTY>

回應

名稱類型
events vector<Event>

WaitForReady

立即傳回。用於表示 FIDL 連線已完成。非靜態串流需要這項設定,才能在元件啟動前確認訂閱已完成。

要求

<EMPTY>

回應

<EMPTY>

ExecutionController

定義於 fuchsia.component/controller.fidl

新增:14

OnStop

當子項因呼叫 Stop、子項自行退出或任何其他原因而停止時,系統會呼叫 OnStop,然後關閉這個管道。

回應

名稱類型
stopped_payload StoppedPayload

停止

對這個元件啟動停止動作。完成後,系統會使用停止的酬載呼叫 OnStop,並關閉這個管道。

請注意,元件隨時可能自行停止執行,因此 OnStop 可能會在 Stop 呼叫前收到。

要求

<EMPTY>

Introspector

定義於 fuchsia.component/introspector.fidl

元件執行個體用來取得自身領域中元件相關資訊的通訊協定。

這項通訊協定目前僅支援取得路徑名稱,但未來可能會擴展至其他特殊權限資訊,例如元件的網址。

元件架構會為使用架構中 fuchsia.component.Introspector 的元件提供這項能力。

新增:HEAD

GetMoniker

取得與所提供權杖對應的元件領域相關的路徑名稱。執行器可透過 fuchsia.component.runner/ComponentStartInfo.component_instance 取得權杖。

如果權杖無效,或不對應這個領域下的元件,則會傳回 Error.INSTANCE_NOT_FOUND。

要求

名稱類型
component_instance handle<event>

回應

名稱類型
payload Introspector_GetMoniker_Result

命名空間

定義於 fuchsia.component/namespace.fidl

執行命名空間作業的通訊協定。

新增:20

建立

已淘汰:HEAD

要求

名稱類型
entries vector<NamespaceInputEntry>

回應

名稱類型
payload Namespace_Create_Result

Create2

新增:HEAD

要求

名稱類型
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:collection 中已有 decl.name。
  • 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 互動。

新增:HEAD

要求

名稱類型
child fuchsia.component.decl/ChildRef

回應

名稱類型
payload Realm_GetChildOutputDictionary_Result

GetChildOutputDictionaryDeprecated

新增:HEAD

要求

名稱類型
child fuchsia.component.decl/ChildRef

回應

名稱類型
payload Realm_GetChildOutputDictionaryDeprecated_Result

GetResolvedInfo

傳回這項元件的解析器提供給元件架構的資訊組合。

新增:HEAD

要求

<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

對子元件執行操作。請參閱控制器說明文件。

錯誤:

  • INVALID_ARGUMENTS:child 不是有效的子項參照。
  • INSTANCE_NOT_FOUND:child 不存在。
  • INSTANCE_DIED:這個領域已不存在。
新增:HEAD

要求

名稱類型
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

新增:30

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|。

新增:30

繼續

使用儲存空間能力擷取下一組元件。傳回的路徑名稱與宣告儲存空間能力的元件相關。傳回所有元件後,會傳回空白向量。

要求

<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

已淘汰:HEAD 新增:20

欄位類型說明預設
path string:4095 無預設值
dictionary client_end:fuchsia.component.sandbox/Dictionary 無預設值

NamespaceInputEntry2 資源

定義於 fuchsia.component/namespace.fidl

新增:HEAD

欄位類型說明預設
path string:4095

項目在命名空間中的路徑。

無預設值
capability handle<eventpair>

要安裝在命名空間中的功能 (使用 fuchsia.component.runtime.Capabilities 建立)。目前僅支援字典。

無預設值

Namespace_Create2_Response resource

定義於 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

新增:30

名稱值說明
1

向儲存空間供應商傳送要求時發生錯誤。

2

儲存空間供應商傳回錯誤,回應通訊協定要求。

3

沒有可刪除的儲存空間。

4

不支援這項呼叫。

錯誤彈性

類型:uint32

定義於 fuchsia.component/error.fidl

元件架構通訊協定的標準錯誤代碼。

名稱值說明
1

元件管理服務在執行作業時,發生其他不明錯誤。

2

至少有一個引數的格式無效。

3

目前不支援這項功能。

4

呼叫端沒有執行指定作業的權限,或呼叫端提供的其中一個控制代碼權限不足。

5

找不到元件執行個體。

6

已有這個元件執行個體。

7

無法啟動元件執行個體。

8

無法解析元件的宣告。

9

找不到元件集合。

10

資源不足,無法執行作業。

11

元件執行個體意外終止。

12

要求的資源不存在。

13

無法將元件標示為未解決。

14

元件執行個體已啟動。

新增:14
15

能力轉送會建立依附元件循環。

新增:29

EventType strict

類型:uint32

定義於 fuchsia.component/events.fidl

這些 EventType 用於 EventStream 通訊協定。這些是 hooks.rs 中 EventType 列舉的 FIDL 版本,含義相同。

新增:11

名稱值說明
1

系統已要求這個元件提供的功能。事件酬載會攜帶要求管道。

3

偵測到元件執行個體。這是元件生命週期的第一個階段。動態子項建立時、靜態子項的父項解析時,以及元件管理服務啟動時,系統會分別為動態子項、靜態子項和根目錄調度。

4

執行個體已刪除,不再存在。

5

首次成功解決執行個體的宣告。

6

根據元件管理服務,這個執行個體已啟動。不過,如果這是可執行的元件,執行元件還需要執行其他工作,才能啟動元件。

7

已成功停止執行個體。

8

與 STARTED 類似,但酬載會攜帶事件配對,訂閱者可使用該配對延遲啟動元件。例如,偵錯工具可在建立任何程序前執行一些設定。

9

已成功將執行個體標示為未解決。

NamespaceError 彈性

類型:uint32

定義於 fuchsia.component/namespace.fidl

Namespace 中的方法傳回錯誤。

新增:20

名稱值說明
1

父項的父項與另一個命名空間項目共用前置字元

2

兩個項目具有相同的命名空間路徑。

3

無法將命名空間字典轉換為目錄。

BAD_ENTRY

4

命名空間項目無效。

5

讀取其中一個字典時發生錯誤。

StatusError strict

類型:uint32

定義於 fuchsia.component/storage_admin.fidl

新增:30

名稱值說明
1

儲存空間供應商傳回要求錯誤,或與供應商的連線意外關閉。

2

儲存空間供應商傳回的資訊似乎無效。

3

呼叫儲存空間供應商成功,但傳回非預期的空白資料。

4

不支援這項呼叫。

TABLES

CapabilityRequestedPayload 資源

定義於 fuchsia.component/events.fidl

CapabilityRequested 事件的酬載

新增:11

序數欄位類型說明
name name

能力名稱。

capability handle<channel>

主機能力管道伺服器端的控制代碼。

CreateChildArgs 資源

定義於 fuchsia.component/realm.fidl

序數欄位類型說明
numbered_handles vector<fuchsia.process/HandleInfo>:128

要傳遞至元件執行個體的編號控制代碼。

如果元件的執行元件不支援編號控制代碼,則應關閉控制代碼。

dynamic_offers vector<fuchsia.component.decl/Offer>:128

指定元件執行個體的動態優惠。

如果在這個向量中加入 OfferDecl,新建立的子項除了會獲得父項 ComponentDecl 中指定集合的 OfferDecl,還會獲得額外功能。

任何類型的優惠 (例如通訊協定、目錄) 都可以做為動態優惠。任何適用於靜態優惠的來源,也適用於動態優惠。此外,與靜態優惠不同,動態優惠可使用「同層」動態子元件做為來源,只要將來源設為設定 collection 欄位的 ChildRef 即可。

動態優惠一律會指定新建立的子元件。因此,dynamic_offers 中的 OfferDecl 不得設定 target 欄位,因為其值為隱含值。

如果動態優惠的來源 (即 OfferDecl 的 source 欄位中指定的元件) 或目標遭到刪除,優惠本身也會同時刪除。

如要將這個欄位設為非空白值,建立子元件的集合必須指定 ComponentDecl.allowed_offers = STATIC_AND_DYNAMIC。

controller server_end:Controller

這個元件的控制器,可用於影響元件的生命週期。

新增:14
dictionary fuchsia.component.sandbox/DictionaryRef

包含元件執行個體額外功能的字典。這個欄位應視為已淘汰,建議改用 additional_inputs。如果兩者皆已設定,系統會傳回 INVALID_ARGUMENTS 錯誤。

新增:HEAD
additional_inputs handle<eventpair>

使用 fuchsia.component.runtime.Capabilities 建立的字典控制代碼,其中包含應新增至所建立子項輸入內容的其他功能。

新增:HEAD

DebugStartedPayload 資源

定義於 fuchsia.component/events.fidl

DebugStarted 事件的酬載。

新增:11

序數欄位類型說明
runtime_dir client_end:fuchsia.io/Directory

執行元件提供的目錄,用於呈現元件的執行階段和執行元件工具專屬資訊。另一端則會傳送至 ComponentStartInfo 中的執行元件。舉例來說,您可以查詢該元件是否為 ELF 元件,以及是否支援下方的 break_on_start 通訊協定。

break_on_start handle<eventpair>

偵錯工具可使用事件配對延遲啟動元件,例如 ELF 偵錯工具可在保留事件配對時,設定工作的例外狀況管道,然後捨棄事件配對,通知執行元件工具可以建立程序。另一端則會傳送至 ComponentStartInfo 中的執行元件。

DestroyedPayload

定義於 fuchsia.component/events.fidl

「已刪除」事件的酬載。

新增:11

序數欄位類型說明

DiscoveredPayload

定義於 fuchsia.component/events.fidl

「已發現」事件的酬載。

新增:11

序數欄位類型說明

事件資源

定義於 fuchsia.component/events.fidl

包含單一事件的所有資訊

新增:11

序數欄位類型說明
header EventHeader

產生這個事件的元件相關資訊。

payload EventPayload

某些事件類型的選用酬載

EventHeader

定義於 fuchsia.component/events.fidl

提供目標元件執行個體中繼資料的標頭。

新增:11

序數欄位類型說明
event_type EventType

事件對應的事件類型

moniker string:4096

識別元件執行個體的相對路徑名稱。相對於事件範圍。

component_url fuchsia.url/Url

用於解析元件的網址。

timestamp zx/InstantBoot

事件發生時的開機時間。

新增:25

NamespaceEntry 資源

定義於 fuchsia.component/controller.fidl

單一元件命名空間項目,用於描述命名空間掛接點 (path) 和支援該掛接點的目錄 (directory)。這種類型通常會在向量中組成。詳情請參閱 ComponentStartInfo.ns。

新增:14

序數欄位類型說明
path string:4095

目錄的掛接點,包括開頭斜線。例如:「/pkg」、「/svc」或「/config/data」。

directory client_end:fuchsia.io/Directory

掛接在上述 path 的目錄。

PurgedPayload

定義於 fuchsia.component/events.fidl

清除事件的酬載。

新增:11

序數欄位類型說明

ResolvedPayload

定義於 fuchsia.component/events.fidl

「已解決」事件的酬載。

新增:11

序數欄位類型說明

StartChildArgs 資源

定義於 fuchsia.component/controller.fidl

新增:14

序數欄位類型說明
numbered_handles vector<fuchsia.process/HandleInfo>:128

要傳遞至元件執行個體的編號控制代碼。

如果元件的執行元件不支援編號控制代碼,則應關閉控制代碼。

如果設定,這裡提供的值會覆寫 CreateChildArgs 中提供的控制代碼。

namespace_entries vector<NamespaceEntry>:32

元件管理服務產生的命名空間會擴充,納入此處列出的任何命名空間項目,然後再提供給元件的執行元件。

如有任何衝突項目,啟動元件時會發生錯誤。

dictionary fuchsia.component.sandbox/DictionaryRef

包含元件執行個體額外功能的字典。這個欄位應視為已淘汰,建議改用 additional_inputs。如果兩者皆已設定,系統會傳回 INVALID_ARGUMENTS 錯誤。

新增:HEAD
additional_inputs handle<eventpair>

使用 fuchsia.component.runtime.Capabilities 建立的字典控制代碼,其中包含應新增至已啟動程式輸入內容的其他功能。

新增:HEAD

StartedPayload

定義於 fuchsia.component/events.fidl

Started 事件的酬載。

新增:11

序數欄位類型說明

StoppedPayload

定義於 fuchsia.component/events.fidl

Stopped 事件的酬載。

新增:11

序數欄位類型說明
status zx/Result

在 fuchsia.component.runner/ComponentController 通訊協定管道上設定的墓誌銘。這是元件的結束狀態。如要瞭解可能的狀態值及其意義,請參閱 ComponentController 通訊協定的定義。

exit_code int64

元件執行個體的結束代碼。請注意,並非所有元件都會以結束代碼停止。

許多程式執行階段都有結束代碼的概念。跑者可視情況將該值對應至這個欄位。例如,ELF 執行元件會在這裡發布 Zircon 程序傳回代碼。

新增:23

StorageStatus

定義於 fuchsia.component/storage_admin.fidl

儲存空間狀態的中繼資料

新增:30

序數欄位類型說明
total_size uint64
used_size uint64

UnresolvedPayload

定義於 fuchsia.component/events.fidl

未解決事件的酬載。

新增:11

序數欄位類型說明

UNIONS

Controller_Destroy_Result strict

定義於 fuchsia.component/controller.fidl

序數Variant類型說明
response Controller_Destroy_Response
err Error
framework_err internal

Controller_GetExposedDictionary_Result strict resource

定義於 fuchsia.component/controller.fidl

序數Variant類型說明
response Controller_GetExposedDictionary_Response
err Error
framework_err internal

Controller_GetOutputDictionary_Result strict resource

定義於 fuchsia.component/controller.fidl

序數Variant類型說明
response Controller_GetOutputDictionary_Response
err Error
framework_err internal

Controller_IsStarted_Result strict resource

定義於 fuchsia.component/controller.fidl

序數Variant類型說明
response Controller_IsStarted_Response
err Error
framework_err internal

Controller_OpenExposedDir_Result strict

定義於 fuchsia.component/controller.fidl

序數Variant類型說明
response Controller_OpenExposedDir_Response
err Error

Controller_Start_Result strict

定義於 fuchsia.component/controller.fidl

序數Variant類型說明
response Controller_Start_Response
err Error
framework_err internal

EventPayload 彈性 資源

定義於 fuchsia.component/events.fidl

封裝某些事件類型的額外資料/通訊協定。

新增:11
序數Variant類型說明
capability_requested CapabilityRequestedPayload

CapabilityRequested 事件的酬載

purged PurgedPayload

清除事件的酬載。

discovered DiscoveredPayload

「已發現」事件的酬載。

已淘汰:22
destroyed DestroyedPayload

「已刪除」事件的酬載。

resolved ResolvedPayload

已解決事件的酬載

started StartedPayload

Started 事件的酬載

stopped StoppedPayload

Stopped 事件的酬載

debug_started DebugStartedPayload

DebugStarted 事件的酬載

unresolved UnresolvedPayload

未解決事件的酬載

Introspector_GetMoniker_Result strict

定義於 fuchsia.component/introspector.fidl

序數Variant類型說明
response Introspector_GetMoniker_Response
err Error
framework_err internal

Namespace_Create2_Result strict resource

定義於 fuchsia.component/namespace.fidl

序數Variant類型說明
response Namespace_Create2_Response
err NamespaceError
framework_err internal

Namespace_Create_Result strict resource

定義於 fuchsia.component/namespace.fidl

序數Variant類型說明
response Namespace_Create_Response
err NamespaceError
framework_err internal

Realm_CreateChild_Result strict

定義於 fuchsia.component/realm.fidl

序數Variant類型說明
response Realm_CreateChild_Response
err Error

Realm_DestroyChild_Result strict

定義於 fuchsia.component/realm.fidl

序數Variant類型說明
response Realm_DestroyChild_Response
err Error

Realm_GetChildOutputDictionaryDeprecated_Result strict resource

定義於 fuchsia.component/realm.fidl

序數Variant類型說明
response Realm_GetChildOutputDictionaryDeprecated_Response
err Error

Realm_GetChildOutputDictionary_Result strict resource

定義於 fuchsia.component/realm.fidl

序數Variant類型說明
response Realm_GetChildOutputDictionary_Response
err Error

Realm_GetResolvedInfo_Result strict resource

定義於 fuchsia.component/realm.fidl

序數Variant類型說明
response Realm_GetResolvedInfo_Response
err Error

Realm_ListChildren_Result strict

定義於 fuchsia.component/realm.fidl

序數Variant類型說明
response Realm_ListChildren_Response
err Error

Realm_OpenController_Result strict

定義於 fuchsia.component/realm.fidl

序數Variant類型說明
response Realm_OpenController_Response
err Error

Realm_OpenExposedDir_Result strict

定義於 fuchsia.component/realm.fidl

序數Variant類型說明
response Realm_OpenExposedDir_Response
err Error

StorageAdmin_DeleteAllStorageContents_Result strict

定義於 fuchsia.component/storage_admin.fidl

序數Variant類型說明
response StorageAdmin_DeleteAllStorageContents_Response
err DeletionError

StorageAdmin_DeleteComponentStorage_Result strict

定義於 fuchsia.component/storage_admin.fidl

序數Variant類型說明
response StorageAdmin_DeleteComponentStorage_Response
err Error

StorageAdmin_GetStatus_Result strict

定義於 fuchsia.component/storage_admin.fidl

序數Variant類型說明
response StorageStatus
err StatusError

StorageAdmin_ListStorageInRealm_Result strict

定義於 fuchsia.component/storage_admin.fidl

序數Variant類型說明
response StorageAdmin_ListStorageInRealm_Response
err Error

StorageAdmin_OpenComponentStorageById_Result strict

定義於 fuchsia.component/storage_admin.fidl

序數Variant類型說明
response StorageAdmin_OpenComponentStorageById_Response
err Error

StorageAdmin_OpenStorage_Result strict

定義於 fuchsia.component/storage_admin.fidl

序數Variant類型說明
response StorageAdmin_OpenStorage_Response
err Error

常數

名稱值類型說明
MAX_CAPABILITY_ID_LENGTH 50 uint64

能力 ID 的字串長度上限。這個值目前是任意設定。

新增:11
MAX_CHILD_COUNT 128 uint32

呼叫 ChildIterator.Next 可傳回的子項數量上限。請注意,這並非限制可新增至元件的子項數量。這只是單次叫用 Next 方法的限制。

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]