Nxs items now do not support the concept of version

timestamp has been added to grp sync item 
updated data service and grps to deal with this
added msg and grp meta types which serves to hold meta data of grp and msg 
removed observer temporarily 

updated nxs item tests, need to update data service tests

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5256 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-06-26 19:52:01 +00:00
parent 03e2ee72e0
commit d533a2e580
15 changed files with 965 additions and 729 deletions

View file

@ -0,0 +1,85 @@
#ifndef RSGXSMETA_H
#define RSGXSMETA_H
#include <string>
#include "serialiser/rsserial.h"
#include "serialiser/rstlvbase.h"
#include "serialiser/rstlvtypes.h"
#include "serialiser/rstlvkeys.h"
class RsGxsGrpMetaData
{
public:
RsGxsGrpMetaData();
bool deserialise(void *data, uint32_t &pktsize);
bool serialise(void* data, uint32_t &pktsize);
uint32_t serial_size();
std::string mGroupId;
std::string mOrigGrpId;
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();
std::string mGroupId;
std::string mMsgId;
std::string mThreadId;
std::string mParentId;
std::string mOrigMsgId;
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