00001 /*************************************************************************** 00002 * Copyright (C) 2009,2010 by Rick L. Vinyard, Jr. * 00003 * rvinyard@cs.nmsu.edu * 00004 * * 00005 * This file is part of the dbus-cxx library. * 00006 * * 00007 * The dbus-cxx library is free software; you can redistribute it and/or * 00008 * modify it under the terms of the GNU General Public License * 00009 * version 3 as published by the Free Software Foundation. * 00010 * * 00011 * The dbus-cxx library is distributed in the hope that it will be * 00012 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty * 00013 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00014 * General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this software. If not see <http://www.gnu.org/licenses/>. * 00018 ***************************************************************************/ 00019 #include <dbus-cxx/message.h> 00020 00021 #ifndef DBUSCXX_ERRORMESSAGE_H 00022 #define DBUSCXX_ERRORMESSAGE_H 00023 00024 namespace DBus 00025 { 00026 00037 class ErrorMessage : public Message 00038 { 00039 protected: 00040 00041 ErrorMessage(); 00042 00043 ErrorMessage( DBusMessage* cobj ); 00044 00045 ErrorMessage( Message::pointer msg ); 00046 00047 ErrorMessage( Message::pointer msg, const std::string& name, const std::string& message ); 00048 00049 public: 00050 00051 typedef DBusCxxPointer<ErrorMessage> pointer; 00052 00053 typedef DBusCxxWeakPointer<ErrorMessage> weak_pointer; 00054 00055 static pointer create(); 00056 00057 static pointer create( DBusMessage* cobj ); 00058 00059 static pointer create( Message::pointer msg ); 00060 00061 static pointer create( Message::pointer msg, const std::string& name, const std::string& message ); 00062 00063 const char* name() const; 00064 00065 bool set_name( const std::string& n ); 00066 00067 bool operator == ( const ErrorMessage& ) const; 00068 00069 }; 00070 00071 } 00072 00073 #endif