blob: d7c1f7ae42ab8b64fb89af6b3746511ec71652f4 [file] [log] [blame] [view] [edit]
<link rel="stylesheet" href="../style.css" />
[TOC]
# test.fidl.pkg
## **PROTOCOLS**
## Harness {#Harness}
*Defined in [test.fidl.pkg/test.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:src/sys/pkg/tests/pkgdir/pkg-harness/test.test.fidl;l=25)*
<p>This protocol can be used to connect to a package.</p>
### ConnectPackage {#Harness.ConnectPackage}
<p>Connects to a package backed by either pkgfs or pkg-dir. A package is a directory tree with
additional constraints: e.g. there is a meta/ subdirectory, meta/contents and meta/package
files, the entries in meta/contents appear in the directory tree itself, and the files are
not writable. For more context, see the package
<a href="https://fuchsia.dev/fuchsia-src/concepts/packages/package">documentation</a>.</p>
<ul>
<li>request <code>backing</code> is the source of package we want (e.g. pkgfs or pkg-dir backed).</li>
<li>request <code>dir</code> is the server end of directory to connect the package to.</li>
</ul>
<ul>
<li>error a <code>ConnectError</code> value indicating failure reason.</li>
</ul>
#### Request {#Harness.ConnectPackage_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>backing</code></td>
<td>
<code><a class='link' href='#Backing'>Backing</a></code>
</td>
</tr><tr>
<td><code>dir</code></td>
<td>
<code>request&lt;<a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Directory'>Directory</a>&gt;</code>
</td>
</tr></table>
#### Response {#Harness.ConnectPackage_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Harness_ConnectPackage_Result'>Harness_ConnectPackage_Result</a></code>
</td>
</tr></table>
## **STRUCTS**
### Harness_ConnectPackage_Response {#Harness_ConnectPackage_Response data-text="Harness_ConnectPackage_Response"}
*Defined in [test.fidl.pkg/test.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:src/sys/pkg/tests/pkgdir/pkg-harness/test.test.fidl;l=38)*
&lt;EMPTY&gt;
## **ENUMS**
### Backing [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Backing}
Type: <code>uint32</code>
*Defined in [test.fidl.pkg/test.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:src/sys/pkg/tests/pkgdir/pkg-harness/test.test.fidl;l=9)*
<p>Packages can either be backed by pkgfs (SWD v1) or pkgdir (SWD v2).</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="Backing.PKGFS">
<td><code>PKGFS</code></td>
<td><code>0</code></td>
<td>
</td>
</tr><tr id="Backing.PKGDIR">
<td><code>PKGDIR</code></td>
<td><code>1</code></td>
<td>
</td>
</tr></table>
### ConnectError [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#ConnectError}
Type: <code>uint32</code>
*Defined in [test.fidl.pkg/test.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:src/sys/pkg/tests/pkgdir/pkg-harness/test.test.fidl;l=15)*
<p>Error codes for <code>ConnectPackage</code>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="ConnectError.INTERNAL">
<td><code>INTERNAL</code></td>
<td><code>1</code></td>
<td><p>The harness encountered an otherwise unspecified error while handling the request.</p>
</td>
</tr><tr id="ConnectError.UNSUPPORTED_BACKING">
<td><code>UNSUPPORTED_BACKING</code></td>
<td><code>2</code></td>
<td><p>The harness does not support the provided backing.</p>
</td>
</tr></table>
## **UNIONS**
### Harness_ConnectPackage_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Harness_ConnectPackage_Result data-text="Harness_ConnectPackage_Result"}
*Defined in [test.fidl.pkg/test.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:src/sys/pkg/tests/pkgdir/pkg-harness/test.test.fidl;l=38)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Harness_ConnectPackage_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Harness_ConnectPackage_Response'>Harness_ConnectPackage_Response</a></code>
</td>
<td>
</td>
</tr><tr id="Harness_ConnectPackage_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#ConnectError'>ConnectError</a></code>
</td>
<td>
</td>
</tr></table>