00001 /*************************************************************************** 00002 messagecontent.h - description 00003 ------------------- 00004 begin : mar avr 11 2006 00005 copyright : (C) 2006 by Sylvain Archenault <sylvain.archenault@laposte.net> 00006 Yves Houpert <yves.houpert@insa-rouen.fr> 00007 00008 ***************************************************************************/ 00009 00010 /*************************************************************************** 00011 * * 00012 * This program is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU General Public License as published by * 00014 * the Free Software Foundation; either version 2 of the License, or * 00015 * (at your option) any later version. * 00016 * * 00017 ***************************************************************************/ 00018 00019 #ifndef MESSAGECONTENT_H 00020 #define MESSAGECONTENT_H 00021 00022 #include "basemessage.h" 00023 #include <string> 00024 00030 class MessageContent : public BaseMessage 00031 { 00032 public: 00037 MessageContent(const int iTo = 0, const int iFrom = 0); 00038 00044 MessageContent(const int iTo, const int iFrom, const std::string& sContent); 00045 00047 ~MessageContent(); 00048 00052 void toXML(XMLWriter& writer) const; 00053 00055 void processMessage() const; 00056 00060 void setTo(const int iTo) { m_iTo = iTo; } 00061 00065 void setFrom(const int iFrom) { m_iFrom = iFrom; } 00066 00070 int getFrom() const { return m_iFrom; } 00071 00075 int getTo() const { return m_iTo; } 00076 00080 std::string getContent() const { return m_sContent; } 00081 00085 void setContent(const std::string& content) { m_sContent = content; } 00086 00090 std::string toString() const; 00091 00094 MessageContent& copy() const; 00095 00100 bool isMessageCrypted() const { return m_bIsCrypted; } 00101 00106 void setIsMessageCrypted(const bool bCrypted) { m_bIsCrypted = bCrypted; } 00107 00108 public: 00110 static const char* CRYPT_ATT; 00111 00112 protected: 00114 std::string m_sContent; 00116 int m_iFrom; 00118 int m_iTo; 00120 bool m_bIsCrypted; 00121 00122 }; 00123 00124 00125 #endif
1.4.6