template <typename FidlType>
class MetadataServer
Defined at line 67 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
Public Methods
void MetadataServer<FidlType> (std::string instance_name)
The caller's component manifest must specify `|FidlType|::kSerializableName` as a service
capability and expose it. Otherwise, other components will not be able to retrieve metadata.
Defined at line 71 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
zx::result<bool> ForwardAndServe (fdf::OutgoingDirectory &outgoing,async_dispatcher_t *dispatcher,fidl::UnownedClientEnd<fuchsia_hardware_platform_device::Device>pdev)
Retrieves |FidlType| from |pdev| and serves it to |outgoing|. If the metadata was unable to be
retrieved then nothing is served. Returns true if the metadata was retrieved and false
otherwise.
Defined at line 78 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
zx::result<bool> ForwardAndServe (fdf::OutgoingDirectory &outgoing,async_dispatcher_t *dispatcher,fidl::ClientEnd<fuchsia_hardware_platform_device::Device> &pdev)
Defined at line 102 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
zx::result<bool> ForwardAndServe (fdf::OutgoingDirectory &outgoing,async_dispatcher_t *dispatcher,fdf::PDev &pdev)
Defined at line 108 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
zx::result<bool> ForwardAndServe (fdf::OutgoingDirectory &outgoing,async_dispatcher_t *dispatcher,fidl::UnownedClientEnd<fuchsia_io::Directory>incoming,std::string_viewinstance_name)
Retrieves |FidlType| from |instance_name| in |incoming| and serves it to |outgoing|. If the
metadata was unable to be retrieved then nothing is served. Returns true if the metadata was
retrieved and false otherwise.
Defined at line 116 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
zx::result<bool> ForwardAndServe (fdf::OutgoingDirectory &outgoing,async_dispatcher_t *dispatcher,const std::shared_ptr<fdf::Namespace> &incoming,std::string_viewinstance_name)
Defined at line 156 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
zx::result<> Serve (fdf::OutgoingDirectory &outgoing,async_dispatcher_t *dispatcher,const FidlType &metadata)
Serves the fuchsia.driver.metadata/Service service to |outgoing| under the service name
`|FidlType|::kSerializableName` and instance name `MetadataServer::instance_name_`. |metadata|
is the metadata to be served.
Defined at line 166 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
std::optional<fuchsia_driver_framework::Offer> CreateOffer ()
Creates an offer for this `MetadataServer` instance's fuchsia.driver.metadata/Service
service. Returns an std::nullopt if the metadata server is not serving metadata.
Defined at line 181 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h
std::optional<fuchsia_driver_framework::wire::Offer> CreateOffer (fidl::AnyArena & arena)
Creates an offer for this `MetadataServer` instance's fuchsia.driver.metadata/Service
service. Returns an std::nullopt if the metadata server is not serving metadata.
Defined at line 191 of file ../../sdk/lib/driver/metadata/cpp/metadata_server.h