class ComposedServiceDir

Defined at line 23 of file ../../sdk/lib/vfs/cpp/composed_service_dir.h

A directory-like object which created a composed `PseudoDir` on top of a `fallback_dir`. It can

be used to connect to services in `fallback_dir`, but will not enumerate them.

This class is thread-safe.

Public Methods

void ComposedServiceDir ()

Defined at line 25 of file ../../sdk/lib/vfs/cpp/composed_service_dir.h

zx_status_t Serve (fuchsia_io::Flags flags, fidl::ServerEnd<fuchsia_io::Directory> server_end, async_dispatcher_t * dispatcher)

Serve a new connection to this directory on `server_end` using specified `flags`.

This method must only be used with a single-threaded asynchronous dispatcher. If `dispatcher`

is `nullptr`, the current thread's default dispatcher will be used via

`async_get_default_dispatcher`. The same `dispatcher` must be used if multiple connections are

served for the same node, otherwise `ZX_ERR_INVALID_ARGS` will be returned.

Defined at line 33 of file ../../sdk/lib/vfs/cpp/composed_service_dir.h

void SetFallback (fidl::ClientEnd<fuchsia_io::Directory> fallback_dir)

Sets the fallback directory for services. Services in this directory can be connected to, but

will not be enumerated. This method may only be called once.

Defined at line 44 of file ../../sdk/lib/vfs/cpp/composed_service_dir.h

void AddService (const std::string & service_name, std::unique_ptr<vfs::Service> service)

Adds a service to this directory. Services added will be preferred over those in the fallback

directory, and can be enumerated.

Defined at line 51 of file ../../sdk/lib/vfs/cpp/composed_service_dir.h

void set_fallback (fidl::InterfaceHandle<fuchsia::io::Directory> fallback_dir)

Sets the fallback directory for services. Services in this directory can be connected to, but

will not be enumerated. This method may only be called once.

Defined at line 58 of file ../../sdk/lib/vfs/cpp/composed_service_dir.h