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

@ -171,7 +171,8 @@ bool RsGxsChannelGroupItem::toChannelGroup(RsGxsChannelGroup &group, bool moveIm
if (moveImage)
{
group.mImage.take((uint8_t *) mImage.binData.bin_data, mImage.binData.bin_len);
mImage.TlvShallowClear();
// mImage doesn't have a ShallowClear at the moment!
mImage.binData.TlvShallowClear();
}
else
{
@ -376,7 +377,8 @@ bool RsGxsChannelPostItem::toChannelPost(RsGxsChannelPost &post, bool moveImage)
if (moveImage)
{
post.mThumbnail.take((uint8_t *) mThumbnail.binData.bin_data, mThumbnail.binData.bin_len);
mThumbnail.TlvShallowClear();
// mThumbnail doesn't have a ShallowClear at the moment!
mThumbnail.binData.TlvShallowClear();
}
else
{
@ -392,7 +394,6 @@ bool RsGxsChannelPostItem::toChannelPost(RsGxsChannelPost &post, bool moveImage)
fi.mName = RsDirUtil::getTopDir(fit->name);
fi.mSize = fit->filesize;
fi.mHash = fit->hash;
fi.mPath = fit->path;
post.mFiles.push_back(fi);
post.mCount++;