Bug fix for ES_GXS_MSG_COMMENTS option

Fix for run thread loop of RsGenExchange (was using logic rather than isRunning, which led to some crashes on rs close

Added request and get MsgRelated function for ids, meta and data 
added template function to ease getting meta data from back end;

Updated Nxs tests, tests passed (failed initially because of change option requirements)
Added test for msgrelated Ids, still need to add test for all msgRelated functions (bug with mask, not filtering correctly)

Made changes for forum and wiki gui to use new API but gui needs to call correct get functions now (Bob).

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5817 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-11-13 22:36:06 +00:00
parent 8d556955c5
commit f74a328d61
27 changed files with 872 additions and 310 deletions

View file

@ -153,11 +153,16 @@ class RsPhotoAlbum
uint32_t mModFlags;
};
class RsGxsPhotoCommentItem;
class RsPhotoComment
{
public:
RsPhotoComment();
RsPhotoComment(const RsGxsPhotoCommentItem& comment);
RsPhotoComment& operator=(const RsGxsPhotoCommentItem& comment);
RsMsgMetaData mMeta;
std::string mComment;
@ -169,6 +174,7 @@ std::ostream &operator<<(std::ostream &out, const RsPhotoAlbum &album);
typedef std::map<RsGxsGroupId, std::vector<RsPhotoPhoto> > PhotoResult;
typedef std::map<RsGxsGroupId, std::vector<RsPhotoComment> > PhotoCommentResult;
typedef std::map<RsGxsGrpMsgIdPair, std::vector<RsPhotoComment> > PhotoRelatedCommentResult;
class RsPhotoV2
{
@ -273,6 +279,12 @@ public:
*/
virtual bool getPhotoComment(const uint32_t &token,
PhotoCommentResult& comments) = 0;
/*!
* @param token token to be redeemed for photo request
* @param photo the photo returned for given request token
* @return false if request token is invalid, check token status for error report
*/
virtual bool getPhotoRelatedComment(const uint32_t &token, PhotoRelatedCommentResult &comments) = 0;
/*!
* submits album, which returns a token that needs