ID cleaning. Saving progress

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IdCleaning@7119 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-02-15 10:55:38 +00:00
parent fe96317b65
commit cf653b380f
9 changed files with 127 additions and 94 deletions

View file

@ -548,7 +548,7 @@ void ChatLobbyWidget::createChatLobby()
privacyLevel = action->data().toInt(); privacyLevel = action->data().toInt();
} }
std::list<std::string> friends; std::list<RsPeerId> friends;
CreateLobbyDialog(friends, privacyLevel).exec(); CreateLobbyDialog(friends, privacyLevel).exec();
} }

View file

@ -321,7 +321,7 @@ void NetworkDialog::denyFriend()
void NetworkDialog::makeFriend() void NetworkDialog::makeFriend()
{ {
ConfCertDialog::showIt(getCurrentNeighbour()->text(COLUMN_PEERID).toStdString(), ConfCertDialog::PageTrust); ConfCertDialog::showIt(RsPgpId(getCurrentNeighbour()->text(COLUMN_PEERID).toStdString()), ConfCertDialog::PageTrust);
} }
/** Shows Peer Information/Auth Dialog */ /** Shows Peer Information/Auth Dialog */
@ -331,7 +331,7 @@ void NetworkDialog::peerdetails()
if (item == NULL) { if (item == NULL) {
return; return;
} }
ConfCertDialog::showIt(item->text(COLUMN_PEERID).toStdString(), ConfCertDialog::PageDetails); ConfCertDialog::showIt(RsPgpId(item->text(COLUMN_PEERID).toStdString()), ConfCertDialog::PageDetails);
} }
void NetworkDialog::copyLink() void NetworkDialog::copyLink()

View file

