virthttp  0.0
libvirt http interface
Public Attributes | Protected Member Functions | List of all members
HandlerContext Struct Reference

#include <hdl_ctx.hpp>

Inheritance diagram for HandlerContext:
DomainUnawareHandlers HandlerMethods NetworkUnawareHandlers DomainHandlers NetworkHandlers

Public Attributes

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

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

Context required to run request handlers regardless of the libvirt object type

Member Function Documentation

template<class... Args>
auto HandlerContext::error ( Args &&...  args) const -> decltype(json_res.error(std::forward<Args>(args)...))
inlineprotectednoexcept

Perfect-forwarding of json_res's JsonRes::error

const auto HandlerContext::fwd_as_if_err ( int  code)
inlineprotected
const auto HandlerContext::fwd_err ( bool  fwd,
int  code 
)
inlineprotected

Member Data Documentation

virt::Connection& HandlerContext::conn

the connection to perform libvirt operations through (plans to change to a vector)

JsonRes& HandlerContext::json_res

the result of running the handlers to be sent to the client

const TargetParser& HandlerContext::target

the incoming request's URI target


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