mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
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:
parent
083c4411b8
commit
bcf9f443b4
14 changed files with 660 additions and 49 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue