27 #ifndef SDBUS_CXX_CONVENIENCEAPICLASSES_H_
28 #define SDBUS_CXX_CONVENIENCEAPICLASSES_H_
35 #include <type_traits>
57 template <
typename _Function>
MethodRegistrator& implementedAs(_Function&& callback);
59 template <
typename... _String>
MethodRegistrator& withInputParamNames(_String... paramNames);
61 template <
typename... _String>
MethodRegistrator& withOutputParamNames(_String... paramNames);
68 const std::string& methodName_;
69 std::string interfaceName_;
70 std::string inputSignature_;
71 std::vector<std::string> inputParamNames_;
72 std::string outputSignature_;
73 std::vector<std::string> outputParamNames_;
74 method_callback methodCallback_;
88 template <
typename... _Args>
SignalRegistrator& withParameters(std::vector<std::string> paramNames);
89 template <
typename... _Args,
typename... _String>
SignalRegistrator& withParameters(_String... paramNames);
94 const std::string& signalName_;
95 std::string interfaceName_;
96 std::string signalSignature_;
97 std::vector<std::string> paramNames_;
118 const std::string& propertyName_;
119 std::string interfaceName_;
120 std::string propertySignature_;
121 property_get_callback getter_;
122 property_set_callback setter_;
141 const std::string& interfaceName_;
152 SignalEmitter& onInterface(
const std::string& interfaceName);
153 template <
typename... _Args>
void withArguments(_Args&&... args);
157 const std::string& signalName_;
169 MethodInvoker& onInterface(
const std::string& interfaceName);
171 template <
typename _Rep,
typename _Period>
172 MethodInvoker& withTimeout(
const std::chrono::duration<_Rep, _Period>& timeout);
173 template <
typename... _Args>
MethodInvoker& withArguments(_Args&&... args);
174 template <
typename... _Args>
void storeResultsTo(_Args&... args);
176 void dontExpectReply();
180 const std::string& methodName_;
184 bool methodCalled_{};
193 template <
typename _Rep,
typename _Period>
196 template <
typename _Function>
void uponReplyInvoke(_Function&& callback);
200 const std::string& methodName_;
210 template <
typename _Function>
void call(_Function&& callback);
214 const std::string& signalName_;
215 std::string interfaceName_;
226 const std::string& propertyName_;
234 template <
typename _Value>
void toValue(
const _Value& value);
239 const std::string& propertyName_;
240 std::string interfaceName_;