Free memory with dbus_free instead of free. Account for NULL signatures.
[dbus-cxx-async.git] / include / dbus-c++ / dbus-proxy.h
blob405a62462a75311fb70ec9ec9c9651809ec578bd
2 /*
3 * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!
4 */
6 #ifndef DBUSXXX____INCLUDE_DBUS_C___DBUS_PROXY_PROXY_MARSHAL_H
7 #define DBUSXXX____INCLUDE_DBUS_C___DBUS_PROXY_PROXY_MARSHAL_H
9 #include <dbus-c++/dbus.h>
10 #include <memory>
12 namespace org {
13 namespace freedesktop {
15 class DBus_proxy
16 : virtual public ::DBus::CallbackTarget, public ::DBus::InterfaceProxy
18 public:
20 DBus_proxy()
21 : ::DBus::CallbackTarget()
22 , ::DBus::InterfaceProxy("org.freedesktop.DBus") {
23 connect_signal(DBus_proxy, NameOwnerChanged, _NameOwnerChanged_stub);
24 connect_signal(DBus_proxy, NameLost, _NameLost_stub);
25 connect_signal(DBus_proxy, NameAcquired, _NameAcquired_stub);
28 // Context of the response to a received pending call
29 class CallContext : public ::DBus::CallInfo
31 public:
33 DBus_proxy &iface;
34 void *data;
36 CallContext(DBus_proxy &ifc, ::DBus::PendingCall &call, void *ptr)
37 : ::DBus::CallInfo(ifc.object().conn(), call), iface(ifc), data(ptr) {}
39 private:
41 // Not implemented to prevent copy-construction
42 CallContext(const CallContext &);
45 private:
47 // Class member function binding for "RequestName"
48 template < class Delegate >
49 struct _RequestName_memBind {
50 typedef void (Delegate::*Method)(
51 const uint32_t &,
52 CallContext&);
54 Delegate* delegate;
55 Method method;
56 void* data;
57 _RequestName_memBind(Delegate* del, Method meth, void* ptr)
58 : delegate(del), method(meth), data(ptr) {}
62 // Stub for "RequestName" member function callback
63 template < class Delegate >
64 void _RequestName_memStub(::DBus::PendingCall &call) {
65 _RequestName_memBind<Delegate>* bind = static_cast<_RequestName_memBind<Delegate>*>(call.data());
66 CallContext ret(*this, call, bind->data);
67 uint32_t argout0;
68 if (!ret.error()) {
69 ::DBus::MessageIter ri = ret.msg().reader();
70 ri >> argout0; }
71 (bind->delegate->*bind->method)(argout0, ret);
72 delete bind;
75 public:
77 // "RequestName" asynchronous call with member function callback
78 template < class Delegate >
79 ::DBus::PendingCall RequestName_async(
80 const std::string& argin0,
81 const uint32_t& argin1,
82 Delegate* delegate,
83 typename _RequestName_memBind<Delegate>::Method method,
84 void* data,
85 int timeout = -1) {
86 ::DBus::CallMessage call;
87 ::DBus::MessageIter wi = call.writer();
88 wi << argin0;
89 wi << argin1;
90 call.member("RequestName");
91 ::DBus::PendingCallSlot slot;
92 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
93 this, &DBus_proxy::_RequestName_memStub<Delegate>);
94 std::auto_ptr<_RequestName_memBind<Delegate> > binding(new _RequestName_memBind<Delegate>(delegate, method, data));
95 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
96 binding.release();
97 return async;
100 uint32_t RequestName(const std::string& argin0, const uint32_t& argin1, int timeout = -1) {
101 ::DBus::CallMessage call;
102 ::DBus::MessageIter wi = call.writer();
103 wi << argin0;
104 wi << argin1;
105 call.member("RequestName");
106 ::DBus::Message ret = invoke_method(call, timeout);
107 ::DBus::MessageIter ri = ret.reader();
108 uint32_t argout;
109 ri >> argout;
110 return argout;
113 private:
115 // Class member function binding for "ReleaseName"
116 template < class Delegate >
117 struct _ReleaseName_memBind {
118 typedef void (Delegate::*Method)(
119 const uint32_t &,
120 CallContext&);
122 Delegate* delegate;
123 Method method;
124 void* data;
125 _ReleaseName_memBind(Delegate* del, Method meth, void* ptr)
126 : delegate(del), method(meth), data(ptr) {}
130 // Stub for "ReleaseName" member function callback
131 template < class Delegate >
132 void _ReleaseName_memStub(::DBus::PendingCall &call) {
133 _ReleaseName_memBind<Delegate>* bind = static_cast<_ReleaseName_memBind<Delegate>*>(call.data());
134 CallContext ret(*this, call, bind->data);
135 uint32_t argout0;
136 if (!ret.error()) {
137 ::DBus::MessageIter ri = ret.msg().reader();
138 ri >> argout0; }
139 (bind->delegate->*bind->method)(argout0, ret);
140 delete bind;
143 public:
145 // "ReleaseName" asynchronous call with member function callback
146 template < class Delegate >
147 ::DBus::PendingCall ReleaseName_async(
148 const std::string& argin0,
149 Delegate* delegate,
150 typename _ReleaseName_memBind<Delegate>::Method method,
151 void* data,
152 int timeout = -1) {
153 ::DBus::CallMessage call;
154 ::DBus::MessageIter wi = call.writer();
155 wi << argin0;
156 call.member("ReleaseName");
157 ::DBus::PendingCallSlot slot;
158 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
159 this, &DBus_proxy::_ReleaseName_memStub<Delegate>);
160 std::auto_ptr<_ReleaseName_memBind<Delegate> > binding(new _ReleaseName_memBind<Delegate>(delegate, method, data));
161 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
162 binding.release();
163 return async;
166 uint32_t ReleaseName(const std::string& argin0, int timeout = -1) {
167 ::DBus::CallMessage call;
168 ::DBus::MessageIter wi = call.writer();
169 wi << argin0;
170 call.member("ReleaseName");
171 ::DBus::Message ret = invoke_method(call, timeout);
172 ::DBus::MessageIter ri = ret.reader();
173 uint32_t argout;
174 ri >> argout;
175 return argout;
178 private:
180 // Class member function binding for "StartServiceByName"
181 template < class Delegate >
182 struct _StartServiceByName_memBind {
183 typedef void (Delegate::*Method)(
184 const uint32_t &,
185 CallContext&);
187 Delegate* delegate;
188 Method method;
189 void* data;
190 _StartServiceByName_memBind(Delegate* del, Method meth, void* ptr)
191 : delegate(del), method(meth), data(ptr) {}
195 // Stub for "StartServiceByName" member function callback
196 template < class Delegate >
197 void _StartServiceByName_memStub(::DBus::PendingCall &call) {
198 _StartServiceByName_memBind<Delegate>* bind = static_cast<_StartServiceByName_memBind<Delegate>*>(call.data());
199 CallContext ret(*this, call, bind->data);
200 uint32_t argout0;
201 if (!ret.error()) {
202 ::DBus::MessageIter ri = ret.msg().reader();
203 ri >> argout0; }
204 (bind->delegate->*bind->method)(argout0, ret);
205 delete bind;
208 public:
210 // "StartServiceByName" asynchronous call with member function callback
211 template < class Delegate >
212 ::DBus::PendingCall StartServiceByName_async(
213 const std::string& argin0,
214 const uint32_t& argin1,
215 Delegate* delegate,
216 typename _StartServiceByName_memBind<Delegate>::Method method,
217 void* data,
218 int timeout = -1) {
219 ::DBus::CallMessage call;
220 ::DBus::MessageIter wi = call.writer();
221 wi << argin0;
222 wi << argin1;
223 call.member("StartServiceByName");
224 ::DBus::PendingCallSlot slot;
225 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
226 this, &DBus_proxy::_StartServiceByName_memStub<Delegate>);
227 std::auto_ptr<_StartServiceByName_memBind<Delegate> > binding(new _StartServiceByName_memBind<Delegate>(delegate, method, data));
228 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
229 binding.release();
230 return async;
233 uint32_t StartServiceByName(const std::string& argin0, const uint32_t& argin1, int timeout = -1) {
234 ::DBus::CallMessage call;
235 ::DBus::MessageIter wi = call.writer();
236 wi << argin0;
237 wi << argin1;
238 call.member("StartServiceByName");
239 ::DBus::Message ret = invoke_method(call, timeout);
240 ::DBus::MessageIter ri = ret.reader();
241 uint32_t argout;
242 ri >> argout;
243 return argout;
246 private:
248 // Class member function binding for "Hello"
249 template < class Delegate >
250 struct _Hello_memBind {
251 typedef void (Delegate::*Method)(
252 const std::string &,
253 CallContext&);
255 Delegate* delegate;
256 Method method;
257 void* data;
258 _Hello_memBind(Delegate* del, Method meth, void* ptr)
259 : delegate(del), method(meth), data(ptr) {}
263 // Stub for "Hello" member function callback
264 template < class Delegate >
265 void _Hello_memStub(::DBus::PendingCall &call) {
266 _Hello_memBind<Delegate>* bind = static_cast<_Hello_memBind<Delegate>*>(call.data());
267 CallContext ret(*this, call, bind->data);
268 std::string argout0;
269 if (!ret.error()) {
270 ::DBus::MessageIter ri = ret.msg().reader();
271 ri >> argout0; }
272 (bind->delegate->*bind->method)(argout0, ret);
273 delete bind;
276 public:
278 // "Hello" asynchronous call with member function callback
279 template < class Delegate >
280 ::DBus::PendingCall Hello_async(
281 Delegate* delegate,
282 typename _Hello_memBind<Delegate>::Method method,
283 void* data,
284 int timeout = -1) {
285 ::DBus::CallMessage call;
286 ::DBus::MessageIter wi = call.writer();
287 call.member("Hello");
288 ::DBus::PendingCallSlot slot;
289 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
290 this, &DBus_proxy::_Hello_memStub<Delegate>);
291 std::auto_ptr<_Hello_memBind<Delegate> > binding(new _Hello_memBind<Delegate>(delegate, method, data));
292 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
293 binding.release();
294 return async;
297 std::string Hello(int timeout = -1) {
298 ::DBus::CallMessage call;
299 call.member("Hello");
300 ::DBus::Message ret = invoke_method(call, timeout);
301 ::DBus::MessageIter ri = ret.reader();
302 std::string argout;
303 ri >> argout;
304 return argout;
307 private:
309 // Class member function binding for "NameHasOwner"
310 template < class Delegate >
311 struct _NameHasOwner_memBind {
312 typedef void (Delegate::*Method)(
313 const bool &,
314 CallContext&);
316 Delegate* delegate;
317 Method method;
318 void* data;
319 _NameHasOwner_memBind(Delegate* del, Method meth, void* ptr)
320 : delegate(del), method(meth), data(ptr) {}
324 // Stub for "NameHasOwner" member function callback
325 template < class Delegate >
326 void _NameHasOwner_memStub(::DBus::PendingCall &call) {
327 _NameHasOwner_memBind<Delegate>* bind = static_cast<_NameHasOwner_memBind<Delegate>*>(call.data());
328 CallContext ret(*this, call, bind->data);
329 bool argout0;
330 if (!ret.error()) {
331 ::DBus::MessageIter ri = ret.msg().reader();
332 ri >> argout0; }
333 (bind->delegate->*bind->method)(argout0, ret);
334 delete bind;
337 public:
339 // "NameHasOwner" asynchronous call with member function callback
340 template < class Delegate >
341 ::DBus::PendingCall NameHasOwner_async(
342 const std::string& argin0,
343 Delegate* delegate,
344 typename _NameHasOwner_memBind<Delegate>::Method method,
345 void* data,
346 int timeout = -1) {
347 ::DBus::CallMessage call;
348 ::DBus::MessageIter wi = call.writer();
349 wi << argin0;
350 call.member("NameHasOwner");
351 ::DBus::PendingCallSlot slot;
352 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
353 this, &DBus_proxy::_NameHasOwner_memStub<Delegate>);
354 std::auto_ptr<_NameHasOwner_memBind<Delegate> > binding(new _NameHasOwner_memBind<Delegate>(delegate, method, data));
355 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
356 binding.release();
357 return async;
360 bool NameHasOwner(const std::string& argin0, int timeout = -1) {
361 ::DBus::CallMessage call;
362 ::DBus::MessageIter wi = call.writer();
363 wi << argin0;
364 call.member("NameHasOwner");
365 ::DBus::Message ret = invoke_method(call, timeout);
366 ::DBus::MessageIter ri = ret.reader();
367 bool argout;
368 ri >> argout;
369 return argout;
372 private:
374 // Class member function binding for "ListNames"
375 template < class Delegate >
376 struct _ListNames_memBind {
377 typedef void (Delegate::*Method)(
378 const std::vector< std::string > &,
379 CallContext&);
381 Delegate* delegate;
382 Method method;
383 void* data;
384 _ListNames_memBind(Delegate* del, Method meth, void* ptr)
385 : delegate(del), method(meth), data(ptr) {}
389 // Stub for "ListNames" member function callback
390 template < class Delegate >
391 void _ListNames_memStub(::DBus::PendingCall &call) {
392 _ListNames_memBind<Delegate>* bind = static_cast<_ListNames_memBind<Delegate>*>(call.data());
393 CallContext ret(*this, call, bind->data);
394 std::vector< std::string > argout0;
395 if (!ret.error()) {
396 ::DBus::MessageIter ri = ret.msg().reader();
397 ri >> argout0; }
398 (bind->delegate->*bind->method)(argout0, ret);
399 delete bind;
402 public:
404 // "ListNames" asynchronous call with member function callback
405 template < class Delegate >
406 ::DBus::PendingCall ListNames_async(
407 Delegate* delegate,
408 typename _ListNames_memBind<Delegate>::Method method,
409 void* data,
410 int timeout = -1) {
411 ::DBus::CallMessage call;
412 ::DBus::MessageIter wi = call.writer();
413 call.member("ListNames");
414 ::DBus::PendingCallSlot slot;
415 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
416 this, &DBus_proxy::_ListNames_memStub<Delegate>);
417 std::auto_ptr<_ListNames_memBind<Delegate> > binding(new _ListNames_memBind<Delegate>(delegate, method, data));
418 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
419 binding.release();
420 return async;
423 std::vector< std::string > ListNames(int timeout = -1) {
424 ::DBus::CallMessage call;
425 call.member("ListNames");
426 ::DBus::Message ret = invoke_method(call, timeout);
427 ::DBus::MessageIter ri = ret.reader();
428 std::vector< std::string > argout;
429 ri >> argout;
430 return argout;
433 private:
435 // Class member function binding for "AddMatch"
436 template < class Delegate >
437 struct _AddMatch_memBind {
438 typedef void (Delegate::*Method)(
439 CallContext&);
441 Delegate* delegate;
442 Method method;
443 void* data;
444 _AddMatch_memBind(Delegate* del, Method meth, void* ptr)
445 : delegate(del), method(meth), data(ptr) {}
449 // Stub for "AddMatch" member function callback
450 template < class Delegate >
451 void _AddMatch_memStub(::DBus::PendingCall &call) {
452 _AddMatch_memBind<Delegate>* bind = static_cast<_AddMatch_memBind<Delegate>*>(call.data());
453 CallContext ret(*this, call, bind->data);
454 if (!ret.error()) {
455 ::DBus::MessageIter ri = ret.msg().reader(); }
456 (bind->delegate->*bind->method)(ret);
457 delete bind;
460 public:
462 // "AddMatch" asynchronous call with member function callback
463 template < class Delegate >
464 ::DBus::PendingCall AddMatch_async(
465 const std::string& argin0,
466 Delegate* delegate,
467 typename _AddMatch_memBind<Delegate>::Method method,
468 void* data,
469 int timeout = -1) {
470 ::DBus::CallMessage call;
471 ::DBus::MessageIter wi = call.writer();
472 wi << argin0;
473 call.member("AddMatch");
474 ::DBus::PendingCallSlot slot;
475 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
476 this, &DBus_proxy::_AddMatch_memStub<Delegate>);
477 std::auto_ptr<_AddMatch_memBind<Delegate> > binding(new _AddMatch_memBind<Delegate>(delegate, method, data));
478 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
479 binding.release();
480 return async;
483 void AddMatch(const std::string& argin0, int timeout = -1) {
484 ::DBus::CallMessage call;
485 ::DBus::MessageIter wi = call.writer();
486 wi << argin0;
487 call.member("AddMatch");
488 ::DBus::Message ret = invoke_method(call, timeout);
491 private:
493 // Class member function binding for "RemoveMatch"
494 template < class Delegate >
495 struct _RemoveMatch_memBind {
496 typedef void (Delegate::*Method)(
497 CallContext&);
499 Delegate* delegate;
500 Method method;
501 void* data;
502 _RemoveMatch_memBind(Delegate* del, Method meth, void* ptr)
503 : delegate(del), method(meth), data(ptr) {}
507 // Stub for "RemoveMatch" member function callback
508 template < class Delegate >
509 void _RemoveMatch_memStub(::DBus::PendingCall &call) {
510 _RemoveMatch_memBind<Delegate>* bind = static_cast<_RemoveMatch_memBind<Delegate>*>(call.data());
511 CallContext ret(*this, call, bind->data);
512 if (!ret.error()) {
513 ::DBus::MessageIter ri = ret.msg().reader(); }
514 (bind->delegate->*bind->method)(ret);
515 delete bind;
518 public:
520 // "RemoveMatch" asynchronous call with member function callback
521 template < class Delegate >
522 ::DBus::PendingCall RemoveMatch_async(
523 const std::string& argin0,
524 Delegate* delegate,
525 typename _RemoveMatch_memBind<Delegate>::Method method,
526 void* data,
527 int timeout = -1) {
528 ::DBus::CallMessage call;
529 ::DBus::MessageIter wi = call.writer();
530 wi << argin0;
531 call.member("RemoveMatch");
532 ::DBus::PendingCallSlot slot;
533 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
534 this, &DBus_proxy::_RemoveMatch_memStub<Delegate>);
535 std::auto_ptr<_RemoveMatch_memBind<Delegate> > binding(new _RemoveMatch_memBind<Delegate>(delegate, method, data));
536 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
537 binding.release();
538 return async;
541 void RemoveMatch(const std::string& argin0, int timeout = -1) {
542 ::DBus::CallMessage call;
543 ::DBus::MessageIter wi = call.writer();
544 wi << argin0;
545 call.member("RemoveMatch");
546 ::DBus::Message ret = invoke_method(call, timeout);
549 private:
551 // Class member function binding for "GetNameOwner"
552 template < class Delegate >
553 struct _GetNameOwner_memBind {
554 typedef void (Delegate::*Method)(
555 const std::string &,
556 CallContext&);
558 Delegate* delegate;
559 Method method;
560 void* data;
561 _GetNameOwner_memBind(Delegate* del, Method meth, void* ptr)
562 : delegate(del), method(meth), data(ptr) {}
566 // Stub for "GetNameOwner" member function callback
567 template < class Delegate >
568 void _GetNameOwner_memStub(::DBus::PendingCall &call) {
569 _GetNameOwner_memBind<Delegate>* bind = static_cast<_GetNameOwner_memBind<Delegate>*>(call.data());
570 CallContext ret(*this, call, bind->data);
571 std::string argout0;
572 if (!ret.error()) {
573 ::DBus::MessageIter ri = ret.msg().reader();
574 ri >> argout0; }
575 (bind->delegate->*bind->method)(argout0, ret);
576 delete bind;
579 public:
581 // "GetNameOwner" asynchronous call with member function callback
582 template < class Delegate >
583 ::DBus::PendingCall GetNameOwner_async(
584 const std::string& argin0,
585 Delegate* delegate,
586 typename _GetNameOwner_memBind<Delegate>::Method method,
587 void* data,
588 int timeout = -1) {
589 ::DBus::CallMessage call;
590 ::DBus::MessageIter wi = call.writer();
591 wi << argin0;
592 call.member("GetNameOwner");
593 ::DBus::PendingCallSlot slot;
594 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
595 this, &DBus_proxy::_GetNameOwner_memStub<Delegate>);
596 std::auto_ptr<_GetNameOwner_memBind<Delegate> > binding(new _GetNameOwner_memBind<Delegate>(delegate, method, data));
597 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
598 binding.release();
599 return async;
602 std::string GetNameOwner(const std::string& argin0, int timeout = -1) {
603 ::DBus::CallMessage call;
604 ::DBus::MessageIter wi = call.writer();
605 wi << argin0;
606 call.member("GetNameOwner");
607 ::DBus::Message ret = invoke_method(call, timeout);
608 ::DBus::MessageIter ri = ret.reader();
609 std::string argout;
610 ri >> argout;
611 return argout;
614 private:
616 // Class member function binding for "ListQueuedOwners"
617 template < class Delegate >
618 struct _ListQueuedOwners_memBind {
619 typedef void (Delegate::*Method)(
620 const std::vector< std::string > &,
621 CallContext&);
623 Delegate* delegate;
624 Method method;
625 void* data;
626 _ListQueuedOwners_memBind(Delegate* del, Method meth, void* ptr)
627 : delegate(del), method(meth), data(ptr) {}
631 // Stub for "ListQueuedOwners" member function callback
632 template < class Delegate >
633 void _ListQueuedOwners_memStub(::DBus::PendingCall &call) {
634 _ListQueuedOwners_memBind<Delegate>* bind = static_cast<_ListQueuedOwners_memBind<Delegate>*>(call.data());
635 CallContext ret(*this, call, bind->data);
636 std::vector< std::string > argout0;
637 if (!ret.error()) {
638 ::DBus::MessageIter ri = ret.msg().reader();
639 ri >> argout0; }
640 (bind->delegate->*bind->method)(argout0, ret);
641 delete bind;
644 public:
646 // "ListQueuedOwners" asynchronous call with member function callback
647 template < class Delegate >
648 ::DBus::PendingCall ListQueuedOwners_async(
649 const std::string& argin0,
650 Delegate* delegate,
651 typename _ListQueuedOwners_memBind<Delegate>::Method method,
652 void* data,
653 int timeout = -1) {
654 ::DBus::CallMessage call;
655 ::DBus::MessageIter wi = call.writer();
656 wi << argin0;
657 call.member("ListQueuedOwners");
658 ::DBus::PendingCallSlot slot;
659 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
660 this, &DBus_proxy::_ListQueuedOwners_memStub<Delegate>);
661 std::auto_ptr<_ListQueuedOwners_memBind<Delegate> > binding(new _ListQueuedOwners_memBind<Delegate>(delegate, method, data));
662 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
663 binding.release();
664 return async;
667 std::vector< std::string > ListQueuedOwners(const std::string& argin0, int timeout = -1) {
668 ::DBus::CallMessage call;
669 ::DBus::MessageIter wi = call.writer();
670 wi << argin0;
671 call.member("ListQueuedOwners");
672 ::DBus::Message ret = invoke_method(call, timeout);
673 ::DBus::MessageIter ri = ret.reader();
674 std::vector< std::string > argout;
675 ri >> argout;
676 return argout;
679 private:
681 // Class member function binding for "GetConnectionUnixUser"
682 template < class Delegate >
683 struct _GetConnectionUnixUser_memBind {
684 typedef void (Delegate::*Method)(
685 const uint32_t &,
686 CallContext&);
688 Delegate* delegate;
689 Method method;
690 void* data;
691 _GetConnectionUnixUser_memBind(Delegate* del, Method meth, void* ptr)
692 : delegate(del), method(meth), data(ptr) {}
696 // Stub for "GetConnectionUnixUser" member function callback
697 template < class Delegate >
698 void _GetConnectionUnixUser_memStub(::DBus::PendingCall &call) {
699 _GetConnectionUnixUser_memBind<Delegate>* bind = static_cast<_GetConnectionUnixUser_memBind<Delegate>*>(call.data());
700 CallContext ret(*this, call, bind->data);
701 uint32_t argout0;
702 if (!ret.error()) {
703 ::DBus::MessageIter ri = ret.msg().reader();
704 ri >> argout0; }
705 (bind->delegate->*bind->method)(argout0, ret);
706 delete bind;
709 public:
711 // "GetConnectionUnixUser" asynchronous call with member function callback
712 template < class Delegate >
713 ::DBus::PendingCall GetConnectionUnixUser_async(
714 const std::string& argin0,
715 Delegate* delegate,
716 typename _GetConnectionUnixUser_memBind<Delegate>::Method method,
717 void* data,
718 int timeout = -1) {
719 ::DBus::CallMessage call;
720 ::DBus::MessageIter wi = call.writer();
721 wi << argin0;
722 call.member("GetConnectionUnixUser");
723 ::DBus::PendingCallSlot slot;
724 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
725 this, &DBus_proxy::_GetConnectionUnixUser_memStub<Delegate>);
726 std::auto_ptr<_GetConnectionUnixUser_memBind<Delegate> > binding(new _GetConnectionUnixUser_memBind<Delegate>(delegate, method, data));
727 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
728 binding.release();
729 return async;
732 uint32_t GetConnectionUnixUser(const std::string& argin0, int timeout = -1) {
733 ::DBus::CallMessage call;
734 ::DBus::MessageIter wi = call.writer();
735 wi << argin0;
736 call.member("GetConnectionUnixUser");
737 ::DBus::Message ret = invoke_method(call, timeout);
738 ::DBus::MessageIter ri = ret.reader();
739 uint32_t argout;
740 ri >> argout;
741 return argout;
744 private:
746 // Class member function binding for "GetConnectionUnixProcessID"
747 template < class Delegate >
748 struct _GetConnectionUnixProcessID_memBind {
749 typedef void (Delegate::*Method)(
750 const uint32_t &,
751 CallContext&);
753 Delegate* delegate;
754 Method method;
755 void* data;
756 _GetConnectionUnixProcessID_memBind(Delegate* del, Method meth, void* ptr)
757 : delegate(del), method(meth), data(ptr) {}
761 // Stub for "GetConnectionUnixProcessID" member function callback
762 template < class Delegate >
763 void _GetConnectionUnixProcessID_memStub(::DBus::PendingCall &call) {
764 _GetConnectionUnixProcessID_memBind<Delegate>* bind = static_cast<_GetConnectionUnixProcessID_memBind<Delegate>*>(call.data());
765 CallContext ret(*this, call, bind->data);
766 uint32_t argout0;
767 if (!ret.error()) {
768 ::DBus::MessageIter ri = ret.msg().reader();
769 ri >> argout0; }
770 (bind->delegate->*bind->method)(argout0, ret);
771 delete bind;
774 public:
776 // "GetConnectionUnixProcessID" asynchronous call with member function callback
777 template < class Delegate >
778 ::DBus::PendingCall GetConnectionUnixProcessID_async(
779 const std::string& argin0,
780 Delegate* delegate,
781 typename _GetConnectionUnixProcessID_memBind<Delegate>::Method method,
782 void* data,
783 int timeout = -1) {
784 ::DBus::CallMessage call;
785 ::DBus::MessageIter wi = call.writer();
786 wi << argin0;
787 call.member("GetConnectionUnixProcessID");
788 ::DBus::PendingCallSlot slot;
789 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
790 this, &DBus_proxy::_GetConnectionUnixProcessID_memStub<Delegate>);
791 std::auto_ptr<_GetConnectionUnixProcessID_memBind<Delegate> > binding(new _GetConnectionUnixProcessID_memBind<Delegate>(delegate, method, data));
792 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
793 binding.release();
794 return async;
797 uint32_t GetConnectionUnixProcessID(const std::string& argin0, int timeout = -1) {
798 ::DBus::CallMessage call;
799 ::DBus::MessageIter wi = call.writer();
800 wi << argin0;
801 call.member("GetConnectionUnixProcessID");
802 ::DBus::Message ret = invoke_method(call, timeout);
803 ::DBus::MessageIter ri = ret.reader();
804 uint32_t argout;
805 ri >> argout;
806 return argout;
809 private:
811 // Class member function binding for "GetConnectionSELinuxSecurityContext"
812 template < class Delegate >
813 struct _GetConnectionSELinuxSecurityContext_memBind {
814 typedef void (Delegate::*Method)(
815 const std::vector< uint8_t > &,
816 CallContext&);
818 Delegate* delegate;
819 Method method;
820 void* data;
821 _GetConnectionSELinuxSecurityContext_memBind(Delegate* del, Method meth, void* ptr)
822 : delegate(del), method(meth), data(ptr) {}
826 // Stub for "GetConnectionSELinuxSecurityContext" member function callback
827 template < class Delegate >
828 void _GetConnectionSELinuxSecurityContext_memStub(::DBus::PendingCall &call) {
829 _GetConnectionSELinuxSecurityContext_memBind<Delegate>* bind = static_cast<_GetConnectionSELinuxSecurityContext_memBind<Delegate>*>(call.data());
830 CallContext ret(*this, call, bind->data);
831 std::vector< uint8_t > argout0;
832 if (!ret.error()) {
833 ::DBus::MessageIter ri = ret.msg().reader();
834 ri >> argout0; }
835 (bind->delegate->*bind->method)(argout0, ret);
836 delete bind;
839 public:
841 // "GetConnectionSELinuxSecurityContext" asynchronous call with member function callback
842 template < class Delegate >
843 ::DBus::PendingCall GetConnectionSELinuxSecurityContext_async(
844 const std::string& argin0,
845 Delegate* delegate,
846 typename _GetConnectionSELinuxSecurityContext_memBind<Delegate>::Method method,
847 void* data,
848 int timeout = -1) {
849 ::DBus::CallMessage call;
850 ::DBus::MessageIter wi = call.writer();
851 wi << argin0;
852 call.member("GetConnectionSELinuxSecurityContext");
853 ::DBus::PendingCallSlot slot;
854 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
855 this, &DBus_proxy::_GetConnectionSELinuxSecurityContext_memStub<Delegate>);
856 std::auto_ptr<_GetConnectionSELinuxSecurityContext_memBind<Delegate> > binding(new _GetConnectionSELinuxSecurityContext_memBind<Delegate>(delegate, method, data));
857 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
858 binding.release();
859 return async;
862 std::vector< uint8_t > GetConnectionSELinuxSecurityContext(const std::string& argin0, int timeout = -1) {
863 ::DBus::CallMessage call;
864 ::DBus::MessageIter wi = call.writer();
865 wi << argin0;
866 call.member("GetConnectionSELinuxSecurityContext");
867 ::DBus::Message ret = invoke_method(call, timeout);
868 ::DBus::MessageIter ri = ret.reader();
869 std::vector< uint8_t > argout;
870 ri >> argout;
871 return argout;
874 private:
876 // Class member function binding for "ReloadConfig"
877 template < class Delegate >
878 struct _ReloadConfig_memBind {
879 typedef void (Delegate::*Method)(
880 CallContext&);
882 Delegate* delegate;
883 Method method;
884 void* data;
885 _ReloadConfig_memBind(Delegate* del, Method meth, void* ptr)
886 : delegate(del), method(meth), data(ptr) {}
890 // Stub for "ReloadConfig" member function callback
891 template < class Delegate >
892 void _ReloadConfig_memStub(::DBus::PendingCall &call) {
893 _ReloadConfig_memBind<Delegate>* bind = static_cast<_ReloadConfig_memBind<Delegate>*>(call.data());
894 CallContext ret(*this, call, bind->data);
895 if (!ret.error()) {
896 ::DBus::MessageIter ri = ret.msg().reader(); }
897 (bind->delegate->*bind->method)(ret);
898 delete bind;
901 public:
903 // "ReloadConfig" asynchronous call with member function callback
904 template < class Delegate >
905 ::DBus::PendingCall ReloadConfig_async(
906 Delegate* delegate,
907 typename _ReloadConfig_memBind<Delegate>::Method method,
908 void* data,
909 int timeout = -1) {
910 ::DBus::CallMessage call;
911 ::DBus::MessageIter wi = call.writer();
912 call.member("ReloadConfig");
913 ::DBus::PendingCallSlot slot;
914 slot = new ::DBus::CallbackNoReturn<DBus_proxy, ::DBus::PendingCall &>(
915 this, &DBus_proxy::_ReloadConfig_memStub<Delegate>);
916 std::auto_ptr<_ReloadConfig_memBind<Delegate> > binding(new _ReloadConfig_memBind<Delegate>(delegate, method, data));
917 ::DBus::PendingCall async = invoke_method_async(call, slot, binding.get(), timeout);
918 binding.release();
919 return async;
922 void ReloadConfig(int timeout = -1) {
923 ::DBus::CallMessage call;
924 call.member("ReloadConfig");
925 ::DBus::Message ret = invoke_method(call, timeout);
928 private:
929 // DBus signal: reimplement this method to receive the "NameOwnerChanged" signal
930 virtual void NameOwnerChanged(const std::string &, const std::string &, const std::string &) {}
932 private:
933 // DBus signal: reimplement this method to receive the "NameLost" signal
934 virtual void NameLost(const std::string &) {}
936 private:
937 // DBus signal: reimplement this method to receive the "NameAcquired" signal
938 virtual void NameAcquired(const std::string &) {}
940 private:
941 void _NameOwnerChanged_stub(const ::DBus::SignalMessage &sig) {
942 ::DBus::MessageIter ri = sig.reader();
943 std::string arg0; ri >> arg0;
944 std::string arg1; ri >> arg1;
945 std::string arg2; ri >> arg2;
946 NameOwnerChanged(arg0, arg1, arg2);
949 private:
950 void _NameLost_stub(const ::DBus::SignalMessage &sig) {
951 ::DBus::MessageIter ri = sig.reader();
952 std::string arg0; ri >> arg0;
953 NameLost(arg0);
956 private:
957 void _NameAcquired_stub(const ::DBus::SignalMessage &sig) {
958 ::DBus::MessageIter ri = sig.reader();
959 std::string arg0; ri >> arg0;
960 NameAcquired(arg0);
964 } }
965 #endif//DBUSXXX____INCLUDE_DBUS_C___DBUS_PROXY_PROXY_MARSHAL_H