Lines Matching refs:Args
16 // void callback(Args...);
19 // void handler(Args...);
20 // ReturnType handler(Args...);
21 // bool handler(ErrorPtr* error, Args...);
22 // void handler(std::unique_ptr<DBusMethodResponse<T1, T2,...>>, Args...);
63 // |Args...| which can contain both inputs (passed in by value or constant
69 // R(Args...)
70 template<typename R, typename... Args>
77 const base::Callback<R(Args...)>& handler) : handler_(handler) {}
82 auto invoke_callback = [this, &method_response](const Args&... args) {
83 method_response.Return(handler_.Run(args...));
89 if (!DBusParamReader<false, Args...>::Invoke(
98 base::Callback<R(Args...)> handler_;
104 template<typename... Args>
105 class SimpleDBusInterfaceMethodHandler<void, Args...>
111 const base::Callback<void(Args...)>& handler) : handler_(handler) {}
116 auto invoke_callback = [this, &method_response](const Args&... args) {
117 handler_.Run(args...);
120 DBusParamWriter::AppendDBusOutParams(&writer, args...);
126 if (!DBusParamReader<true, Args...>::Invoke(
135 base::Callback<void(Args...)> handler_;
143 // |Args...| which can contain both inputs (passed in by value or constant
148 // bool(ErrorPtr*, Args...)
149 template<typename... Args>
156 const base::Callback<bool(ErrorPtr*, Args...)>& handler)
162 auto invoke_callback = [this, &method_response](const Args&... args) {
164 if (!handler_.Run(&error, args...)) {
169 DBusParamWriter::AppendDBusOutParams(&writer, args...);
176 if (!DBusParamReader<true, Args...>::Invoke(
185 base::Callback<bool(ErrorPtr*, Args...)> handler_;
194 // |Args...| which can contain both inputs (passed in by value or constant
199 // bool(ErrorPtr*, dbus::Message*, Args...)
200 template<typename... Args>
207 const base::Callback<bool(ErrorPtr*, dbus::Message*, Args...)>& handler)
214 [this, method_call, &method_response](const Args&... args) {
216 if (!handler_.Run(&error, method_call, args...)) {
221 DBusParamWriter::AppendDBusOutParams(&writer, args...);
228 if (!DBusParamReader<true, Args...>::Invoke(
237 base::Callback<bool(ErrorPtr*, dbus::Message*, Args...)> handler_;
243 // to take an arbitrary number of input arguments of type |Args...| and send
247 // void(std::unique_ptr<DBusMethodResponse<RetTypes...>, Args...)
248 template<typename Response, typename... Args>
254 const base::Callback<void(std::unique_ptr<Response>, Args...)>& handler)
262 auto invoke_callback = [this, method_call, &sender](const Args&... args) {
264 handler_.Run(std::move(response), args...);
269 if (!DBusParamReader<false, Args...>::Invoke(
279 base::Callback<void(std::unique_ptr<Response>, Args...)> handler_;
288 // type |Args...| and send the method call response (including a possible error
292 // Args...);
293 template<typename Response, typename... Args>
301 Args...)>& handler)
309 auto invoke_callback = [this, method_call, &sender](const Args&... args) {
311 handler_.Run(std::move(response), method_call, args...);
316 if (!DBusParamReader<false, Args...>::Invoke(
327 dbus::Message*, Args...)> handler_;