X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=include%2Ffreenet%2Fmessagexml.h;h=71e6e65754a31886633b71ed896da3b1e846df6d;hp=7daa842d46c9470b6e779291376ad4561ca1116d;hb=63376b2a82c3f6cdf2df56b1f134bd7df0aaab3a;hpb=e773b0ecb8a35c67cde5b2e82bbebb05224f34d0 diff --git a/include/freenet/messagexml.h b/include/freenet/messagexml.h index 7daa842..71e6e65 100644 --- a/include/freenet/messagexml.h +++ b/include/freenet/messagexml.h @@ -15,14 +15,22 @@ public: std::string GetXML(); const bool ParseXML(const std::string &xml); - std::string GetDate() { return m_date; } - std::string GetTime() { return m_time; } - std::string GetSubject() { return m_subject; } - std::string GetMessageID() { return m_messageid; } - std::string GetReplyBoard() { return m_replyboard; } - std::string GetBody() { return m_body; } - std::vector GetBoards() { return m_boards; } - std::map GetInReplyTo() { return m_inreplyto; } + struct fileattachment + { + fileattachment(const std::string &key, const int size):m_key(key),m_size(size) {} + std::string m_key; + int m_size; + }; + + std::string GetDate() { return m_date; } + std::string GetTime() { return m_time; } + std::string GetSubject() { return m_subject; } + std::string GetMessageID() { return m_messageid; } + std::string GetReplyBoard() { return m_replyboard; } + std::string GetBody() { return m_body; } + std::vector GetBoards() { return m_boards; } + std::map GetInReplyTo() { return m_inreplyto; } + std::vector GetFileAttachments() { return m_fileattachments; } void SetDate(const std::string &date) { m_date=date; } void SetTime(const std::string &time) { m_time=time; } @@ -32,6 +40,7 @@ public: void SetBody(const std::string &body) { m_body=body; } void AddBoard(const std::string &board) { m_boards.push_back(board); } void AddInReplyTo(const long index, const std::string &messageid) { m_inreplyto[index]=messageid; } + void AddFileAttachment(const std::string &key, const int size) { m_fileattachments.push_back(fileattachment(key,size)); } private: void Initialize(); @@ -43,6 +52,7 @@ private: std::vector m_boards; std::string m_replyboard; std::map m_inreplyto; + std::vector m_fileattachments; std::string m_body; };