laptop power supply dead, commiting,

added tokens to submissions, got it working
added generic service string to meta
added msg and grp creation
 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5439 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-08-18 10:01:35 +00:00
parent 34ffb229e4
commit 5425ab36b5
19 changed files with 500 additions and 77 deletions

View file

@ -136,12 +136,12 @@ bool p3PhotoServiceV2::getPhoto(const uint32_t& token, PhotoResult& photos)
}
bool p3PhotoServiceV2::submitAlbumDetails(RsPhotoAlbum& album)
bool p3PhotoServiceV2::submitAlbumDetails(uint32_t& token, RsPhotoAlbum& album)
{
RsGxsPhotoAlbumItem* albumItem = new RsGxsPhotoAlbumItem();
albumItem->album = album;
albumItem->meta = album.mMeta;
return RsGenExchange::publishGroup(albumItem);
return RsGenExchange::publishGroup(token, albumItem);
}
@ -170,13 +170,27 @@ void p3PhotoServiceV2::notifyChanges(std::vector<RsGxsNotify*>& changes)
}
}
bool p3PhotoServiceV2::submitPhoto(RsPhotoPhoto& photo)
bool p3PhotoServiceV2::submitPhoto(uint32_t& token, RsPhotoPhoto& photo)
{
RsGxsPhotoPhotoItem* photoItem = new RsGxsPhotoPhotoItem();
photoItem->photo = photo;
photoItem->meta = photo.mMeta;
return RsGenExchange::publishMsg(photoItem);
return RsGenExchange::publishMsg(token, photoItem);
}
bool p3PhotoServiceV2::acknowledgeMsg(const uint32_t& token,
std::pair<RsGxsGroupId, RsGxsMessageId>& msgId)
{
return RsGenExchange::acknowledgeTokenMsg(token, msgId);
}
bool p3PhotoServiceV2::acknowledgeGrp(const uint32_t& token,
RsGxsGroupId& grpId)
{
return RsGenExchange::acknowledgeTokenGrp(token, grpId);
}

View file

@ -78,8 +78,26 @@ public:
/** Modifications **/
bool submitAlbumDetails(RsPhotoAlbum &album);
bool submitPhoto(RsPhotoPhoto &photo);
bool submitAlbumDetails(uint32_t& token, RsPhotoAlbum &album);
bool submitPhoto(uint32_t& token, RsPhotoPhoto &photo);
/*!
* This allows the client service to acknowledge that their msgs has
* been created/modified and retrieve the create/modified msg ids
* @param token the token related to modification/create request
* @param msgIds map of grpid->msgIds of message created/modified
* @return true if token exists false otherwise
*/
bool acknowledgeMsg(const uint32_t& token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId);
/*!
* This allows the client service to acknowledge that their grps has
* been created/modified and retrieve the create/modified grp ids
* @param token the token related to modification/create request
* @param msgIds vector of ids of groups created/modified
* @return true if token exists false otherwise
*/
bool acknowledgeGrp(const uint32_t& token, RsGxsGroupId& grpId);
private: