dbus-cxx logo
interface.h
Go to the documentation of this file.
1 
2 // -*- c++ -*-
3 /* Do not edit! -- generated file */
4 
5 /***************************************************************************
6  * Copyright (C) 2009 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 <sigc++/sigc++.h>
24 
25 #include <string>
26 #include <map>
27 #include <set>
28 
29 #include <dbus-cxx/forward_decls.h>
30 #include <dbus-cxx/methodbase.h>
31 #include <dbus-cxx/dbus_signal.h>
32 
33 #ifndef DBUSCXX_INTERFACE_H
34 #define DBUSCXX_INTERFACE_H
35 
36 namespace DBus {
37 
46  class Interface
47  {
48  protected:
53  Interface(const std::string& name);
54 
55  public:
61  typedef DBusCxxPointer<Interface> pointer;
62 
68  typedef DBusCxxWeakPointer<Interface> weak_pointer;
69 
79  typedef std::multimap<std::string, MethodBase::pointer> Methods;
80 
88  typedef std::set<signal_base::pointer> Signals;
89 
94  static pointer create( const std::string& name = std::string() );
95 
96  virtual ~Interface();
97 
104  Object* object() const;
105 
107  Path path() const;
108 
110  DBusCxxPointer<Connection> connection() const;
111 
124  HandlerResult handle_call_message( DBusCxxPointer<Connection> connection, CallMessage::const_pointer message );
125 
127  const std::string& name() const;
128 
130  void set_name( const std::string& new_name );
131 
133  const Methods& methods() const;
134 
136  MethodBase::pointer method( const std::string& name ) const;
137 
143  template <class T_return>
144  DBusCxxPointer<Method<T_return> >
145  create_method( const std::string& name );
146 
152  template <class T_return, class T_arg1>
153  DBusCxxPointer<Method<T_return, T_arg1> >
154  create_method( const std::string& name );
155 
161  template <class T_return, class T_arg1,class T_arg2>
162  DBusCxxPointer<Method<T_return, T_arg1,T_arg2> >
163  create_method( const std::string& name );
164 
170  template <class T_return, class T_arg1,class T_arg2,class T_arg3>
171  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3> >
172  create_method( const std::string& name );
173 
179  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
180  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >
181  create_method( const std::string& name );
182 
188  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
189  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >
190  create_method( const std::string& name );
191 
197  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
198  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> >
199  create_method( const std::string& name );
200 
206  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>
207  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> >
208  create_method( const std::string& name );
209 
210 
211 
220  template <class T_return>
221  DBusCxxPointer<Method<T_return> >
222  create_method( const std::string& name, sigc::slot0<T_return> slot );
223 
232  template <class T_return, class T_arg1>
233  DBusCxxPointer<Method<T_return, T_arg1> >
234  create_method( const std::string& name, sigc::slot1<T_return, T_arg1> slot );
235 
244  template <class T_return, class T_arg1,class T_arg2>
245  DBusCxxPointer<Method<T_return, T_arg1,T_arg2> >
246  create_method( const std::string& name, sigc::slot2<T_return, T_arg1,T_arg2> slot );
247 
256  template <class T_return, class T_arg1,class T_arg2,class T_arg3>
257  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3> >
258  create_method( const std::string& name, sigc::slot3<T_return, T_arg1,T_arg2,T_arg3> slot );
259 
268  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
269  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >
270  create_method( const std::string& name, sigc::slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4> slot );
271 
280  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
281  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >
282  create_method( const std::string& name, sigc::slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> slot );
283 
292  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
293  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> >
294  create_method( const std::string& name, sigc::slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> slot );
295 
304  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>
305  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> >
306  create_method( const std::string& name, sigc::slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> slot );
307 
308 
311 
313  void remove_method( const std::string& name );
314 
316  bool has_method( const std::string& name ) const;
317 
323 
331 
335  bool remove_signal( const std::string& name );
336 
340  bool has_signal( signal_base::pointer signal ) const;
341 
343  bool has_signal( const std::string& name ) const;
344 
350  template <class T_return>
351  DBusCxxPointer<signal<T_return> >
352  create_signal( const std::string& name );
353 
359  template <class T_return, class T_arg1>
360  DBusCxxPointer<signal<T_return, T_arg1> >
361  create_signal( const std::string& name );
362 
368  template <class T_return, class T_arg1,class T_arg2>
369  DBusCxxPointer<signal<T_return, T_arg1,T_arg2> >
370  create_signal( const std::string& name );
371 
377  template <class T_return, class T_arg1,class T_arg2,class T_arg3>
378  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3> >
379  create_signal( const std::string& name );
380 
386  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
387  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >
388  create_signal( const std::string& name );
389 
395  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
396  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >
397  create_signal( const std::string& name );
398 
404  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
405  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> >
406  create_signal( const std::string& name );
407 
413  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>
414  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> >
415  create_signal( const std::string& name );
416 
417 
418 
420  const Signals& signals();
421 
427  signal_base::pointer signal(const std::string& signal_name);
428 
430  sigc::signal<void,const std::string&/*old name*/,const std::string&/*new name*/> signal_name_changed();
431 
433  sigc::signal<void,MethodBase::pointer> signal_method_added();
434 
436  sigc::signal<void,MethodBase::pointer> signal_method_removed();
437 
439  std::string introspect(int space_depth=0) const;
440 
441  private:
442 
444 
445  protected:
446 
447  friend class Object;
448 
449  void set_object( Object* object );
450 
451  std::string m_name;
452 
453  Methods m_methods;
454 
455  Signals m_signals;
456 
457  mutable pthread_rwlock_t m_methods_rwlock;
458 
459  mutable pthread_rwlock_t m_signals_rwlock;
460 
462  pthread_mutex_t m_name_mutex;
463 
464  sigc::signal<void,const std::string&,const std::string&> m_signal_name_changed;
465 
466  sigc::signal<void,MethodBase::pointer> m_signal_method_added;
467 
468  sigc::signal<void,MethodBase::pointer> m_signal_method_removed;
469 
470  typedef std::map<MethodBase::pointer,sigc::connection> MethodSignalNameConnections;
471 
472  MethodSignalNameConnections m_method_signal_name_connections;
473 
478  void on_method_name_changed(const std::string& oldname, const std::string& newname, MethodBase::pointer method);
479 
480  void set_connection(DBusCxxPointer<Connection> conn);
481 
482  void set_path( const std::string& new_path );
483 
484  };
485 
486 }
487 
488 #include <dbus-cxx/method.h>
489 
490 namespace DBus {
491 
492  template <class T_return>
493  DBusCxxPointer<Method<T_return> >
494  Interface::create_method( const std::string& name )
495  {
496  DBusCxxPointer< Method<T_return> > method;
497  method = Method<T_return>::create(name);
498  this->add_method( method );
499  return method;
500  }
501 
502  template <class T_return, class T_arg1>
503  DBusCxxPointer<Method<T_return, T_arg1> >
504  Interface::create_method( const std::string& name )
505  {
506  DBusCxxPointer< Method<T_return, T_arg1> > method;
507  method = Method<T_return, T_arg1>::create(name);
508  this->add_method( method );
509  return method;
510  }
511 
512  template <class T_return, class T_arg1,class T_arg2>
513  DBusCxxPointer<Method<T_return, T_arg1,T_arg2> >
514  Interface::create_method( const std::string& name )
515  {
516  DBusCxxPointer< Method<T_return, T_arg1,T_arg2> > method;
518  this->add_method( method );
519  return method;
520  }
521 
522  template <class T_return, class T_arg1,class T_arg2,class T_arg3>
523  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3> >
524  Interface::create_method( const std::string& name )
525  {
526  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3> > method;
528  this->add_method( method );
529  return method;
530  }
531 
532  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
533  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >
534  Interface::create_method( const std::string& name )
535  {
536  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4> > method;
538  this->add_method( method );
539  return method;
540  }
541 
542  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
543  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >
544  Interface::create_method( const std::string& name )
545  {
546  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> > method;
548  this->add_method( method );
549  return method;
550  }
551 
552  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
553  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> >
554  Interface::create_method( const std::string& name )
555  {
556  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> > method;
558  this->add_method( method );
559  return method;
560  }
561 
562  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>
563  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> >
564  Interface::create_method( const std::string& name )
565  {
566  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> > method;
568  this->add_method( method );
569  return method;
570  }
571 
572 
573 
574  template <class T_return>
575  DBusCxxPointer<Method<T_return> >
576  Interface::create_method( const std::string& name, sigc::slot0<T_return> slot )
577  {
578  DBusCxxPointer< Method<T_return> > method;
579  method = Method<T_return>::create(name);
580  method->set_method( slot );
581  this->add_method( method );
582  return method;
583  }
584 
585  template <class T_return, class T_arg1>
586  DBusCxxPointer<Method<T_return, T_arg1> >
587  Interface::create_method( const std::string& name, sigc::slot1<T_return, T_arg1> slot )
588  {
589  DBusCxxPointer< Method<T_return, T_arg1> > method;
590  method = Method<T_return, T_arg1>::create(name);
591  method->set_method( slot );
592  this->add_method( method );
593  return method;
594  }
595 
596  template <class T_return, class T_arg1,class T_arg2>
597  DBusCxxPointer<Method<T_return, T_arg1,T_arg2> >
598  Interface::create_method( const std::string& name, sigc::slot2<T_return, T_arg1,T_arg2> slot )
599  {
600  DBusCxxPointer< Method<T_return, T_arg1,T_arg2> > method;
602  method->set_method( slot );
603  this->add_method( method );
604  return method;
605  }
606 
607  template <class T_return, class T_arg1,class T_arg2,class T_arg3>
608  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3> >
609  Interface::create_method( const std::string& name, sigc::slot3<T_return, T_arg1,T_arg2,T_arg3> slot )
610  {
611  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3> > method;
613  method->set_method( slot );
614  this->add_method( method );
615  return method;
616  }
617 
618  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
619  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >
620  Interface::create_method( const std::string& name, sigc::slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4> slot )
621  {
622  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4> > method;
624  method->set_method( slot );
625  this->add_method( method );
626  return method;
627  }
628 
629  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
630  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >
631  Interface::create_method( const std::string& name, sigc::slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> slot )
632  {
633  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> > method;
635  method->set_method( slot );
636  this->add_method( method );
637  return method;
638  }
639 
640  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
641  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> >
642  Interface::create_method( const std::string& name, sigc::slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> slot )
643  {
644  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> > method;
646  method->set_method( slot );
647  this->add_method( method );
648  return method;
649  }
650 
651  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>
652  DBusCxxPointer<Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> >
653  Interface::create_method( const std::string& name, sigc::slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> slot )
654  {
655  DBusCxxPointer< Method<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> > method;
657  method->set_method( slot );
658  this->add_method( method );
659  return method;
660  }
661 
662 
663 
664  template <class T_return>
665  DBusCxxPointer<signal<T_return> >
666  Interface::create_signal( const std::string& name )
667  {
668  DBusCxxPointer<DBus::signal<T_return> > sig;
670  if ( this->add_signal(sig) ) return sig;
671  return DBusCxxPointer<DBus::signal<T_return> >();
672  }
673 
674  template <class T_return, class T_arg1>
675  DBusCxxPointer<signal<T_return, T_arg1> >
676  Interface::create_signal( const std::string& name )
677  {
678  DBusCxxPointer<DBus::signal<T_return, T_arg1> > sig;
680  if ( this->add_signal(sig) ) return sig;
681  return DBusCxxPointer<DBus::signal<T_return, T_arg1> >();
682  }
683 
684  template <class T_return, class T_arg1,class T_arg2>
685  DBusCxxPointer<signal<T_return, T_arg1,T_arg2> >
686  Interface::create_signal( const std::string& name )
687  {
688  DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2> > sig;
690  if ( this->add_signal(sig) ) return sig;
691  return DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2> >();
692  }
693 
694  template <class T_return, class T_arg1,class T_arg2,class T_arg3>
695  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3> >
696  Interface::create_signal( const std::string& name )
697  {
698  DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3> > sig;
700  if ( this->add_signal(sig) ) return sig;
701  return DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3> >();
702  }
703 
704  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
705  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >
706  Interface::create_signal( const std::string& name )
707  {
708  DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4> > sig;
710  if ( this->add_signal(sig) ) return sig;
711  return DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >();
712  }
713 
714  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
715  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >
716  Interface::create_signal( const std::string& name )
717  {
718  DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> > sig;
720  if ( this->add_signal(sig) ) return sig;
721  return DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >();
722  }
723 
724  template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
725  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> >
726  Interface::create_signal( const std::string& name )
727  {
728  DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> > sig;
730  if ( this->add_signal(sig) ) return sig;
731  return DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> >();
732  }
733 
734  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>
735  DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> >
736  Interface::create_signal( const std::string& name )
737  {
738  DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> > sig;
740  if ( this->add_signal(sig) ) return sig;
741  return DBusCxxPointer<DBus::signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> >();
742  }
743 
744 
745 
746 } /* namespace DBus */
747 
748 #endif /* DBUS_CXX_INTERFACE_H */
749 
bool add_method(MethodBase::pointer method)
Adds the named method.
Definition: interface.cpp:109
DBusCxxPointer< Method< T_return > > create_method(const std::string &name)
Creates a method with a return value (possibly void ) and 0 parameters.
Definition: interface.h:494
Subclass of the numbered sigc::signal templates.
Definition: dbus_signal.h:50
void on_method_name_changed(const std::string &oldname, const std::string &newname, MethodBase::pointer method)
Callback point that updates the method name map when a method changes its name.
Definition: interface.cpp:403
HandlerResult
Definition: enums.h:87
MethodSignalNameConnections m_method_signal_name_connections
Definition: interface.h:472
Interface(const std::string &name)
This class has a protected constructor.
Definition: interface.cpp:30
DBusCxxPointer< Interface > pointer
Typedef to smart pointers to Interface.
Definition: interface.h:61
bool has_signal(signal_base::pointer signal) const
True if the given signal is part of this interface.
Definition: interface.cpp:270
Definition: accumulators.h:24
sigc::signal< void, MethodBase::pointer > m_signal_method_added
Definition: interface.h:466
std::multimap< std::string, MethodBase::pointer > Methods
Typedef to the storage structure for methods.
Definition: interface.h:79
bool has_method(const std::string &name) const
True if the interface has a method with the given name.
Definition: interface.cpp:173
pthread_rwlock_t m_methods_rwlock
Definition: interface.h:457
const Signals & signals()
Returns the signals associated with this interface.
Definition: interface.cpp:307
const std::string & name() const
Get the name of this interface.
Definition: interface.cpp:68
bool remove_signal(signal_base::pointer signal)
Removes the given signal.
Definition: interface.cpp:222
DBusCxxWeakPointer< Interface > weak_pointer
Typedef to weak smart pointers to Interface.
Definition: interface.h:68
DBusCxxPointer< signal_base > pointer
Definition: signal_base.h:64
HandlerResult handle_call_message(DBusCxxPointer< Connection > connection, CallMessage::const_pointer message)
Handles the specified call message on the specified connection.
Definition: interface.cpp:365
signal_base::pointer signal(const std::string &signal_name)
Returns the first signal found with a matching name.
Definition: interface.cpp:312
std::set< signal_base::pointer > Signals
Typedef to the storage structure for signals.
Definition: interface.h:88
bool add_signal(signal_base::pointer signal)
Adds the given signal.
Definition: interface.cpp:188
void set_path(const std::string &new_path)
Definition: interface.cpp:447
Signals m_signals
Definition: interface.h:455
static pointer create(const std::string &interface, const std::string &name)
Definition: dbus_signal.h:182
sigc::signal< void, const std::string &, const std::string & > m_signal_name_changed
Definition: interface.h:464
DBusCxxPointer< Connection > connection() const
Returns the connection associated with this interface's object or a null pointer if no object is asso...
Definition: interface.cpp:62
std::map< MethodBase::pointer, sigc::connection > MethodSignalNameConnections
Definition: interface.h:470
sigc::signal< void, MethodBase::pointer > signal_method_added()
Signal emitted when a method of the given name is added.
Definition: interface.cpp:339
static pointer create(const std::string &name=std::string())
Creates a named Interface.
Definition: interface.cpp:39
pthread_rwlock_t m_signals_rwlock
Definition: interface.h:459
pthread_mutex_t m_name_mutex
Ensures that the name doesn't change while the name changed signal is emitting.
Definition: interface.h:462
std::string m_name
Definition: interface.h:451
Methods m_methods
Definition: interface.h:453
MethodBase::pointer method(const std::string &name) const
Returns the first method with the given name.
Definition: interface.cpp:92
Path path() const
Returns the path of the object associated with this interface or a null string if no object is associ...
Definition: interface.cpp:56
sigc::signal< void, MethodBase::pointer > m_signal_method_removed
Definition: interface.h:468
const Methods & methods() const
Returns the methods associated with this interface.
Definition: interface.cpp:87
void set_object(Object *object)
Definition: interface.cpp:453
void set_name(const std::string &new_name)
Sets the name of this interface.
Definition: interface.cpp:73
void remove_method(const std::string &name)
Removes the first method with the given name.
Definition: interface.cpp:142
Object * object() const
Returns the object associated with this interface.
Definition: interface.cpp:51
Definition: interface.h:46
Object * m_object
Definition: interface.h:443
Definition: path.h:31
sigc::signal< void, const std::string &, const std::string & > signal_name_changed()
Signal emitted when the name is changed.
Definition: interface.cpp:334
sigc::signal< void, MethodBase::pointer > signal_method_removed()
Signal emitted when a method of the given name is removed.
Definition: interface.cpp:344
static pointer create(const std::string &name)
Definition: method.h:62
void set_connection(DBusCxxPointer< Connection > conn)
Definition: interface.cpp:440
Definition: object.h:96
std::string introspect(int space_depth=0) const
Returns a DBus XML description of this interface.
Definition: interface.cpp:349
DBusCxxPointer< MethodBase > pointer
Definition: methodbase.h:49
virtual ~Interface()
Definition: interface.cpp:44
DBusCxxPointer< const CallMessage > const_pointer
Definition: callmessage.h:59
DBusCxxPointer< signal< T_return > > create_signal(const std::string &name)
Creates a signal with a return value (possibly void ) and 0 parameters.
Definition: interface.h:666

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