dbus-cxx logo
methodproxy.h
Go to the documentation of this file.
1 
2 // -*- c++ -*-
3 /* Do not edit! -- generated file */
4 
5 /***************************************************************************
6  * Copyright (C) 2009,2010 by Rick L. Vinyard, Jr. *
7  * rvinyard@cs.nmsu.edu *
8  * *
9  * This file is part of the dbus-cxx library. *
10  * *
11  * The dbus-cxx library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU General Public License *
13  * version 3 as published by the Free Software Foundation. *
14  * *
15  * The dbus-cxx library is distributed in the hope that it will be *
16  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty *
17  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18  * General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License *
21  * along with this software. If not see <http://www.gnu.org/licenses/>. *
22  ***************************************************************************/
23 #include <dbus-cxx/forward_decls.h>
25 #include <dbus-cxx/utility.h>
26 #include <dbus-cxx/headerlog.h>
27 
28 #ifndef DBUSCXX_METHODPROXY_H
29 #define DBUSCXX_METHODPROXY_H
30 
31 namespace DBus {
32 
33 
40  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
41  class MethodProxy
42  : public MethodProxyBase
43  {
44  public:
45 
46  typedef DBusCxxPointer<MethodProxy> pointer;
47 
48  MethodProxy(const std::string& name):
49  MethodProxyBase(name)
50  { }
51 
52  T_return operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3,T_arg4 _val_4,T_arg5 _val_5,T_arg6 _val_6,T_arg7 _val_7)
53  {
54  DBUSCXX_DEBUG_STDSTR( "dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::operator() method=" << m_name );
55  CallMessage::pointer _callmsg = this->create_call_message();
56  *_callmsg << _val_1 << _val_2 << _val_3 << _val_4 << _val_5 << _val_6 << _val_7;
57  ReturnMessage::const_pointer retmsg = this->call( _callmsg );
58  T_return _retval;
59  retmsg >> _retval;
60  return _retval;
61  }
62 
63  static pointer create(const std::string& name)
64  { return pointer( new MethodProxy(name) ); }
65 
66  };
67 
68 
69 
76  template <class T_return>
77  class MethodProxy <T_return, nil,nil,nil,nil,nil,nil,nil>
78  : public MethodProxyBase
79  {
80  public:
81 
82  typedef DBusCxxPointer<MethodProxy> pointer;
83 
84  MethodProxy(const std::string& name):
85  MethodProxyBase(name)
86  { }
87 
88  T_return operator()()
89  {
90  DBUSCXX_DEBUG_STDSTR( "dbus.MethodProxy", "Method<T_return>::operator() method=" << m_name );
91  CallMessage::pointer _callmsg = this->create_call_message();
92 
93  ReturnMessage::const_pointer retmsg = this->call( _callmsg );
94  T_return _retval;
95  retmsg >> _retval;
96  return _retval;
97  }
98 
99  static pointer create(const std::string& name)
100  { return pointer( new MethodProxy(name) ); }
101 
102  };
103 
104 
111  template <class T_return, class T_arg1>
112  class MethodProxy <T_return, T_arg1, nil,nil,nil,nil,nil,nil>
113  : public MethodProxyBase
114  {
115  public:
116 
117  typedef DBusCxxPointer<MethodProxy> pointer;
118 
119  MethodProxy(const std::string& name):
120  MethodProxyBase(name)
121  { }
122 
123  T_return operator()(T_arg1 _val_1)
124  {
125  DBUSCXX_DEBUG_STDSTR( "dbus.MethodProxy", "Method<T_return, T_arg1>::operator() method=" << m_name );
126  CallMessage::pointer _callmsg = this->create_call_message();
127  *_callmsg << _val_1;
128  ReturnMessage::const_pointer retmsg = this->call( _callmsg );
129  T_return _retval;
130  retmsg >> _retval;
131  return _retval;
132  }
133 
134  static pointer create(const std::string& name)
135  { return pointer( new MethodProxy(name) ); }
136 
137  };
138 
139 
146  template <class T_return, class T_arg1,class T_arg2>
147  class MethodProxy <T_return, T_arg1,T_arg2, nil,nil,nil,nil,nil>
148  : public MethodProxyBase
149  {
150  public:
151 
152  typedef DBusCxxPointer<MethodProxy> pointer;
153 
154  MethodProxy(const std::string& name):
155  MethodProxyBase(name)
156  { }
157 
158  T_return operator()(T_arg1 _val_1,T_arg2 _val_2)
159  {
160  DBUSCXX_DEBUG_STDSTR( "dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2>::operator() method=" << m_name );
161  CallMessage::pointer _callmsg = this->create_call_message();
162  *_callmsg << _val_1 << _val_2;
163  ReturnMessage::const_pointer retmsg = this->call( _callmsg );
164  T_return _retval;
165  retmsg >> _retval;
166  return _retval;
167  }
168 
169  static pointer create(const std::string& name)
170  { return pointer( new MethodProxy(name) ); }
171 
172  };
173 
174 
181  template <class T_return, class T_arg1,class T_arg2,class T_arg3>
182  class MethodProxy <T_return, T_arg1,T_arg2,T_arg3, nil,nil,nil,nil>
183  : public MethodProxyBase
184  {
185  public:
186 
187  typedef DBusCxxPointer<MethodProxy> pointer;
188 
189  MethodProxy(const std::string& name):
190  MethodProxyBase(name)
191  { }
192 
193  T_return operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3)
194  {
195  DBUSCXX_DEBUG_STDSTR( "dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3>::operator() method=" << m_name );
196  CallMessage::pointer _callmsg = this->create_call_message();
197  *_callmsg << _val_1 << _val_2 << _val_3;
198  ReturnMessage::const_pointer retmsg = this->call( _callmsg );
199  T_return _retval;
200  retmsg >> _retval;
201  return _retval;
202  }
203 
204  static pointer create(const std::string& name)
205  { return pointer( new MethodProxy(name) ); }
206 
207  };
208 
209 
216  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
217  class MethodProxy <T_return, T_arg1,T_arg2,T_arg3,T_arg4, nil,nil,nil>
218  : public MethodProxyBase
219  {
220  public:
221 
222  typedef DBusCxxPointer<MethodProxy> pointer;
223 
224  MethodProxy(const std::string& name):
225  MethodProxyBase(name)
226  { }
227 
228  T_return operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3,T_arg4 _val_4)
229  {
230  DBUSCXX_DEBUG_STDSTR( "dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4>::operator() method=" << m_name );
231  CallMessage::pointer _callmsg = this->create_call_message();
232  *_callmsg << _val_1 << _val_2 << _val_3 << _val_4;
233  ReturnMessage::const_pointer retmsg = this->call( _callmsg );
234  T_return _retval;
235  retmsg >> _retval;
236  return _retval;
237  }
238 
239  static pointer create(const std::string& name)
240  { return pointer( new MethodProxy(name) ); }
241 
242  };
243 
244 
251  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
252  class MethodProxy <T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, nil,nil>
253  : public MethodProxyBase
254  {
255  public:
256 
257  typedef DBusCxxPointer<MethodProxy> pointer;
258 
259  MethodProxy(const std::string& name):
260  MethodProxyBase(name)
261  { }
262 
263  T_return operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3,T_arg4 _val_4,T_arg5 _val_5)
264  {
265  DBUSCXX_DEBUG_STDSTR( "dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::operator() method=" << m_name );
266  CallMessage::pointer _callmsg = this->create_call_message();
267  *_callmsg << _val_1 << _val_2 << _val_3 << _val_4 << _val_5;
268  ReturnMessage::const_pointer retmsg = this->call( _callmsg );
269  T_return _retval;
270  retmsg >> _retval;
271  return _retval;
272  }
273 
274  static pointer create(const std::string& name)
275  { return pointer( new MethodProxy(name) ); }
276 
277  };
278 
279 
286  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
287  class MethodProxy <T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, nil>
288  : public MethodProxyBase
289  {
290  public:
291 
292  typedef DBusCxxPointer<MethodProxy> pointer;
293 
294  MethodProxy(const std::string& name):
295  MethodProxyBase(name)
296  { }
297 
298  T_return operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3,T_arg4 _val_4,T_arg5 _val_5,T_arg6 _val_6)
299  {
300  DBUSCXX_DEBUG_STDSTR( "dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::operator() method=" << m_name );
301  CallMessage::pointer _callmsg = this->create_call_message();
302  *_callmsg << _val_1 << _val_2 << _val_3 << _val_4 << _val_5 << _val_6;
303  ReturnMessage::const_pointer retmsg = this->call( _callmsg );
304  T_return _retval;
305  retmsg >> _retval;
306  return _retval;
307  }
308 
309  static pointer create(const std::string& name)
310  { return pointer( new MethodProxy(name) ); }
311 
312  };
313 
314 
317  template <>
318  class MethodProxy <void, nil,nil,nil,nil,nil,nil,nil>
319  : public MethodProxyBase
320  {
321  public:
322 
323  typedef DBusCxxPointer<MethodProxy> pointer;
324 
325  MethodProxy(const std::string& name):
326  MethodProxyBase(name)
327  { }
328 
329  void operator()()
330  {
331  DBUSCXX_DEBUG_STDSTR("dbus.MethodProxy", "Method<T_return>::operator() method=" << m_name );
332  CallMessage::pointer _callmsg = this->create_call_message();
333  *_callmsg ;
334  _callmsg->set_no_reply();
335  this->call( _callmsg );
336  }
337 
338  static pointer create(const std::string& name)
339  { return pointer( new MethodProxy(name) ); }
340 
341  };
342 
345  template <class T_arg1>
346  class MethodProxy <void, T_arg1, nil,nil,nil,nil,nil,nil>
347  : public MethodProxyBase
348  {
349  public:
350 
351  typedef DBusCxxPointer<MethodProxy> pointer;
352 
353  MethodProxy(const std::string& name):
354  MethodProxyBase(name)
355  { }
356 
357  void operator()(T_arg1 _val_1)
358  {
359  DBUSCXX_DEBUG_STDSTR("dbus.MethodProxy", "Method<T_return, T_arg1>::operator() method=" << m_name );
360  CallMessage::pointer _callmsg = this->create_call_message();
361  *_callmsg << _val_1;
362  _callmsg->set_no_reply();
363  this->call( _callmsg );
364  }
365 
366  static pointer create(const std::string& name)
367  { return pointer( new MethodProxy(name) ); }
368 
369  };
370 
373  template <class T_arg1,class T_arg2>
374  class MethodProxy <void, T_arg1,T_arg2, nil,nil,nil,nil,nil>
375  : public MethodProxyBase
376  {
377  public:
378 
379  typedef DBusCxxPointer<MethodProxy> pointer;
380 
381  MethodProxy(const std::string& name):
382  MethodProxyBase(name)
383  { }
384 
385  void operator()(T_arg1 _val_1,T_arg2 _val_2)
386  {
387  DBUSCXX_DEBUG_STDSTR("dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2>::operator() method=" << m_name );
388  CallMessage::pointer _callmsg = this->create_call_message();
389  *_callmsg << _val_1 << _val_2;
390  _callmsg->set_no_reply();
391  this->call( _callmsg );
392  }
393 
394  static pointer create(const std::string& name)
395  { return pointer( new MethodProxy(name) ); }
396 
397  };
398 
401  template <class T_arg1,class T_arg2,class T_arg3>
402  class MethodProxy <void, T_arg1,T_arg2,T_arg3, nil,nil,nil,nil>
403  : public MethodProxyBase
404  {
405  public:
406 
407  typedef DBusCxxPointer<MethodProxy> pointer;
408 
409  MethodProxy(const std::string& name):
410  MethodProxyBase(name)
411  { }
412 
413  void operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3)
414  {
415  DBUSCXX_DEBUG_STDSTR("dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3>::operator() method=" << m_name );
416  CallMessage::pointer _callmsg = this->create_call_message();
417  *_callmsg << _val_1 << _val_2 << _val_3;
418  _callmsg->set_no_reply();
419  this->call( _callmsg );
420  }
421 
422  static pointer create(const std::string& name)
423  { return pointer( new MethodProxy(name) ); }
424 
425  };
426 
429  template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
430  class MethodProxy <void, T_arg1,T_arg2,T_arg3,T_arg4, nil,nil,nil>
431  : public MethodProxyBase
432  {
433  public:
434 
435  typedef DBusCxxPointer<MethodProxy> pointer;
436 
437  MethodProxy(const std::string& name):
438  MethodProxyBase(name)
439  { }
440 
441  void operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3,T_arg4 _val_4)
442  {
443  DBUSCXX_DEBUG_STDSTR("dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4>::operator() method=" << m_name );
444  CallMessage::pointer _callmsg = this->create_call_message();
445  *_callmsg << _val_1 << _val_2 << _val_3 << _val_4;
446  _callmsg->set_no_reply();
447  this->call( _callmsg );
448  }
449 
450  static pointer create(const std::string& name)
451  { return pointer( new MethodProxy(name) ); }
452 
453  };
454 
457  template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
458  class MethodProxy <void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, nil,nil>
459  : public MethodProxyBase
460  {
461  public:
462 
463  typedef DBusCxxPointer<MethodProxy> pointer;
464 
465  MethodProxy(const std::string& name):
466  MethodProxyBase(name)
467  { }
468 
469  void operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3,T_arg4 _val_4,T_arg5 _val_5)
470  {
471  DBUSCXX_DEBUG_STDSTR("dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::operator() method=" << m_name );
472  CallMessage::pointer _callmsg = this->create_call_message();
473  *_callmsg << _val_1 << _val_2 << _val_3 << _val_4 << _val_5;
474  _callmsg->set_no_reply();
475  this->call( _callmsg );
476  }
477 
478  static pointer create(const std::string& name)
479  { return pointer( new MethodProxy(name) ); }
480 
481  };
482 
485  template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
486  class MethodProxy <void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, nil>
487  : public MethodProxyBase
488  {
489  public:
490 
491  typedef DBusCxxPointer<MethodProxy> pointer;
492 
493  MethodProxy(const std::string& name):
494  MethodProxyBase(name)
495  { }
496 
497  void operator()(T_arg1 _val_1,T_arg2 _val_2,T_arg3 _val_3,T_arg4 _val_4,T_arg5 _val_5,T_arg6 _val_6)
498  {
499  DBUSCXX_DEBUG_STDSTR("dbus.MethodProxy", "Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::operator() method=" << m_name );
500  CallMessage::pointer _callmsg = this->create_call_message();
501  *_callmsg << _val_1 << _val_2 << _val_3 << _val_4 << _val_5 << _val_6;
502  _callmsg->set_no_reply();
503  this->call( _callmsg );
504  }
505 
506  static pointer create(const std::string& name)
507  { return pointer( new MethodProxy(name) ); }
508 
509  };
510 
511 
512 
513 }
514 
515 #endif
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:463
MethodProxy(const std::string &name)
Definition: methodproxy.h:437
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:292
static pointer create(const std::string &name)
Definition: methodproxy.h:274
CallMessage::pointer create_call_message() const
Definition: methodproxybase.cpp:70
DBusCxxPointer< CallMessage > pointer
Definition: callmessage.h:57
MethodProxy(const std::string &name)
Definition: methodproxy.h:294
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:82
MethodProxy(const std::string &name)
Definition: methodproxy.h:119
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:222
sigc::nil nil
Definition: types.h:36
static pointer create(const std::string &name)
Definition: methodproxy.h:506
MethodProxy(const std::string &name)
Definition: methodproxy.h:224
Definition: accumulators.h:24
static pointer create(const std::string &name)
Definition: methodproxy.h:478
#define DBUSCXX_DEBUG_STDSTR(logger, message)
Definition: headerlog.h:38
static pointer create(const std::string &name)
Definition: methodproxy.h:99
void operator()(T_arg1 _val_1)
Definition: methodproxy.h:357
ReturnMessage::const_pointer call(CallMessage::const_pointer, int timeout_milliseconds=-1) const
Definition: methodproxybase.cpp:78
MethodProxy(const std::string &name)
Definition: methodproxy.h:325
MethodProxy(const std::string &name)
Definition: methodproxy.h:381
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:257
T_return operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3, T_arg4 _val_4, T_arg5 _val_5, T_arg6 _val_6)
Definition: methodproxy.h:298
static pointer create(const std::string &name)
Definition: methodproxy.h:204
void operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3, T_arg4 _val_4, T_arg5 _val_5)
Definition: methodproxy.h:469
void operator()(T_arg1 _val_1, T_arg2 _val_2)
Definition: methodproxy.h:385
T_return operator()(T_arg1 _val_1, T_arg2 _val_2)
Definition: methodproxy.h:158
std::string m_name
Definition: methodproxybase.h:85
MethodProxy(const std::string &name)
Definition: methodproxy.h:48
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:351
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:152
static pointer create(const std::string &name)
Definition: methodproxy.h:422
T_return operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3, T_arg4 _val_4, T_arg5 _val_5, T_arg6 _val_6, T_arg7 _val_7)
Definition: methodproxy.h:52
static pointer create(const std::string &name)
Definition: methodproxy.h:450
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:435
static pointer create(const std::string &name)
Definition: methodproxy.h:338
void operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3)
Definition: methodproxy.h:413
T_return operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3)
Definition: methodproxy.h:193
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:117
MethodProxy(const std::string &name)
Definition: methodproxy.h:154
static pointer create(const std::string &name)
Definition: methodproxy.h:63
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:491
T_return operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3, T_arg4 _val_4, T_arg5 _val_5)
Definition: methodproxy.h:263
T_return operator()(T_arg1 _val_1)
Definition: methodproxy.h:123
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:46
MethodProxy(const std::string &name)
Definition: methodproxy.h:409
Definition: methodproxybase.h:46
void operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3, T_arg4 _val_4, T_arg5 _val_5, T_arg6 _val_6)
Definition: methodproxy.h:497
MethodProxy(const std::string &name)
Definition: methodproxy.h:465
const std::string & name() const
Definition: methodproxybase.cpp:56
MethodProxy(const std::string &name)
Definition: methodproxy.h:259
Definition: forward_decls.h:56
void operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3, T_arg4 _val_4)
Definition: methodproxy.h:441
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:407
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:187
static pointer create(const std::string &name)
Definition: methodproxy.h:394
T_return operator()(T_arg1 _val_1, T_arg2 _val_2, T_arg3 _val_3, T_arg4 _val_4)
Definition: methodproxy.h:228
static pointer create(const std::string &name)
Definition: methodproxy.h:309
MethodProxy(const std::string &name)
Definition: methodproxy.h:189
static pointer create(const std::string &name)
Definition: methodproxy.h:134
MethodProxy(const std::string &name)
Definition: methodproxy.h:84
DBusCxxPointer< const ReturnMessage > const_pointer
Definition: returnmessage.h:54
MethodProxy(const std::string &name)
Definition: methodproxy.h:353
MethodProxy(const std::string &name)
Definition: methodproxy.h:493
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:379
static pointer create(const std::string &name)
Definition: methodproxy.h:366
static pointer create(const std::string &name)
Definition: methodproxy.h:239
DBusCxxPointer< MethodProxy > pointer
Definition: methodproxy.h:323
static pointer create(const std::string &name)
Definition: methodproxy.h:169

Generated on Sun Mar 19 2017 14:54:27 for dbus-cxx by doxygen 1.8.8