Improvements to Comment Handling and GxsChannels.

- Added Vote dummy data into channels.
 - Fixed up RsGxsImage handling to avoid memory issues - need to switch to shared_ptr later.
 - Added "BestScore" calculations into Comments - not sure if the maths is right.
 - Added Hashing interface to Channels.
 - misc bugfixes.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6218 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2013-03-13 00:24:57 +00:00
parent 4866c5585b
commit b9f2708927
7 changed files with 246 additions and 28 deletions

View file

@ -39,7 +39,7 @@ class RsGxsFile
std::string mName;
std::string mHash;
uint64_t mSize;
std::string mPath;
//std::string mPath;
};
class RsGxsImage
@ -47,6 +47,7 @@ class RsGxsImage
public:
RsGxsImage();
~RsGxsImage();
RsGxsImage(const RsGxsImage& a); // TEMP use copy constructor and duplicate memory.
//NB: Must make sure that we always use methods - to be consistent about malloc/free for this data.
static uint8_t *allocate(uint32_t size);
@ -59,6 +60,7 @@ static void release(void *data);
uint8_t *mData;
uint32_t mSize;
};
@ -83,10 +85,10 @@ class RsGxsComment
// below is calculated.
uint32_t mUpVotes;
uint32_t mDownVotes;
double score;
double mScore;
// This is filled in if detailed Comment Data is called.
std::list<RsGxsVote> votes;
std::list<RsGxsVote> mVotes;
};