mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed up Identity requests.
- The GUI now displays the dummy Ids (once they've had time to generate ;) - Generation from the GUI appears broken! git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5757 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bd6b17a301
commit
563e3df91e
@ -79,9 +79,7 @@ IdDialog::IdDialog(QWidget *parent)
|
||||
timer->start(1000);
|
||||
|
||||
rsIdentity->generateDummyData();
|
||||
#if 0
|
||||
mIdQueue = new TokenQueue(rsIdentity, this);
|
||||
#endif
|
||||
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
||||
|
||||
}
|
||||
|
||||
@ -134,6 +132,7 @@ void IdDialog::blankSelection()
|
||||
void IdDialog::requestIdDetails(std::string &id)
|
||||
{
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
|
||||
uint32_t token;
|
||||
std::list<std::string> groupIds;
|
||||
@ -147,14 +146,22 @@ void IdDialog::insertIdDetails(uint32_t token)
|
||||
{
|
||||
/* get details from libretroshare */
|
||||
RsGxsIdGroup data;
|
||||
#if 0
|
||||
if (!rsIdentity->getGroupData(token, data))
|
||||
#endif
|
||||
std::vector<RsGxsIdGroup> datavector;
|
||||
if (!rsIdentity->getGroupData(token, datavector))
|
||||
{
|
||||
ui.lineEdit_KeyId->setText("ERROR GETTING KEY!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (datavector.size() != 1)
|
||||
{
|
||||
std::cerr << "IdDialog::insertIdDetails() Invalid datavector size";
|
||||
ui.lineEdit_KeyId->setText("INVALID DV SIZE");
|
||||
return;
|
||||
}
|
||||
|
||||
data = datavector[0];
|
||||
|
||||
/* get GPG Details from rsPeers */
|
||||
std::string gpgid = rsPeers->getGPGOwnId();
|
||||
RsPeerDetails details;
|
||||
@ -263,11 +270,13 @@ void IdDialog::OpenOrShowEditDialog()
|
||||
void IdDialog::requestIdList()
|
||||
{
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
|
||||
uint32_t token;
|
||||
std::list<std::string> groupIds;
|
||||
|
||||
mIdQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds, IDDIALOG_IDLIST);
|
||||
//mIdQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds, IDDIALOG_IDLIST);
|
||||
mIdQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, IDDIALOG_IDLIST);
|
||||
}
|
||||
|
||||
|
||||
@ -286,17 +295,19 @@ void IdDialog::insertIdList(uint32_t token)
|
||||
bool acceptFriends = ui.radioButton_ListFriends->isChecked();
|
||||
bool acceptOthers = ui.radioButton_ListOthers->isChecked();
|
||||
|
||||
//rsIdentity->getIdentityList(ids);
|
||||
|
||||
//for(it = ids.begin(); it != ids.end(); it++)
|
||||
//{
|
||||
RsGxsIdGroup data;
|
||||
#if 0
|
||||
while(rsIdentity->getGroupData(token, data))
|
||||
#else
|
||||
while(0)
|
||||
#endif
|
||||
std::vector<RsGxsIdGroup> datavector;
|
||||
std::vector<RsGxsIdGroup>::iterator vit;
|
||||
if (!rsIdentity->getGroupData(token, datavector))
|
||||
{
|
||||
std::cerr << "IdDialog::insertIdList() Error getting GroupData";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
for(vit = datavector.begin(); vit != datavector.end(); vit++)
|
||||
{
|
||||
data = (*vit);
|
||||
|
||||
/* do filtering */
|
||||
bool ok = false;
|
||||
|
@ -41,9 +41,7 @@ IdEditDialog::IdEditDialog(QWidget *parent)
|
||||
connect(ui.radioButton_Pseudo, SIGNAL( toggled( bool ) ), this, SLOT( IdTypeToggled( bool ) ) );
|
||||
connect(ui.pushButton_Update, SIGNAL( clicked( void ) ), this, SLOT( updateId( void ) ) );
|
||||
connect(ui.pushButton_Cancel, SIGNAL( clicked( void ) ), this, SLOT( cancelId( void ) ) );
|
||||
#if 0
|
||||
mIdQueue = new TokenQueue(rsIdentity, this);
|
||||
#endif
|
||||
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
||||
}
|
||||
|
||||
void IdEditDialog::setupNewId(bool pseudo)
|
||||
@ -123,11 +121,19 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
||||
ui.radioButton_Pseudo->setEnabled(false);
|
||||
|
||||
/* get details from libretroshare */
|
||||
RsGxsIdGroup data;
|
||||
#if 0
|
||||
if (!rsIdentity->getGroupData(token, data))
|
||||
#endif
|
||||
{
|
||||
RsGxsIdGroup data;
|
||||
std::vector<RsGxsIdGroup> datavector;
|
||||
if (!rsIdentity->getGroupData(token, datavector))
|
||||
{
|
||||
ui.lineEdit_KeyId->setText("ERROR GETTING KEY!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (datavector.size() != 1)
|
||||
{
|
||||
std::cerr << "IdDialog::insertIdDetails() Invalid datavector size";
|
||||
std::cerr << std::endl;
|
||||
|
||||
ui.lineEdit_KeyId->setText("ERROR KEYID INVALID");
|
||||
ui.lineEdit_Nickname->setText("");
|
||||
|
||||
@ -137,6 +143,9 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
||||
ui.lineEdit_GpgEmail->setText("N/A");
|
||||
return;
|
||||
}
|
||||
|
||||
data = datavector[0];
|
||||
|
||||
bool pseudo = (data.mIdType & RSID_TYPE_PSEUDONYM);
|
||||
|
||||
if (pseudo)
|
||||
|
Loading…
Reference in New Issue
Block a user