dbus-cxx logo
signalmessage.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2009,2010 by Rick L. Vinyard, Jr. *
3  * rvinyard@cs.nmsu.edu *
4  * *
5  * This file is part of the dbus-cxx library. *
6  * *
7  * The dbus-cxx library is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License *
9  * version 3 as published by the Free Software Foundation. *
10  * *
11  * The dbus-cxx library is distributed in the hope that it will be *
12  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty *
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this software. If not see <http://www.gnu.org/licenses/>. *
18  ***************************************************************************/
19 #include <dbus-cxx/message.h>
20 
21 #ifndef DBUSCXX_SIGNALMESSAGE_H
22 #define DBUSCXX_SIGNALMESSAGE_H
23 
24 namespace DBus
25 {
26 
38  class SignalMessage : public Message
39  {
40  protected:
41 
42  SignalMessage( DBusMessage* cobj=NULL, CreateMethod m = CREATE_ALIAS );
43 
45 
47 
48  SignalMessage( const std::string& name );
49 
50  SignalMessage( const std::string& path, const std::string& interface, const std::string& name );
51 
52  public:
53 
54  typedef DBusCxxPointer<SignalMessage> pointer;
55 
56  typedef DBusCxxPointer<const SignalMessage> const_pointer;
57 
58  typedef DBusCxxWeakPointer<SignalMessage> weak_pointer;
59 
60  static pointer create( DBusMessage* cobj=NULL, CreateMethod m = CREATE_ALIAS );
61 
62  static pointer create( Message::pointer msg );
63 
64  static const_pointer create( Message::const_pointer msg );
65 
66  static pointer create( const std::string& name );
67 
68  static pointer create( const std::string& path, const std::string& interface, const std::string& name );
69 
70  bool set_path( const std::string& p );
71 
72  Path path() const;
73 
74  bool has_path( const std::string& p ) const;
75 
76  std::vector<std::string> path_decomposed() const;
77 
78  bool set_interface( const std::string& i );
79 
80  const char* interface() const;
81 
82  bool has_interface( const std::string& i ) const;
83 
84  bool set_member( const std::string& m );
85 
86  const char* member() const;
87 
88  bool has_member( const std::string& m ) const;
89 
90  bool operator == ( const SignalMessage& ) const;
91 
92  };
93 
94 }
95 
96 #endif
Represents a DBus signal message.
Definition: signalmessage.h:38
bool set_interface(const std::string &i)
Definition: signalmessage.cpp:120
DBusMessage * cobj() const
Definition: message.cpp:261
Path path() const
Definition: signalmessage.cpp:99
DBusCxxPointer< const SignalMessage > const_pointer
Definition: signalmessage.h:56
DBusCxxPointer< Message > pointer
Definition: message.h:60
bool set_member(const std::string &m)
Definition: signalmessage.cpp:134
Definition: accumulators.h:24
bool has_interface(const std::string &i) const
Definition: signalmessage.cpp:129
bool has_member(const std::string &m) const
Definition: signalmessage.cpp:144
DBusCxxPointer< SignalMessage > pointer
Definition: signalmessage.h:54
std::vector< std::string > path_decomposed() const
Definition: signalmessage.cpp:109
bool operator==(const SignalMessage &) const
Definition: signalmessage.cpp:89
static pointer create(DBusMessage *cobj=NULL, CreateMethod m=CREATE_ALIAS)
Definition: signalmessage.cpp:64
Definition: enums.h:37
SignalMessage(DBusMessage *cobj=NULL, CreateMethod m=CREATE_ALIAS)
Definition: signalmessage.cpp:24
This class represents a basic DBus message and also serves as a base class for the specialized messag...
Definition: message.h:56
const char * interface() const
Definition: signalmessage.cpp:125
const char * member() const
Definition: signalmessage.cpp:139
DBusCxxWeakPointer< SignalMessage > weak_pointer
Definition: signalmessage.h:58
CreateMethod
Definition: enums.h:35
bool has_path(const std::string &p) const
Definition: signalmessage.cpp:104
Definition: path.h:31
bool set_path(const std::string &p)
Definition: signalmessage.cpp:94
DBusCxxPointer< const Message > const_pointer
Definition: message.h:62

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