class ContentDirectoryProvider
Defined at line 926 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
Defines a provider which hosts resources from a [`fuchsia.io/Directory`]. Content can `GET`
resource files via the provider, but not enumerate directories. Resources can be accessed by
their URLs: `fuchsia-dir://
<provider
-name>/
<path
/to/resource>`
By default the MIME types of files are determined automatically by "sniffing" the contents of
the files. No content encoding will be declared, which browsers will interpret as meaning
`"text/plain"`.
Content type and encoding metadata may optionally be specified explicitly by metadata files,
which reside alongside the file. Metadata is expressed in JSON files, named after the files
they describe with a `"._metadata"` suffix.
For example, the file `"index.html"` would have the a metadata file called
`"index.html._metadata"`, with the following contents:
```
{
"charset": "utf-8",
"mime": "text/html"
}
```
Public Members
static const fidl_type_t * FidlType
Public Methods
bool IsEmpty ()
Returns whether no field is set.
const ::std::string & name ()
Name of the provider. Must be non-empty and composed solely of alphanumerics, dots, and
dashes.
Defined at line 934 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_name ()
Defined at line 938 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::std::string * mutable_name ()
Name of the provider. Must be non-empty and composed solely of alphanumerics, dots, and
dashes.
Defined at line 944 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_name ()
Defined at line 952 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::fidl::InterfaceHandle< ::fuchsia::io::Directory> & directory ()
Directory containing the files served by this provider.
Defined at line 961 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_directory ()
Defined at line 965 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::fidl::InterfaceHandle< ::fuchsia::io::Directory> * mutable_directory ()
Directory containing the files served by this provider.
Defined at line 970 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_directory ()
Defined at line 978 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
ContentDirectoryProvider & set_name (::std::string _value)
ContentDirectoryProvider & set_directory (::fidl::InterfaceHandle< ::fuchsia::io::Directory> _value)
void ContentDirectoryProvider ()
void ContentDirectoryProvider (ContentDirectoryProvider && other)
void ~ContentDirectoryProvider ()
ContentDirectoryProvider & operator= (ContentDirectoryProvider && other)
::std::unique_ptr<ContentDirectoryProvider> New ()
void Encode (::fidl::Encoder * _encoder, size_t _offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, ContentDirectoryProvider * _value, size_t _offset)
zx_status_t Clone (ContentDirectoryProvider * _result)