dbus-cxx logo
errormessage.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_ERRORMESSAGE_H
22 #define DBUSCXX_ERRORMESSAGE_H
23 
24 namespace DBus
25 {
26 
37  class ErrorMessage : public Message
38  {
39  protected:
40 
41  ErrorMessage();
42 
43  ErrorMessage( DBusMessage* cobj );
44 
46 
47  ErrorMessage( Message::const_pointer msg, const std::string& name, const std::string& message );
48 
49  public:
50 
51  typedef DBusCxxPointer<ErrorMessage> pointer;
52 
53  typedef DBusCxxWeakPointer<ErrorMessage> weak_pointer;
54 
55  static pointer create();
56 
57  static pointer create( DBusMessage* cobj );
58 
59  static pointer create( Message::pointer msg );
60 
61  static pointer create( Message::const_pointer msg, const std::string& name, const std::string& message );
62 
63  const char* name() const;
64 
65  bool set_name( const std::string& n );
66 
67  bool operator == ( const ErrorMessage& ) const;
68 
69  };
70 
71 }
72 
73 #endif
DBusMessage * cobj() const
Definition: message.cpp:261
DBusCxxPointer< Message > pointer
Definition: message.h:60
Definition: accumulators.h:24
DBusCxxPointer< ErrorMessage > pointer
Definition: errormessage.h:51
bool operator==(const ErrorMessage &) const
Definition: errormessage.cpp:85
ErrorMessage()
Definition: errormessage.cpp:24
Represents a DBus Error message.
Definition: errormessage.h:37
static pointer create()
Definition: errormessage.cpp:65
This class represents a basic DBus message and also serves as a base class for the specialized messag...
Definition: message.h:56
DBusCxxWeakPointer< ErrorMessage > weak_pointer
Definition: errormessage.h:53
bool set_name(const std::string &n)
Definition: errormessage.cpp:95
DBusCxxPointer< const Message > const_pointer
Definition: message.h:62
const char * name() const
Definition: errormessage.cpp:90

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