added option to RsTokReqOptions for group subscription filter

added code for rank calculation best,top, and newest (not enabled, not working yet...)
added variables for circles to grp meta type and modified storage and serialisation accordingly




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5930 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-12-02 19:40:17 +00:00
parent 083c4411b8
commit bcf9f443b4
14 changed files with 660 additions and 49 deletions

View file

@ -42,6 +42,10 @@
this->mGroupName = rGxsMeta.mGroupName;
this->mServiceString = rGxsMeta.mServiceString;
this->mSignFlags = rGxsMeta.mSignFlags;
this->mCircleId = rGxsMeta.mCircleId;
this->mCircleType = rGxsMeta.mCircleType;
this->mInternalCircle = rGxsMeta.mInternalCircle;
this->mOriginator = rGxsMeta.mOriginator;
}

View file

@ -34,6 +34,7 @@
class RsGxsGrpMetaData;
class RsGxsMsgMetaData;
class RsGroupMetaData
{
public:
@ -48,6 +49,7 @@ public:
mLastPost = 0;
mGroupStatus = 0;
mCircleType = 0;
//mPublishTs = 0;
}
@ -62,6 +64,10 @@ public:
time_t mPublishTs; // Mandatory.
std::string mAuthorId; // Optional.
// for circles
std::string mCircleId;
uint32_t mCircleType;
// BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG.
uint32_t mSubscribeFlags;
@ -72,6 +78,12 @@ public:
uint32_t mGroupStatus;
std::string mServiceString; // Service Specific Free-Form extra storage.
std::string mOriginator;
std::string mInternalCircle;
};

View file

@ -25,6 +25,7 @@
*/
#include "serialiser/rsposteditems.h"
#include "rsbaseserial.h"
uint32_t RsGxsPostedSerialiser::size(RsItem *item)
@ -154,6 +155,7 @@ uint32_t RsGxsPostedSerialiser::sizeGxsPostedVoteItem(RsGxsPostedVoteItem* item)
RsPostedVote& v = item->mVote;
uint32_t s = 8;
s += 1; // for vote direction
return s;
}
@ -289,7 +291,7 @@ bool RsGxsPostedSerialiser::serialiseGxsPostedVoteItem(RsGxsPostedVoteItem* item
/* skip the header */
offset += 8;
/* GxsPhotoAlbumItem */
ok &= setRawUInt32(data, tlvsize, &offset, item->mVote.mDirection);
if(offset != tlvsize)
{
@ -525,6 +527,8 @@ RsGxsPostedVoteItem* RsGxsPostedSerialiser::deserialiseGxsPostedVoteItem(void *d
/* skip the header */
offset += 8;
ok &= getRawUInt8(data, rssize, &offset, &(item->mVote.mDirection));
if (offset != rssize)
{
#ifdef GXS_POSTED_SERIAL_DEBUG