Recommiting from old repo:

commit msg from last:

Fixed minor bug in group creation
msg now set to unread and unprocessed on creation (added read flag in gxsflags.h also)
Got topic and post generation working 

Additional changes:

Voting update now working

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5951 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-12-08 21:50:13 +00:00
parent 0c49fba4d8
commit 6527aaf2d8
8 changed files with 323 additions and 215 deletions

View file

@ -1264,6 +1264,7 @@ void RsGenExchange::publishMsgs()
msg->metaData->serialise(metaDataBuff, &size);
msg->meta.setBinData(metaDataBuff, size);
msg->metaData->mMsgStatus = GXS_SERV::GXS_MSG_STATUS_UNPROCESSED | GXS_SERV::GXS_MSG_STATUS_UNREAD;
msgId = msg->msgId;
grpId = msg->grpId;
mDataAccess->addMsgData(msg);
@ -1322,9 +1323,11 @@ void RsGenExchange::publishGrps()
int i = 0;
for(; mit != mGrpsToPublish.end(); mit++)
{
if(i > GEN_EXCH_GRP_CHUNK-1) break;
toRemove.push_back(mit->first);
i++;
if(i > GEN_EXCH_GRP_CHUNK) break;
RsNxsGrp* grp = new RsNxsGrp(mServType);
RsGxsGrpItem* grpItem = mit->second;

View file

@ -403,20 +403,20 @@ public:
void setGroupServiceString(uint32_t& token, const RsGxsGroupId& grpId, const std::string& servString);
/*!
* sets the msg status flag
* @param token this is set to token value associated to this request
* @param grpId Id of group whose subscribe file will be changed
* @param status
* @param mask Mask to apply to status flag
*/
* sets the msg status flag
* @param token this is set to token value associated to this request
* @param grpId Id of group whose subscribe file will be changed
* @param status
* @param mask Mask to apply to status flag
*/
void setMsgStatusFlags(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, const uint32_t& status, const uint32_t& mask);
/*!
* sets the message service string
* @param token this is set to token value associated to this request
* @param msgId Id of message whose service string will be changed
* @param servString The service string to set msg to
*/
* sets the message service string
* @param token this is set to token value associated to this request
* @param msgId Id of message whose service string will be changed
* @param servString The service string to set msg to
*/
void setMsgServiceString(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, const std::string& servString );
protected:

View file

@ -91,6 +91,8 @@ namespace GXS_SERV {
static const uint32_t GXS_MSG_STATUS_UNREAD = 0x00000200;
static const uint32_t GXS_MSG_STATUS_READ = 0x00000400;
/** END GXS Msg status flags **/
/** START GXS Grp status flags **/