roar
Loading...
Searching...
No Matches
Public Attributes | List of all members
Roar::ServeOptions< RequestListenerT > Struct Template Reference

#include <request_listener.hpp>

Collaboration diagram for Roar::ServeOptions< RequestListenerT >:

Public Attributes

FlexibleProvider< RequestListenerT, bool > allowDownload = true
 Allow GET requests to download files.
 
FlexibleProvider< RequestListenerT, bool > allowUpload = false
 Allow PUT requests to upload files.
 
FlexibleProvider< RequestListenerT, bool > allowOverwrite = false
 Allow PUT requests to overwrite existing files.
 
FlexibleProvider< RequestListenerT, bool > allowDelete = false
 Allow DELETE requests to delete files.
 
FlexibleProvider< RequestListenerT, bool > allowDeleteOfNonEmptyDirectories = false
 Allow DELETE for directories that are non empty?
 
FlexibleProvider< RequestListenerT, bool > allowListing = true
 Requests on directories become listings.
 
FlexibleProvider< RequestListenerT, std::filesystem::path > pathProvider = std::filesystem::path{}
 Serve files from the directory given by this function.
 
FlexibleProvider< RequestListenerT, std::string, true > customListingStyle = std::monostate{}
 Serve files from the directory given by this function.
 
FlexibleProvider< RequestListenerT, std::function< void(std::string const &err)> > onError
 Called when errors occur on serve.
 
FlexibleProvider< RequestListenerT, std::function< void(bool)> > onFileServeComplete = std::function<void(bool)>{}
 Called when errors occur on serve file complete. bool parameter = was the connection closed?
 

Member Data Documentation

◆ allowDelete

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, bool> Roar::ServeOptions< RequestListenerT >::allowDelete = false

Allow DELETE requests to delete files.

◆ allowDeleteOfNonEmptyDirectories

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, bool> Roar::ServeOptions< RequestListenerT >::allowDeleteOfNonEmptyDirectories = false

Allow DELETE for directories that are non empty?

◆ allowDownload

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, bool> Roar::ServeOptions< RequestListenerT >::allowDownload = true

Allow GET requests to download files.

◆ allowListing

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, bool> Roar::ServeOptions< RequestListenerT >::allowListing = true

Requests on directories become listings.

◆ allowOverwrite

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, bool> Roar::ServeOptions< RequestListenerT >::allowOverwrite = false

Allow PUT requests to overwrite existing files.

◆ allowUpload

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, bool> Roar::ServeOptions< RequestListenerT >::allowUpload = false

Allow PUT requests to upload files.

◆ customListingStyle

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, std::string, true> Roar::ServeOptions< RequestListenerT >::customListingStyle = std::monostate{}

Serve files from the directory given by this function.

◆ onError

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, std::function<void(std::string const& err)> > Roar::ServeOptions< RequestListenerT >::onError
Initial value:
=
std::function<void(std::string const& err)>{}

Called when errors occur on serve.

◆ onFileServeComplete

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, std::function<void(bool)> > Roar::ServeOptions< RequestListenerT >::onFileServeComplete = std::function<void(bool)>{}

Called when errors occur on serve file complete. bool parameter = was the connection closed?

◆ pathProvider

template<typename RequestListenerT >
FlexibleProvider<RequestListenerT, std::filesystem::path> Roar::ServeOptions< RequestListenerT >::pathProvider = std::filesystem::path{}

Serve files from the directory given by this function.


The documentation for this struct was generated from the following file: