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);
|
timer->start(1000);
|
||||||
|
|
||||||
rsIdentity->generateDummyData();
|
rsIdentity->generateDummyData();
|
||||||
#if 0
|
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
||||||
mIdQueue = new TokenQueue(rsIdentity, this);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,6 +132,7 @@ void IdDialog::blankSelection()
|
|||||||
void IdDialog::requestIdDetails(std::string &id)
|
void IdDialog::requestIdDetails(std::string &id)
|
||||||
{
|
{
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
|
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
std::list<std::string> groupIds;
|
std::list<std::string> groupIds;
|
||||||
@ -147,14 +146,22 @@ void IdDialog::insertIdDetails(uint32_t token)
|
|||||||
{
|
{
|
||||||
/* get details from libretroshare */
|
/* get details from libretroshare */
|
||||||
RsGxsIdGroup data;
|
RsGxsIdGroup data;
|
||||||
#if 0
|
std::vector<RsGxsIdGroup> datavector;
|
||||||
if (!rsIdentity->getGroupData(token, data))
|
if (!rsIdentity->getGroupData(token, datavector))
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
ui.lineEdit_KeyId->setText("ERROR GETTING KEY!");
|
ui.lineEdit_KeyId->setText("ERROR GETTING KEY!");
|
||||||
return;
|
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 */
|
/* get GPG Details from rsPeers */
|
||||||
std::string gpgid = rsPeers->getGPGOwnId();
|
std::string gpgid = rsPeers->getGPGOwnId();
|
||||||
RsPeerDetails details;
|
RsPeerDetails details;
|
||||||
@ -263,11 +270,13 @@ void IdDialog::OpenOrShowEditDialog()
|
|||||||
void IdDialog::requestIdList()
|
void IdDialog::requestIdList()
|
||||||
{
|
{
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
|
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
std::list<std::string> groupIds;
|
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 acceptFriends = ui.radioButton_ListFriends->isChecked();
|
||||||
bool acceptOthers = ui.radioButton_ListOthers->isChecked();
|
bool acceptOthers = ui.radioButton_ListOthers->isChecked();
|
||||||
|
|
||||||
//rsIdentity->getIdentityList(ids);
|
|
||||||
|
|
||||||
//for(it = ids.begin(); it != ids.end(); it++)
|
|
||||||
//{
|
|
||||||
RsGxsIdGroup data;
|
RsGxsIdGroup data;
|
||||||
#if 0
|
std::vector<RsGxsIdGroup> datavector;
|
||||||
while(rsIdentity->getGroupData(token, data))
|
std::vector<RsGxsIdGroup>::iterator vit;
|
||||||
#else
|
if (!rsIdentity->getGroupData(token, datavector))
|
||||||
while(0)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
std::cerr << "IdDialog::insertIdList() Error getting GroupData";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(vit = datavector.begin(); vit != datavector.end(); vit++)
|
||||||
|
{
|
||||||
|
data = (*vit);
|
||||||
|
|
||||||
/* do filtering */
|
/* do filtering */
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
@ -41,9 +41,7 @@ IdEditDialog::IdEditDialog(QWidget *parent)
|
|||||||
connect(ui.radioButton_Pseudo, SIGNAL( toggled( bool ) ), this, SLOT( IdTypeToggled( bool ) ) );
|
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_Update, SIGNAL( clicked( void ) ), this, SLOT( updateId( void ) ) );
|
||||||
connect(ui.pushButton_Cancel, SIGNAL( clicked( void ) ), this, SLOT( cancelId( void ) ) );
|
connect(ui.pushButton_Cancel, SIGNAL( clicked( void ) ), this, SLOT( cancelId( void ) ) );
|
||||||
#if 0
|
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
||||||
mIdQueue = new TokenQueue(rsIdentity, this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IdEditDialog::setupNewId(bool pseudo)
|
void IdEditDialog::setupNewId(bool pseudo)
|
||||||
@ -123,11 +121,19 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
|||||||
ui.radioButton_Pseudo->setEnabled(false);
|
ui.radioButton_Pseudo->setEnabled(false);
|
||||||
|
|
||||||
/* get details from libretroshare */
|
/* get details from libretroshare */
|
||||||
RsGxsIdGroup data;
|
RsGxsIdGroup data;
|
||||||
#if 0
|
std::vector<RsGxsIdGroup> datavector;
|
||||||
if (!rsIdentity->getGroupData(token, data))
|
if (!rsIdentity->getGroupData(token, datavector))
|
||||||
#endif
|
{
|
||||||
{
|
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_KeyId->setText("ERROR KEYID INVALID");
|
||||||
ui.lineEdit_Nickname->setText("");
|
ui.lineEdit_Nickname->setText("");
|
||||||
|
|
||||||
@ -137,6 +143,9 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
|||||||
ui.lineEdit_GpgEmail->setText("N/A");
|
ui.lineEdit_GpgEmail->setText("N/A");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data = datavector[0];
|
||||||
|
|
||||||
bool pseudo = (data.mIdType & RSID_TYPE_PSEUDONYM);
|
bool pseudo = (data.mIdType & RSID_TYPE_PSEUDONYM);
|
||||||
|
|
||||||
if (pseudo)
|
if (pseudo)
|
||||||
|
Loading…
Reference in New Issue
Block a user