virthttp  0.0
libvirt http interface
Public Member Functions | Static Public Member Functions | List of all members
NetworkUnawareHandlers Class Reference

#include <network.hpp>

Inheritance diagram for NetworkUnawareHandlers:
HandlerContext

Public Member Functions

 NetworkUnawareHandlers (HandlerContext &ctx)
 

Static Public Member Functions

static constexpr auto search_all_flags (const TargetParser &target) noexcept-> std::optional< virt::enums::connection::list::networks::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

Networks-specific handler utilities

Constructor & Destructor Documentation

NetworkUnawareHandlers::NetworkUnawareHandlers ( HandlerContext ctx)
inlineexplicit

Member Function Documentation

static constexpr auto NetworkUnawareHandlers::search_all_flags ( const TargetParser target) -> std::optional<virt::enums::connection::list::networks::Flag>
inlinestaticnoexcept

Extractor of virt::Connection::List::Networks::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 class was generated from the following file: