27#ifndef SDBUS_CXX_METHODRESULT_H_
28#define SDBUS_CXX_METHODRESULT_H_
49 template <
typename... Results>
56 Result(
const Result&) =
delete;
57 Result& operator=(
const Result&) =
delete;
59 Result(Result&& other) =
default;
60 Result& operator=(Result&& other) =
default;
64 void returnResults(
const Results&... results)
const;
65 void returnError(
const Error& error)
const;
71 template <
typename... Results>
72 inline Result<Results...>::Result(
MethodCall call)
73 : call_(std::move(call))
77 template <
typename... Results>
78 inline void Result<Results...>::returnResults(
const Results&... results)
const
80 assert(call_.isValid());
81 auto reply = call_.createReply();
82 (void)(reply << ... << results);
86 template <
typename... Results>
87 inline void Result<Results...>::returnError(
const Error& error)
const
89 auto reply = call_.createErrorReply(error);