virthttp  0.0
libvirt http interface
Public Member Functions | List of all members
DomainUnawareHandlers Struct Reference

#include <domain.hpp>

Inheritance diagram for DomainUnawareHandlers:
HandlerContext

Public Member Functions

 DomainUnawareHandlers (HandlerContext &ctx)
 
constexpr auto search_all_flags (const TargetParser &target) const noexcept-> std::optional< virt::enums::connection::list::domains::Flag >
 

Additional Inherited Members

- Public Attributes inherited from HandlerContext
virt::Connectionconn
 the connection to perform libvirt operations through (plans to change to a vector) More...
 
JsonResjson_res
 the result of running the handlers to be sent to the client More...
 
const TargetParsertarget
 the incoming request's URI target More...
 
- Protected Member Functions inherited from HandlerContext
template<class... Args>
auto error (Args &&...args) const noexcept(noexcept(json_res.error(std::forward< Args >(args)...))) -> decltype(json_res.error(std::forward< Args >(args)...))
 
const auto fwd_err (bool fwd, int code)
 
const auto fwd_as_if_err (int code)
 

Detailed Description

Domains-specific handler utilities

Constructor & Destructor Documentation

DomainUnawareHandlers::DomainUnawareHandlers ( HandlerContext ctx)
inlineexplicit

Member Function Documentation

constexpr auto DomainUnawareHandlers::search_all_flags ( const TargetParser target) const -> std::optional<virt::enums::connection::list::domains::Flag>
inlinenoexcept

Extractor of virt::Connection::List::Domains::Flag from a URI's target

Parameters
[in]targetthe target to extract the flag from
Returns
the flag, or std::nullopt on error

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