2012-06-26 15:52:01 -04:00
|
|
|
#ifndef RSGXSMETA_H
|
|
|
|
#define RSGXSMETA_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "serialiser/rsserial.h"
|
|
|
|
#include "serialiser/rstlvbase.h"
|
|
|
|
#include "serialiser/rstlvtypes.h"
|
|
|
|
#include "serialiser/rstlvkeys.h"
|
2012-07-26 17:48:54 -04:00
|
|
|
#include "serialiser/rsgxsitems.h"
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-07-22 17:38:15 -04:00
|
|
|
typedef std::string RsGxsGroupId;
|
|
|
|
typedef std::string RsGxsMessageId;
|
|
|
|
typedef std::pair<RsGxsGroupId, RsGxsMessageId> RsGxsGrpMsgIdPair;
|
|
|
|
|
2012-07-26 17:48:54 -04:00
|
|
|
class RsGroupMetaData;
|
|
|
|
class RsMsgMetaData;
|
2012-07-22 17:38:15 -04:00
|
|
|
|
2012-06-26 15:52:01 -04:00
|
|
|
class RsGxsGrpMetaData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
RsGxsGrpMetaData();
|
|
|
|
bool deserialise(void *data, uint32_t &pktsize);
|
|
|
|
bool serialise(void* data, uint32_t &pktsize);
|
|
|
|
uint32_t serial_size();
|
2012-06-28 17:22:55 -04:00
|
|
|
void clear();
|
2012-07-26 17:48:54 -04:00
|
|
|
void operator =(const RsGroupMetaData& rMeta);
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-07-22 17:38:15 -04:00
|
|
|
RsGxsGroupId mGroupId;
|
|
|
|
RsGxsGroupId mOrigGrpId;
|
2012-06-26 15:52:01 -04:00
|
|
|
std::string mGroupName;
|
|
|
|
uint32_t mGroupFlags;
|
|
|
|
uint32_t mPublishTs;
|
|
|
|
std::string mAuthorId;
|
|
|
|
|
|
|
|
|
|
|
|
RsTlvKeySignature adminSign;
|
|
|
|
RsTlvSecurityKeySet keys;
|
|
|
|
RsTlvKeySignature idSign;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG.
|
|
|
|
|
|
|
|
uint32_t mSubscribeFlags;
|
|
|
|
|
|
|
|
uint32_t mPop; // HOW DO WE DO THIS NOW.
|
|
|
|
uint32_t mMsgCount; // ???
|
|
|
|
time_t mLastPost; // ???
|
|
|
|
|
|
|
|
uint32_t mGroupStatus;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class RsGxsMsgMetaData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
RsGxsMsgMetaData();
|
|
|
|
bool deserialise(void *data, uint32_t *size);
|
|
|
|
bool serialise(void* data, uint32_t *size);
|
|
|
|
uint32_t serial_size();
|
2012-06-28 17:22:55 -04:00
|
|
|
void clear();
|
2012-07-26 17:48:54 -04:00
|
|
|
void operator =(const RsMsgMetaData& rMeta);
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-07-22 17:38:15 -04:00
|
|
|
RsGxsGroupId mGroupId;
|
|
|
|
RsGxsMessageId mMsgId;
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-07-22 17:38:15 -04:00
|
|
|
RsGxsMessageId mThreadId;
|
|
|
|
RsGxsMessageId mParentId;
|
|
|
|
RsGxsMessageId mOrigMsgId;
|
2012-06-26 15:52:01 -04:00
|
|
|
std::string mAuthorId;
|
|
|
|
|
|
|
|
RsTlvKeySignature pubSign;
|
|
|
|
RsTlvKeySignature idSign;
|
|
|
|
|
|
|
|
std::string mMsgName;
|
|
|
|
time_t mPublishTs;
|
|
|
|
uint32_t mMsgFlags; // Whats this for?
|
|
|
|
|
|
|
|
// BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG.
|
|
|
|
// normally READ / UNREAD flags. LOCAL Data.
|
|
|
|
uint32_t mMsgStatus;
|
|
|
|
time_t mChildTs;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // RSGXSMETA_H
|