00001 /*************************************************************************** 00002 statechangedevent.h - description 00003 ------------------- 00004 begin : lun avr 24 2006 00005 copyright : (C) 2006 by 00006 - Sylvain Archenault <sylvain.archenault@laposte.net> 00007 - Yves Houpert <yves.houpert@insa-rouen.fr> 00008 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 ***************************************************************************/ 00019 #ifndef STATECHANGEDEVENT_H 00020 #define STATECHANGEDEVENT_H 00021 00022 #include <Message/event.h> 00023 #include <contact.h> 00024 00030 class StateChangedEvent : public Event 00031 { 00032 public: 00034 StateChangedEvent(); 00035 00039 StateChangedEvent(const int contactID, const Contact::Status newStatus); 00040 00042 ~StateChangedEvent(); 00043 00046 void setContactID(const int contactID) { m_iContactID = contactID; } 00047 00051 void setNewStatus(const Contact::Status newStatus) { m_NewStatus = newStatus; } 00052 00056 void processMessage() const; 00057 00061 void toXMLExt(XMLWriter& writer) const; 00062 00067 virtual std::string toString() const; 00068 00071 StateChangedEvent& copy() const; 00072 00073 private: //private members. 00075 int m_iContactID; 00077 Contact::Status m_NewStatus; 00078 }; 00079 00080 #endif
1.4.6