7 #include "../ifmsxmldocument.h"
\r
9 class MessageXML:public IFMSXMLDocument
\r
15 std::string GetXML();
\r
16 const bool ParseXML(const std::string &xml);
\r
18 struct fileattachment
\r
20 fileattachment(const std::string &key, const int size):m_key(key),m_size(size) {}
\r
25 std::string GetDate() { return m_date; }
\r
26 std::string GetTime() { return m_time; }
\r
27 std::string GetSubject() { return m_subject; }
\r
28 std::string GetMessageID() { return m_messageid; }
\r
29 std::string GetReplyBoard() { return m_replyboard; }
\r
30 std::string GetBody() { return m_body; }
\r
31 std::vector<std::string> GetBoards() { return m_boards; }
\r
32 std::map<long,std::string> GetInReplyTo() { return m_inreplyto; }
\r
33 std::vector<fileattachment> GetFileAttachments() { return m_fileattachments; }
\r
35 void SetDate(const std::string &date) { m_date=date; }
\r
36 void SetTime(const std::string &time) { m_time=time; }
\r
37 void SetSubject(const std::string &subject) { m_subject=subject; }
\r
38 void SetMessageID(const std::string &messageid) { m_messageid=messageid; }
\r
39 void SetReplyBoard(const std::string &replyboard) { m_replyboard=replyboard; }
\r
40 void SetBody(const std::string &body) { m_body=body; }
\r
41 void AddBoard(const std::string &board) { m_boards.push_back(board); }
\r
42 void AddInReplyTo(const long index, const std::string &messageid) { m_inreplyto[index]=messageid; }
\r
43 void AddFileAttachment(const std::string &key, const int size) { m_fileattachments.push_back(fileattachment(key,size)); }
\r
50 std::string m_subject;
\r
51 std::string m_messageid;
\r
52 std::vector<std::string> m_boards;
\r
53 std::string m_replyboard;
\r
54 std::map<long,std::string> m_inreplyto;
\r
55 std::vector<fileattachment> m_fileattachments;
\r
60 #endif // _messagexml_
\r