mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-29 11:56:37 -05:00
Got group retrieval working with gui and fixed subsequent bugs
add p3distribsecurity mirror gxssecurity (does not have grp or msg verification implemented, but other methods are valid) git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5406 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
148d1310a2
commit
acaefada65
12 changed files with 1166 additions and 762 deletions
|
|
@ -331,12 +331,8 @@ void PhotoAddDialog::publishAlbum()
|
|||
std::cerr << "PhotoAddDialog::publishAlbum() New Album Mode Submitting.....";
|
||||
std::cerr << std::endl;
|
||||
|
||||
uint32_t token;
|
||||
rsPhotoV2->submitAlbumDetails(album);
|
||||
|
||||
// tell tokenQueue to expect results from submission.
|
||||
mPhotoQueue->queueRequest(token, TOKENREQ_GROUPINFO, RS_TOKREQ_ANSTYPE_SUMMARY, 0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -408,7 +404,6 @@ void PhotoAddDialog::publishPhotos(std::string albumId)
|
|||
|
||||
std::cerr << "PhotoAddDialog::publishAlbum() Photo(" << i << ") ";
|
||||
|
||||
uint32_t token;
|
||||
if (isNewPhoto)
|
||||
{
|
||||
std::cerr << "Is a New Photo";
|
||||
|
|
|
|||
|
|
@ -145,7 +145,15 @@ void PhotoDialog::checkUpdate()
|
|||
if (rsPhotoV2->updated())
|
||||
{
|
||||
//insertAlbums();
|
||||
requestAlbumList();
|
||||
std::list<std::string> grpIds;
|
||||
rsPhotoV2->groupsChanged(grpIds);
|
||||
if(!grpIds.empty())
|
||||
requestAlbumList(grpIds);
|
||||
|
||||
GxsMsgIdResult res;
|
||||
rsPhotoV2->msgsChanged(res);
|
||||
if(!res.empty())
|
||||
requestPhotoList(res);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -427,15 +435,23 @@ void PhotoDialog::deletePhotoItem(PhotoItem *item, uint32_t type)
|
|||
/**************************** Request / Response Filling of Data ************************/
|
||||
|
||||
|
||||
void PhotoDialog::requestAlbumList()
|
||||
void PhotoDialog::requestAlbumList(std::list<std::string>& ids)
|
||||
{
|
||||
|
||||
std::list<std::string> ids;
|
||||
RsTokReqOptionsV2 opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_IDS;
|
||||
uint32_t token;
|
||||
mPhotoQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_LIST, opts, ids, 0);
|
||||
}
|
||||
|
||||
void PhotoDialog::requestPhotoList(GxsMsgReq& req)
|
||||
{
|
||||
RsTokReqOptionsV2 opts;
|
||||
uint32_t token;
|
||||
mPhotoQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_LIST, opts, req, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void PhotoDialog::loadAlbumList(const uint32_t &token)
|
||||
{
|
||||
|
|
@ -461,6 +477,7 @@ void PhotoDialog::requestAlbumData(std::list<std::string> &ids)
|
|||
{
|
||||
RsTokReqOptionsV2 opts;
|
||||
uint32_t token;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
mPhotoQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, ids, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,8 +58,9 @@ private slots:
|
|||
private:
|
||||
|
||||
/* Request Response Functions for loading data */
|
||||
void requestAlbumList();
|
||||
void requestAlbumList(std::list<std::string>& ids);
|
||||
void requestAlbumData(std::list<std::string> &ids);
|
||||
void requestPhotoList(GxsMsgReq &albumIds);
|
||||
void requestPhotoList(const std::string &albumId);
|
||||
void requestPhotoData(GxsMsgReq &photoIds);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue