template <>

class NaturalClientImpl

Defined at line 591 of file fidling/gen/sdk/fidl/fuchsia.pkg/fuchsia.pkg/cpp/fidl/fuchsia.pkg/cpp/natural_messaging.h

Public Methods

::fidl::internal::NaturalThenable< ::fuchsia_pkg::NeededBlobs::OpenMetaBlob> OpenMetaBlob ()

Opens the package's metadata blob for writing. `GetMissingBlobs()`

should not be called until writing the meta blob or this request

responds with `false`.

If the package was already cached, server will close the channel with a

`ZX_OK` epitaph.

- response `writer` is used to write the blob. If `writer` is absent,

the blob is already cached and so does not need to be written.

* error an OpenBlobError indicating failure. Clients may retry this

request, though the server end may abort this cache operation on

errors it considers to be fatal.

::fidl::internal::NaturalThenable< ::fuchsia_pkg::NeededBlobs::OpenBlob> OpenBlob (const ::fidl::Request< ::fuchsia_pkg::NeededBlobs::OpenBlob> & request)

Opens a blob for writing.

+ request `blob_id` the blob id describing this blob.

+ request `allow_existing` whether to open the blob even if it is already present.

- response `writer` is used to write the blob. If `writer` is absent,

the blob is already cached and so does not need to be written.

* error an OpenBlobError indicating failure. Clients may retry this

request, though the server end may abort this cache operation on

errors it considers to be fatal.

::fidl::internal::NaturalThenable< ::fuchsia_pkg::NeededBlobs::BlobWritten> BlobWritten (const ::fidl::Request< ::fuchsia_pkg::NeededBlobs::BlobWritten> & request)

Indicates that a blob opened by `Open[Meta]Blob` has been successfully

written.

A client should call this once the blob has been fully written using

the `writer` returned by `Open[Meta]Blob`.

+ request `blob_id` the blob id describing this blob.

* error a BlobWrittenError indicating failure. Clients may retry the

`Open[Meta]Blob` request that prompted this call, though the server

end may abort this cache operation on errors it considers to be fatal.

::fidl::internal::NaturalThenable< ::fuchsia_pkg::NeededBlobs::Abort> Abort ()

Aborts this caching operation for the package.

Any open blobs and any missing blobs iterator will be closed. Any `dir`

provided to the associated [`PackageCache.Get`] request will also be

closed. Once this request is acknowledged, this channel will be closed.

Note, dropping this NeededBlobs channel without writing all needed blobs

will also abort the package cache operation. However, this API provides

the ability to wait for the operation to be torn down.

::fit::result< ::fidl::OneWayError> GetMissingBlobs (::fidl::Request< ::fuchsia_pkg::NeededBlobs::GetMissingBlobs> request)

Returns an iterator of blobs that are not present on the system that

must be written using the `OpenBlob` request before the package will be

fully cached.

Client should call `OpenMetaBlob`, and write it if needed, before

calling `GetMissingBlobs`.

A client should make this request no more than once per `NeededBlobs`

connection. Once all blobs yielded by this iterator are written, the

package open request will complete.

New items may be added to the obtained `BlobInfoIterator` as the client

calls `OpenBlob`, so, to guaranatee termination of the iterator, clients

should call `OpenBlob` concurrently with reading the iterator.

+ request `iterator` a request for an iterator of [`BlobInfo`] of blobs

that the client should try to write.