added method to get list of existing private chat links

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-GenericTunneling@6306 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-04-14 15:05:24 +00:00
parent e7871b598b
commit 5a889eb1cd
7 changed files with 56 additions and 3 deletions

View file

@ -72,6 +72,24 @@ void CreateMsgLinkDialog::update()
_info_TB->setHtml(s) ;
_gpg_selection->setHidden(true) ;
}
std::vector<DistantChatInviteInfo> invites ;
rsMsgs->getDistantChatInviteList(invites) ;
_existing_links_LW->clear() ;
for(uint32_t i=0;i<invites.size();++i)
{
RetroShareLink link ;
if(!link.createPrivateChatInvite(invites[i].time_of_validity,QString::fromStdString(invites[i].destination_pgp_id),QString::fromStdString(invites[i].encrypted_radix64_string)))
std::cerr << "Cannot create link." << std::endl;
QListWidgetItem *item = new QListWidgetItem(link.toString()) ;
_existing_links_LW->insertItem(0,item) ;
}
}
time_t CreateMsgLinkDialog::computeValidityDuration() const
@ -124,7 +142,6 @@ void CreateMsgLinkDialog::createLink()
QMessageBox::critical(NULL,tr("Private chat invite creation failed"),tr("The creation of the chat invite failed")) ;
else
QMessageBox::information(NULL,tr("Private chat invite created"),tr("Your new chat invite has been copied to clipboard. You can now paste it as a Retroshare link.")) ;
}
else
{