mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-23 05:44:45 -04:00
jsonapi: access messages (mail)
This commit is contained in:
parent
c6d0203557
commit
285158db5f
1 changed files with 93 additions and 39 deletions
|
@ -165,9 +165,8 @@ class MessageInfo_v2
|
|||
int count; /* file count */
|
||||
};
|
||||
|
||||
class MessageInfo
|
||||
struct MessageInfo : RsSerializable
|
||||
{
|
||||
public:
|
||||
MessageInfo(): msgflags(0), size(0), count(0), ts(0) {}
|
||||
std::string msgId;
|
||||
|
||||
|
@ -199,12 +198,41 @@ public:
|
|||
int count; /* file count */
|
||||
|
||||
int ts;
|
||||
|
||||
// RsSerializable interface
|
||||
void serial_process(RsGenericSerializer::SerializeJob j, RsGenericSerializer::SerializeContext &ctx) {
|
||||
RS_SERIAL_PROCESS(msgId);
|
||||
|
||||
RS_SERIAL_PROCESS(rspeerid_srcId);
|
||||
RS_SERIAL_PROCESS(rsgxsid_srcId);
|
||||
|
||||
RS_SERIAL_PROCESS(msgflags);
|
||||
|
||||
RS_SERIAL_PROCESS(rspeerid_msgto);
|
||||
RS_SERIAL_PROCESS(rspeerid_msgcc);
|
||||
RS_SERIAL_PROCESS(rspeerid_msgbcc);
|
||||
|
||||
RS_SERIAL_PROCESS(rsgxsid_msgto);
|
||||
RS_SERIAL_PROCESS(rsgxsid_msgcc);
|
||||
RS_SERIAL_PROCESS(rsgxsid_msgcc);
|
||||
|
||||
RS_SERIAL_PROCESS(title);
|
||||
RS_SERIAL_PROCESS(msg);
|
||||
|
||||
RS_SERIAL_PROCESS(attach_title);
|
||||
RS_SERIAL_PROCESS(attach_comment);
|
||||
RS_SERIAL_PROCESS(files);
|
||||
|
||||
RS_SERIAL_PROCESS(size);
|
||||
RS_SERIAL_PROCESS(count);
|
||||
|
||||
RS_SERIAL_PROCESS(ts);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class MsgInfoSummary
|
||||
struct MsgInfoSummary : RsSerializable
|
||||
{
|
||||
public:
|
||||
MsgInfoSummary() : msgflags(0), count(0), ts(0) {}
|
||||
|
||||
std::string msgId;
|
||||
|
@ -216,6 +244,18 @@ class MsgInfoSummary
|
|||
int count; /* file count */
|
||||
time_t ts;
|
||||
|
||||
|
||||
// RsSerializable interface
|
||||
void serial_process(RsGenericSerializer::SerializeJob j, RsGenericSerializer::SerializeContext &ctx) {
|
||||
RS_SERIAL_PROCESS(msgId);
|
||||
RS_SERIAL_PROCESS(srcId);
|
||||
|
||||
RS_SERIAL_PROCESS(msgflags);
|
||||
|
||||
RS_SERIAL_PROCESS(title);
|
||||
RS_SERIAL_PROCESS(count);
|
||||
RS_SERIAL_PROCESS(ts);
|
||||
}
|
||||
};
|
||||
|
||||
class MsgTagInfo
|
||||
|
@ -448,7 +488,21 @@ public:
|
|||
/* Message Items */
|
||||
/****************************************/
|
||||
|
||||
/**
|
||||
* @brief getMessageSummaries
|
||||
* @jsonapi{de22velopment}
|
||||
* @param[out] msgList
|
||||
* @return always true
|
||||
*/
|
||||
virtual bool getMessageSummaries(std::list<Rs::Msgs::MsgInfoSummary> &msgList) = 0;
|
||||
|
||||
/**
|
||||
* @brief getMessage
|
||||
* @jsonapi{dev22elopment}
|
||||
* @param[in] mId message ID to lookup
|
||||
* @param[out] msg
|
||||
* @return true on success
|
||||
*/
|
||||
virtual bool getMessage(const std::string &mId, Rs::Msgs::MessageInfo &msg) = 0;
|
||||
virtual void getMessageCount(unsigned int *pnInbox, unsigned int *pnInboxNew, unsigned int *pnOutbox, unsigned int *pnDraftbox, unsigned int *pnSentbox, unsigned int *pnTrashbox) = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue