blob: fe3b717410f8d8be90aeed5c7af5da6721914b7c [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.castsetup
<p>For internal Google use only.
This API is not to be used within the Fuchsia tree.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## ApiRegistry {#ApiRegistry}
*Defined in [fuchsia.castsetup/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.castsetup/server.fidl;l=33)*
<p>Registry that hosts APIs on behalf of clients.</p>
### RegisterApi {#ApiRegistry.RegisterApi}
<p>Registers an API that may accept incoming data.</p>
<p><code>path</code> identifies how to access the API. If multiple registrations occur with
the same path, then the last registration is bound, and the rest are unbound.</p>
<p><code>accepts_data</code> indicates whether this API should allow callers to provide
data in the form of a JSON string.</p>
<p><code>security_state</code> indicates what level of security the caller must
adhere to.</p>
#### Request {#ApiRegistry.RegisterApi_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>path</code></td>
<td>
<code>string[1024]</code>
</td>
</tr>
<tr>
<td><code>api_mode</code></td>
<td>
<code><a class='link' href='#ApiMode'>ApiMode</a></code>
</td>
</tr>
<tr>
<td><code>security_state</code></td>
<td>
<code><a class='link' href='#SecurityState'>SecurityState</a></code>
</td>
</tr>
<tr>
<td><code>api_handler</code></td>
<td>
<code><a class='link' href='#ApiRequestHandler'>ApiRequestHandler</a></code>
</td>
</tr>
</table>
## ApiRequestHandler {#ApiRequestHandler}
*Defined in [fuchsia.castsetup/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.castsetup/server.fidl;l=14)*
<p>Registered API that handles an incoming request.</p>
### HandleRequest {#ApiRequestHandler.HandleRequest}
<p>Called to handle a request to this setup API. The request <code>data</code> is JSON.
The response <code>data</code> must be JSON.</p>
#### Request {#ApiRequestHandler.HandleRequest_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>data</code></td>
<td>
<code>string?</code>
</td>
</tr>
</table>
#### Response {#ApiRequestHandler.HandleRequest_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>response_code</code></td>
<td>
<code>uint32</code>
</td>
</tr>
<tr>
<td><code>data</code></td>
<td>
<code>string?</code>
</td>
</tr>
</table>
## StateWatcher {#StateWatcher}
*Defined in [fuchsia.castsetup/cast_setup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.castsetup/cast_setup.fidl;l=8)*
<p>Interface that allows watching of changes to the cast setup state.</p>
### Watch {#StateWatcher.Watch}
<p>Will immediately return on first call; subsequent calls will return on
change.</p>
#### Request {#StateWatcher.Watch_Request}
&lt;EMPTY&gt;
#### Response {#StateWatcher.Watch_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>state</code></td>
<td>
<code><a class='link' href='#State'>State</a></code>
</td>
</tr>
</table>
## **ENUMS**
### ApiMode [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ApiMode data-text="ApiMode"}
Type: <code>uint32</code>
*Defined in [fuchsia.castsetup/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.castsetup/server.fidl;l=26)*
<p>API operation mode to specify during registration.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="ApiMode.ACCEPTS_NO_DATA">
<td><h3 id="ApiMode.ACCEPTS_NO_DATA" class="add-link hide-from-toc">ACCEPTS_NO_DATA</h3></td>
<td><code>1</code></td>
<td></td>
</tr>
<tr id="ApiMode.ACCEPTS_DATA">
<td><h3 id="ApiMode.ACCEPTS_DATA" class="add-link hide-from-toc">ACCEPTS_DATA</h3></td>
<td><code>2</code></td>
<td></td>
</tr>
</table>
### SecurityState [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#SecurityState data-text="SecurityState"}
Type: <code>uint32</code>
*Defined in [fuchsia.castsetup/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.castsetup/server.fidl;l=7)*
<p>Specifies the required security for a client of the API.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="SecurityState.SECURITY_STATE_NONE">
<td><h3 id="SecurityState.SECURITY_STATE_NONE" class="add-link hide-from-toc">SECURITY_STATE_NONE</h3></td>
<td><code>0</code></td>
<td></td>
</tr>
<tr id="SecurityState.SECURITY_STATE_ENCRYPTED">
<td><h3 id="SecurityState.SECURITY_STATE_ENCRYPTED" class="add-link hide-from-toc">SECURITY_STATE_ENCRYPTED</h3></td>
<td><code>1</code></td>
<td></td>
</tr>
<tr id="SecurityState.SECURITY_STATE_TRUSTED">
<td><h3 id="SecurityState.SECURITY_STATE_TRUSTED" class="add-link hide-from-toc">SECURITY_STATE_TRUSTED</h3></td>
<td><code>2</code></td>
<td></td>
</tr>
</table>
### State [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#State data-text="State"}
Type: <code>uint32</code>
*Defined in [fuchsia.castsetup/cast_setup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.castsetup/cast_setup.fidl;l=17)*
<p>Enum of different possible setup states</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="State.UNKNOWN">
<td><h3 id="State.UNKNOWN" class="add-link hide-from-toc">UNKNOWN</h3></td>
<td><code>0</code></td>
<td><p>State is not determined.</p>
</td>
</tr>
<tr id="State.IN_PROGRESS">
<td><h3 id="State.IN_PROGRESS" class="add-link hide-from-toc">IN_PROGRESS</h3></td>
<td><code>1</code></td>
<td><p>Setup is not complete and is in progress.</p>
</td>
</tr>
<tr id="State.OFFLINE">
<td><h3 id="State.OFFLINE" class="add-link hide-from-toc">OFFLINE</h3></td>
<td><code>2</code></td>
<td><p>Configured once but disconnected for now.</p>
</td>
</tr>
<tr id="State.COMPLETE">
<td><h3 id="State.COMPLETE" class="add-link hide-from-toc">COMPLETE</h3></td>
<td><code>3</code></td>
<td><p>Setup is complete and device is connected.</p>
</td>
</tr>
</table>