51 class MethodRegistrator
54 MethodRegistrator(
IObject&
object, std::string methodName);
55 MethodRegistrator(MethodRegistrator&& other) =
default;
56 ~MethodRegistrator()
noexcept(
false);
58 MethodRegistrator& onInterface(std::string interfaceName);
59 template <
typename _Function> MethodRegistrator& implementedAs(_Function&& callback);
60 MethodRegistrator& withInputParamNames(std::vector<std::string> paramNames);
61 template <
typename... _String> MethodRegistrator& withInputParamNames(_String... paramNames);
62 MethodRegistrator& withOutputParamNames(std::vector<std::string> paramNames);
63 template <
typename... _String> MethodRegistrator& withOutputParamNames(_String... paramNames);
64 MethodRegistrator& markAsDeprecated();
65 MethodRegistrator& markAsPrivileged();
66 MethodRegistrator& withNoReply();
70 std::string methodName_;
71 std::string interfaceName_;
72 std::string inputSignature_;
73 std::vector<std::string> inputParamNames_;
74 std::string outputSignature_;
75 std::vector<std::string> outputParamNames_;
76 method_callback methodCallback_;
81 class SignalRegistrator
84 SignalRegistrator(
IObject&
object, std::string signalName);
85 SignalRegistrator(SignalRegistrator&& other) =
default;
86 ~SignalRegistrator()
noexcept(
false);
88 SignalRegistrator& onInterface(std::string interfaceName);
89 template <
typename... _Args> SignalRegistrator& withParameters();
90 template <
typename... _Args> SignalRegistrator& withParameters(std::vector<std::string> paramNames);
91 template <
typename... _Args,
typename... _String> SignalRegistrator& withParameters(_String... paramNames);
92 SignalRegistrator& markAsDeprecated();
96 std::string signalName_;
97 std::string interfaceName_;
98 std::string signalSignature_;
99 std::vector<std::string> paramNames_;
104 class PropertyRegistrator
107 PropertyRegistrator(
IObject&
object,
const std::string& propertyName);
108 PropertyRegistrator(PropertyRegistrator&& other) =
default;
109 ~PropertyRegistrator()
noexcept(
false);
111 PropertyRegistrator& onInterface(std::string interfaceName);
112 template <
typename _Function> PropertyRegistrator& withGetter(_Function&& callback);
113 template <
typename _Function> PropertyRegistrator& withSetter(_Function&& callback);
114 PropertyRegistrator& markAsDeprecated();
115 PropertyRegistrator& markAsPrivileged();
116 PropertyRegistrator& withUpdateBehavior(Flags::PropertyUpdateBehaviorFlags behavior);
120 const std::string& propertyName_;
121 std::string interfaceName_;
122 std::string propertySignature_;
123 property_get_callback getter_;
124 property_set_callback setter_;
129 class InterfaceFlagsSetter
132 InterfaceFlagsSetter(
IObject&
object,
const std::string& interfaceName);
133 InterfaceFlagsSetter(InterfaceFlagsSetter&& other) =
default;
134 ~InterfaceFlagsSetter()
noexcept(
false);
136 InterfaceFlagsSetter& markAsDeprecated();
137 InterfaceFlagsSetter& markAsPrivileged();
138 InterfaceFlagsSetter& withNoReplyMethods();
139 InterfaceFlagsSetter& withPropertyUpdateBehavior(Flags::PropertyUpdateBehaviorFlags behavior);
143 const std::string& interfaceName_;
151 SignalEmitter(
IObject&
object,
const std::string& signalName);
152 SignalEmitter(SignalEmitter&& other) =
default;
153 ~SignalEmitter()
noexcept(
false);
154 SignalEmitter& onInterface(
const std::string& interfaceName);
155 template <
typename... _Args>
void withArguments(_Args&&... args);
159 const std::string& signalName_;
167 MethodInvoker(
IProxy& proxy,
const std::string& methodName);
168 MethodInvoker(MethodInvoker&& other) =
default;
169 ~MethodInvoker()
noexcept(
false);
171 MethodInvoker& onInterface(
const std::string& interfaceName);
172 MethodInvoker& withTimeout(uint64_t usec);
173 template <
typename _Rep,
typename _Period>
174 MethodInvoker& withTimeout(
const std::chrono::duration<_Rep, _Period>& timeout);
175 template <
typename... _Args> MethodInvoker& withArguments(_Args&&... args);
176 template <
typename... _Args>
void storeResultsTo(_Args&... args);
178 void dontExpectReply();
182 const std::string& methodName_;
186 bool methodCalled_{};
189 class AsyncMethodInvoker
192 AsyncMethodInvoker(
IProxy& proxy,
const std::string& methodName);
193 AsyncMethodInvoker& onInterface(
const std::string& interfaceName);
194 AsyncMethodInvoker& withTimeout(uint64_t usec);
195 template <
typename _Rep,
typename _Period>
196 AsyncMethodInvoker& withTimeout(
const std::chrono::duration<_Rep, _Period>& timeout);
197 template <
typename... _Args> AsyncMethodInvoker& withArguments(_Args&&... args);
198 template <
typename _Function>
PendingAsyncCall uponReplyInvoke(_Function&& callback);
202 template <
typename... _Args> std::future<future_return_t<_Args...>> getResultAsFuture();
206 const std::string& methodName_;
211 class SignalSubscriber
214 SignalSubscriber(
IProxy& proxy,
const std::string& signalName);
215 SignalSubscriber& onInterface(std::string interfaceName);
216 template <
typename _Function>
void call(_Function&& callback);
220 const std::string& signalName_;
221 std::string interfaceName_;
246 class AsyncPropertyGetter
249 AsyncPropertyGetter(
IProxy& proxy,
const std::string& propertyName);
250 AsyncPropertyGetter& onInterface(
const std::string& interfaceName);
251 template <
typename _Function>
PendingAsyncCall uponReplyInvoke(_Function&& callback);
252 std::future<Variant> getResultAsFuture();
256 const std::string& propertyName_;
257 const std::string* interfaceName_{};
276 class AsyncPropertySetter
279 AsyncPropertySetter(
IProxy& proxy,
const std::string& propertyName);
280 AsyncPropertySetter& onInterface(
const std::string& interfaceName);
281 template <
typename _Value> AsyncPropertySetter& toValue(_Value&& value);
282 AsyncPropertySetter& toValue(
Variant value);
283 template <
typename _Function>
PendingAsyncCall uponReplyInvoke(_Function&& callback);
284 std::future<void> getResultAsFuture();
288 const std::string& propertyName_;
289 const std::string* interfaceName_{};
303 class AsyncAllPropertiesGetter
306 AsyncAllPropertiesGetter(
IProxy& proxy);
307 AsyncAllPropertiesGetter& onInterface(
const std::string& interfaceName);
308 template <
typename _Function>
PendingAsyncCall uponReplyInvoke(_Function&& callback);
309 std::future<std::map<std::string, Variant>> getResultAsFuture();
313 const std::string* interfaceName_{};