@ -101,7 +101,7 @@ unsigned int ChatUserNotify::getNewCount()
void ChatUserNotify::iconClicked() void ChatUserNotify::iconClicked()
{ {
ChatDialog *chatDialog = NULL; ChatDialog *chatDialog = NULL;
std::list<std::string> ids; std::list<RsPeerId> ids;
if (rsMsgs->getPrivateChatQueueIds(true, ids) && ids.size()) { if (rsMsgs->getPrivateChatQueueIds(true, ids) && ids.size()) {
chatDialog = ChatDialog::getChat(ids.front(), RS_CHAT_OPEN | RS_CHAT_FOCUS); chatDialog = ChatDialog::getChat(ids.front(), RS_CHAT_OPEN | RS_CHAT_FOCUS);
} }

View file

@ -27,11 +27,12 @@
#include <retroshare/rsmsgs.h> #include <retroshare/rsmsgs.h>
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
#include <retroshare/rstypes.h>
#include "gui/common/PeerDefs.h" #include "gui/common/PeerDefs.h"
#include "ChatDialog.h" #include "ChatDialog.h"
CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& peer_list, int privacyLevel, QWidget *parent) : CreateLobbyDialog::CreateLobbyDialog(const std::list<RsPeerId>& peer_list, int privacyLevel, QWidget *parent) :
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
ui = new Ui::CreateLobbyDialog() ; ui = new Ui::CreateLobbyDialog() ;
@ -60,7 +61,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& peer_list, in
ui->keyShareList->setModus(FriendSelectionWidget::MODUS_CHECK); ui->keyShareList->setModus(FriendSelectionWidget::MODUS_CHECK);
ui->keyShareList->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL); ui->keyShareList->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL);
ui->keyShareList->start(); ui->keyShareList->start();
ui->keyShareList->setSelectedSslIds(peer_list, false); ui->keyShareList->setSelectedIds<RsPeerId,FriendSelectionWidget::IDTYPE_SSL>(peer_list, false);
if (privacyLevel) { if (privacyLevel) {
ui->security_CB->setCurrentIndex((privacyLevel == RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC) ? 0 : 1); ui->security_CB->setCurrentIndex((privacyLevel == RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC) ? 0 : 1);
@ -98,8 +99,8 @@ void CreateLobbyDialog::checkTextFields()
void CreateLobbyDialog::createLobby() void CreateLobbyDialog::createLobby()
{ {
std::list<std::string> shareList; std::list<RsPeerId> shareList;
ui->keyShareList->selectedSslIds(shareList, false); ui->keyShareList->selectedIds<RsPeerId,FriendSelectionWidget::IDTYPE_SSL>(shareList, false);
// if (shareList.empty()) { // if (shareList.empty()) {
// QMessageBox::warning(this, "RetroShare", tr("Please select at least one friend"), QMessageBox::Ok, QMessageBox::Ok); // QMessageBox::warning(this, "RetroShare", tr("Please select at least one friend"), QMessageBox::Ok, QMessageBox::Ok);
@ -123,7 +124,7 @@ void CreateLobbyDialog::createLobby()
rsMsgs->setNickNameForChatLobby(id,ui->nickName_LE->text().toUtf8().constData()) ; rsMsgs->setNickNameForChatLobby(id,ui->nickName_LE->text().toUtf8().constData()) ;
// open chat window !! // open chat window !!
std::string vpid ; RsPeerId vpid ;
if(rsMsgs->getVirtualPeerId(id,vpid)) if(rsMsgs->getVirtualPeerId(id,vpid))
ChatDialog::chatFriend(vpid) ; ChatDialog::chatFriend(vpid) ;

View file

@ -4,6 +4,7 @@
#include <QDialog> #include <QDialog>
#include "ui_CreateLobbyDialog.h" #include "ui_CreateLobbyDialog.h"
#include <retroshare/rstypes.h>
class CreateLobbyDialog : public QDialog { class CreateLobbyDialog : public QDialog {
Q_OBJECT Q_OBJECT
@ -12,7 +13,7 @@ public:
/* /*
*@param chanId The channel id to send request for *@param chanId The channel id to send request for
*/ */
CreateLobbyDialog(const std::list<std::string>& friends_list, int privacyLevel = 0, QWidget *parent = 0); CreateLobbyDialog(const std::list<RsPeerId>& friends_list, int privacyLevel = 0, QWidget *parent = 0);
~CreateLobbyDialog(); ~CreateLobbyDialog();
protected: protected:

View file

@ -47,7 +47,7 @@ public:
QString frameState(); QString frameState();
void setFrameType(FrameType type); void setFrameType(FrameType type);
void setId(const std::string& id, bool isGpg); void setId(const std::string &id, bool isGpg);
void setOwnId(); void setOwnId();
void setDefaultAvatar(const QString &avatar); void setDefaultAvatar(const QString &avatar);

View file

@ -77,13 +77,22 @@ public:
int selectedItemCount(); int selectedItemCount();
std::string selectedId(IdType &idType); std::string selectedId(IdType &idType);
void selectedSslIds(std::list<std::string> &sslIds, bool onlyDirectSelected) { selectedIds(IDTYPE_SSL, sslIds, onlyDirectSelected); }
void selectedGpgIds(std::list<std::string> &gpgIds, bool onlyDirectSelected) { selectedIds(IDTYPE_GPG, gpgIds, onlyDirectSelected); }
void selectedGroupIds(std::list<std::string> &groupIds) { selectedIds(IDTYPE_GROUP, groupIds, true); }
void setSelectedSslIds(const std::list<std::string> &sslIds, bool add) { setSelectedIds(IDTYPE_SSL, sslIds, add); } template<class ID_CLASS,FriendSelectionWidget::IdType TYPE> void selectedIds(std::list<ID_CLASS>& ids, bool onlyDirectSelected)
void setSelectedGpgIds(const std::list<std::string> &gpgIds, bool add) { setSelectedIds(IDTYPE_GPG, gpgIds, add); } {
void setSelectedGroupIds(const std::list<std::string> &groupIds, bool add) { setSelectedIds(IDTYPE_GROUP, groupIds, add); } std::list<std::string> tmpids ;
selectedIds(TYPE, tmpids, onlyDirectSelected);
ids.clear() ;
for(std::list<std::string>::const_iterator it(tmpids.begin());it!=tmpids.end();++it)
ids.push_back(ID_CLASS(*it)) ;
}
template<class ID_CLASS,FriendSelectionWidget::IdType TYPE> void setSelectedIds(const std::list<ID_CLASS>& ids, bool add)
{
std::list<std::string> tmpids ;
for(typename std::list<ID_CLASS>::const_iterator it(ids.begin());it!=ids.end();++it)
tmpids.push_back((*it).toStdString()) ;
setSelectedIds(TYPE, tmpids, add);
}
void itemsFromId(IdType idType, const std::string &id, QList<QTreeWidgetItem*> &items); void itemsFromId(IdType idType, const std::string &id, QList<QTreeWidgetItem*> &items);
void items(QList<QTreeWidgetItem*> &items, IdType = IDTYPE_NONE); void items(QList<QTreeWidgetItem*> &items, IdType = IDTYPE_NONE);

View file

@ -44,24 +44,42 @@
#include "util/DateTime.h" #include "util/DateTime.h"
#include "util/misc.h" #include "util/misc.h"
static QMap<std::string, ConfCertDialog*> instances; static QMap<RsPeerId, ConfCertDialog*> instances_ssl;
static QMap<RsPgpId, ConfCertDialog*> instances_pgp;
ConfCertDialog *ConfCertDialog::instance(const std::string& peer_id) ConfCertDialog *ConfCertDialog::instance(const RsPeerId& peer_id)
{ {
ConfCertDialog *d = instances[peer_id];
ConfCertDialog *d = instances_ssl[peer_id];
if (d) { if (d) {
return d; return d;
} }
d = new ConfCertDialog(peer_id); RsPeerDetails details ;
instances[peer_id] = d; if(!rsPeers->getPeerDetails(peer_id,details))
return NULL ;
d = new ConfCertDialog(peer_id,details.gpg_id);
instances_ssl[peer_id] = d;
return d; return d;
} }
ConfCertDialog *ConfCertDialog::instance(const RsPgpId& pgp_id)
{
ConfCertDialog *d = instances_pgp[pgp_id];
if (d) {
return d;
}
d = new ConfCertDialog(RsPeerId(),pgp_id);
instances_pgp[pgp_id] = d;
return d;
}
/** Default constructor */ /** Default constructor */
ConfCertDialog::ConfCertDialog(const std::string& id, QWidget *parent, Qt::WindowFlags flags) ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidget *parent, Qt::WindowFlags flags)
: QDialog(parent, flags), mId(id) : QDialog(parent, flags), peerId(id), pgpId(pgp_id)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
@ -97,42 +115,23 @@ ConfCertDialog::ConfCertDialog(const std::string& id, QWidget *parent, Qt::Windo
ConfCertDialog::~ConfCertDialog() ConfCertDialog::~ConfCertDialog()
{ {
QMap<std::string, ConfCertDialog*>::iterator it = instances.find(mId); if(peerId.isNull())
if (it != instances.end()) { {
instances.erase(it); QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.find(peerId);
if (it != instances_ssl.end())
instances_ssl.erase(it);
}
else
{
QMap<RsPgpId, ConfCertDialog*>::iterator it = instances_pgp.find(pgpId);
if (it != instances_pgp.end())
instances_pgp.erase(it);
} }
} }
void ConfCertDialog::showIt(const std::string& peer_id, enumPage page)
{
ConfCertDialog *confdialog = instance(peer_id);
switch (page) {
case PageDetails:
confdialog->ui.stabWidget->setCurrentIndex(0);
break;
case PageTrust:
confdialog->ui.stabWidget->setCurrentIndex(1);
break;
case PageCertificate:
confdialog->ui.stabWidget->setCurrentIndex(2);
break;
}
confdialog->load();
confdialog->show();
confdialog->raise();
confdialog->activateWindow();
/* window will destroy itself! */
}
void ConfCertDialog::setServiceFlags() void ConfCertDialog::setServiceFlags()
{ {
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(mId, detail))
return ;
ServicePermissionFlags flags(0) ; ServicePermissionFlags flags(0) ;
if(ui._anonymous_routing_CB->isChecked()) flags = flags | RS_SERVICE_PERM_TURTLE ; if(ui._anonymous_routing_CB->isChecked()) flags = flags | RS_SERVICE_PERM_TURTLE ;
@ -140,21 +139,22 @@ void ConfCertDialog::setServiceFlags()
if( ui._forums_channels_CB->isChecked()) flags = flags | RS_SERVICE_PERM_DISTRIB ; if( ui._forums_channels_CB->isChecked()) flags = flags | RS_SERVICE_PERM_DISTRIB ;
if( ui._direct_transfer_CB->isChecked()) flags = flags | RS_SERVICE_PERM_DIRECT_DL ; if( ui._direct_transfer_CB->isChecked()) flags = flags | RS_SERVICE_PERM_DIRECT_DL ;
rsPeers->setServicePermissionFlags(detail.gpg_id,flags) ; rsPeers->setServicePermissionFlags(pgpId,flags) ;
} }
void ConfCertDialog::loadAll() void ConfCertDialog::loadAll()
{ {
QMap<std::string, ConfCertDialog*>::iterator it; for(QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.begin(); it != instances_ssl.end(); it++) it.value()->load();
for (it = instances.begin(); it != instances.end(); it++) { for(QMap<RsPgpId , ConfCertDialog*>::iterator it = instances_pgp.begin(); it != instances_pgp.end(); it++) it.value()->load();
it.value()->load();
}
} }
void ConfCertDialog::load() void ConfCertDialog::load()
{ {
RsPeerDetails detail; RsPeerDetails detail;
if (!rsPeers->getPeerDetails(mId, detail))
bool ok = false ;
if(!(rsPeers->getPeerDetails(peerId, detail) || rsPeers->getGPGDetails(pgpId, detail)))
{ {
QMessageBox::information(this, QMessageBox::information(this,
tr("RetroShare"), tr("RetroShare"),
@ -163,7 +163,7 @@ void ConfCertDialog::load()
return; return;
} }
if(detail.isOnlyGPGdetail && !rsPeers->isKeySupported(mId)) if(detail.isOnlyGPGdetail && !rsPeers->isKeySupported(pgpId))
{ {
ui.make_friend_button->setEnabled(false) ; ui.make_friend_button->setEnabled(false) ;
ui.make_friend_button->setToolTip(tr("The supplied key algorithm is not supported by RetroShare\n(Only RSA keys are supported at the moment)")) ; ui.make_friend_button->setToolTip(tr("The supplied key algorithm is not supported by RetroShare\n(Only RSA keys are supported at the moment)")) ;
@ -180,17 +180,17 @@ void ConfCertDialog::load()
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_SERVICE_PERM_DIRECT_DL ) ; ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_SERVICE_PERM_DIRECT_DL ) ;
ui.name->setText(QString::fromUtf8(detail.name.c_str())); ui.name->setText(QString::fromUtf8(detail.name.c_str()));
ui.peerid->setText(QString::fromStdString(detail.id)); ui.peerid->setText(QString::fromStdString(detail.id.toStdString()));
RetroShareLink link; RetroShareLink link;
link.createPerson(detail.id); link.createPerson(detail.gpg_id);
ui.rsid->setText(link.toHtml()); ui.rsid->setText(link.toHtml());
ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr))); ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr.toStdString())));
ui.rsid->setToolTip(link.title()); ui.rsid->setToolTip(link.title());
if (!detail.isOnlyGPGdetail) { if (!detail.isOnlyGPGdetail) {
ui.avatar->setId(mId, false); ui.avatar->setId(peerId.toStdString(), false);
ui.loc->setText(QString::fromUtf8(detail.location.c_str())); ui.loc->setText(QString::fromUtf8(detail.location.c_str()));
// Dont Show a timestamp in RS calculate the day // Dont Show a timestamp in RS calculate the day
@ -259,7 +259,7 @@ void ConfCertDialog::load()
ui.pgpfingerprint->show(); ui.pgpfingerprint->show();
ui.pgpfingerprint_label->show(); ui.pgpfingerprint_label->show();
} else { } else {
ui.avatar->setId(mId, true); ui.avatar->setId(pgpId.toStdString(), true);
ui.rsid->show(); ui.rsid->show();
ui.peerid->hide(); ui.peerid->hide();
@ -387,7 +387,7 @@ void ConfCertDialog::load()
} }
QString text; QString text;
for(std::list<std::string>::const_iterator it(detail.gpgSigners.begin());it!=detail.gpgSigners.end();++it) { for(std::list<RsPgpId>::const_iterator it(detail.gpgSigners.begin());it!=detail.gpgSigners.end();++it) {
link.createPerson(*it); link.createPerson(*it);
if (link.valid()) { if (link.valid()) {
text += link.toHtml() + "<BR>"; text += link.toHtml() + "<BR>";
@ -401,7 +401,7 @@ void ConfCertDialog::load()
void ConfCertDialog::loadInvitePage() void ConfCertDialog::loadInvitePage()
{ {
RsPeerDetails detail; RsPeerDetails detail;
if (!rsPeers->getPeerDetails(mId, detail)) if (!rsPeers->getPeerDetails(peerId, detail))
{ {
QMessageBox::information(this, QMessageBox::information(this,
tr("RetroShare"), tr("RetroShare"),
@ -427,9 +427,9 @@ void ConfCertDialog::applyDialog()
{ {
std::cerr << "ConfCertDialog::applyDialog() called" << std::endl ; std::cerr << "ConfCertDialog::applyDialog() called" << std::endl ;
RsPeerDetails detail; RsPeerDetails detail;
if (!rsPeers->getPeerDetails(mId, detail)) if (!rsPeers->getPeerDetails(peerId, detail))
{ {
if (!rsPeers->getGPGDetails(mId, detail)) { if (!rsPeers->getGPGDetails(pgpId, detail)) {
QMessageBox::information(this, QMessageBox::information(this,
tr("RetroShare"), tr("RetroShare"),
tr("Error : cannot get peer details.")); tr("Error : cannot get peer details."));
@ -441,11 +441,11 @@ void ConfCertDialog::applyDialog()
//check the GPG trustlvl //check the GPG trustlvl
if (ui.radioButton_trust_fully->isChecked() && detail.trustLvl != RS_TRUST_LVL_FULL) { if (ui.radioButton_trust_fully->isChecked() && detail.trustLvl != RS_TRUST_LVL_FULL) {
//trust has changed to fully //trust has changed to fully
rsPeers->trustGPGCertificate(detail.id, RS_TRUST_LVL_FULL); rsPeers->trustGPGCertificate(pgpId, RS_TRUST_LVL_FULL);
} else if (ui.radioButton_trust_marginnaly->isChecked() && detail.trustLvl != RS_TRUST_LVL_MARGINAL) { } else if (ui.radioButton_trust_marginnaly->isChecked() && detail.trustLvl != RS_TRUST_LVL_MARGINAL) {
rsPeers->trustGPGCertificate(detail.id, RS_TRUST_LVL_MARGINAL); rsPeers->trustGPGCertificate(pgpId, RS_TRUST_LVL_MARGINAL);
} else if (ui.radioButton_trust_never->isChecked() && detail.trustLvl != RS_TRUST_LVL_NEVER) { } else if (ui.radioButton_trust_never->isChecked() && detail.trustLvl != RS_TRUST_LVL_NEVER) {
rsPeers->trustGPGCertificate(detail.id, RS_TRUST_LVL_NEVER); rsPeers->trustGPGCertificate(pgpId, RS_TRUST_LVL_NEVER);
} }
if (!detail.isOnlyGPGdetail) { if (!detail.isOnlyGPGdetail) {
@ -466,13 +466,13 @@ void ConfCertDialog::applyDialog()
/* now we can action the changes */ /* now we can action the changes */
if (localChanged) if (localChanged)
rsPeers->setLocalAddress(mId, ui.localAddress->text().toStdString(), ui.localPort->value()); rsPeers->setLocalAddress(peerId, ui.localAddress->text().toStdString(), ui.localPort->value());
if (extChanged) if (extChanged)
rsPeers->setExtAddress(mId,ui.extAddress->text().toStdString(), ui.extPort->value()); rsPeers->setExtAddress(peerId,ui.extAddress->text().toStdString(), ui.extPort->value());
if (dnsChanged) if (dnsChanged)
rsPeers->setDynDNS(mId, ui.dynDNS->text().toStdString()); rsPeers->setDynDNS(peerId, ui.dynDNS->text().toStdString());
if(localChanged || extChanged || dnsChanged) if(localChanged || extChanged || dnsChanged)
emit configChanged(); emit configChanged();
@ -486,12 +486,11 @@ void ConfCertDialog::applyDialog()
void ConfCertDialog::makeFriend() void ConfCertDialog::makeFriend()
{ {
std::string gpg_id = rsPeers->getGPGId(mId);
if (ui.signGPGKeyCheckBox->isChecked()) { if (ui.signGPGKeyCheckBox->isChecked()) {
rsPeers->signGPGCertificate(gpg_id); rsPeers->signGPGCertificate(pgpId);
} }
rsPeers->addFriend(mId, gpg_id); rsPeers->addFriend(peerId, pgpId);
setServiceFlags() ; setServiceFlags() ;
loadAll(); loadAll();
@ -500,8 +499,7 @@ void ConfCertDialog::makeFriend()
void ConfCertDialog::denyFriend() void ConfCertDialog::denyFriend()
{ {
std::string gpg_id = rsPeers->getGPGId(mId); rsPeers->removeFriend(pgpId);
rsPeers->removeFriend(gpg_id);
loadAll(); loadAll();
emit configChanged(); emit configChanged();
@ -509,8 +507,7 @@ void ConfCertDialog::denyFriend()
void ConfCertDialog::signGPGKey() void ConfCertDialog::signGPGKey()
{ {
std::string gpg_id = rsPeers->getGPGId(mId); if (!rsPeers->signGPGCertificate(pgpId)) {
if (!rsPeers->signGPGCertificate(gpg_id)) {
QMessageBox::warning ( NULL, QMessageBox::warning ( NULL,
tr("Signature Failure"), tr("Signature Failure"),
tr("Maybe password is wrong"), tr("Maybe password is wrong"),

View file

@ -26,6 +26,7 @@
#include <QDialog> #include <QDialog>
#include "ui_ConfCertDialog.h" #include "ui_ConfCertDialog.h"
#include <retroshare/rstypes.h>
class ConfCertDialog : public QDialog class ConfCertDialog : public QDialog
{ {
@ -34,7 +35,29 @@ class ConfCertDialog : public QDialog
public: public:
enum enumPage { PageDetails, PageTrust, PageCertificate }; enum enumPage { PageDetails, PageTrust, PageCertificate };
static void showIt(const std::string& id, enumPage page); template<class ID_CLASS> static void showIt(const ID_CLASS& id, enumPage page)
{
ConfCertDialog *confdialog = instance(id);
switch (page) {
case PageDetails:
confdialog->ui.stabWidget->setCurrentIndex(0);
break;
case PageTrust:
confdialog->ui.stabWidget->setCurrentIndex(1);
break;
case PageCertificate:
confdialog->ui.stabWidget->setCurrentIndex(2);
break;
}
confdialog->load();
confdialog->show();
confdialog->raise();
confdialog->activateWindow();
/* window will destroy itself! */
}
static void loadAll(); static void loadAll();
signals: signals:
@ -42,11 +65,12 @@ signals:
private: private:
/** Default constructor */ /** Default constructor */
ConfCertDialog(const std::string& id, QWidget *parent = 0, Qt::WindowFlags flags = 0); ConfCertDialog(const RsPeerId &id,const RsPgpId& pgp_id, QWidget *parent = 0, Qt::WindowFlags flags = 0);
/** Default destructor */ /** Default destructor */
~ConfCertDialog(); ~ConfCertDialog();
static ConfCertDialog *instance(const std::string& peer_id); static ConfCertDialog *instance(const RsPeerId &peer_id);
static ConfCertDialog *instance(const RsPgpId &pgp_id);
void load(); void load();
@ -63,7 +87,8 @@ private slots:
void showHelpDialog(const QString &topic); void showHelpDialog(const QString &topic);
private: private:
std::string mId; RsPeerId peerId;
RsPgpId pgpId;
/** Qt Designer generated object */ /** Qt Designer generated object */
Ui::ConfCertDialog ui; Ui::ConfCertDialog ui;