2012-02-13 13:43:15 -05:00
|
|
|
/*
|
|
|
|
* Retroshare Identity.
|
|
|
|
*
|
|
|
|
* Copyright 2012-2012 by Robert Fernie.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License Version 2.1 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA.
|
|
|
|
*
|
|
|
|
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "IdDialog.h"
|
|
|
|
|
|
|
|
#include <retroshare/rspeers.h>
|
|
|
|
#include <retroshare/rsidentity.h>
|
2013-02-28 16:58:38 -05:00
|
|
|
#include "retroshare/rsgxsflags.h"
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <sstream>
|
|
|
|
|
|
|
|
#include <QTimer>
|
|
|
|
|
|
|
|
/******
|
|
|
|
* #define ID_DEBUG 1
|
|
|
|
*****/
|
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
// Data Requests.
|
|
|
|
#define IDDIALOG_IDLIST 1
|
|
|
|
#define IDDIALOG_IDDETAILS 2
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
/****************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#define RSID_COL_NICKNAME 0
|
|
|
|
#define RSID_COL_KEYID 1
|
|
|
|
#define RSID_COL_IDTYPE 2
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
#define RSID_REQ_IDLIST 1
|
|
|
|
#define RSID_REQ_IDDETAILS 2
|
|
|
|
#define RSID_REQ_IDLISTDATA 3
|
|
|
|
#define RSID_REQ_IDEDIT 4
|
|
|
|
|
2012-02-13 13:43:15 -05:00
|
|
|
/** Constructor */
|
|
|
|
IdDialog::IdDialog(QWidget *parent)
|
|
|
|
: MainPage(parent)
|
|
|
|
{
|
|
|
|
ui.setupUi(this);
|
|
|
|
|
|
|
|
mEditDialog = NULL;
|
|
|
|
//mPulseSelected = NULL;
|
|
|
|
|
|
|
|
ui.radioButton_ListAll->setChecked(true);
|
|
|
|
connect( ui.pushButton_NewId, SIGNAL(clicked()), this, SLOT(OpenOrShowAddDialog()));
|
|
|
|
connect( ui.pushButton_EditId, SIGNAL(clicked()), this, SLOT(OpenOrShowEditDialog()));
|
|
|
|
connect( ui.treeWidget_IdList, SIGNAL(itemSelectionChanged()), this, SLOT(updateSelection()));
|
|
|
|
|
|
|
|
connect( ui.radioButton_ListYourself, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) );
|
|
|
|
connect( ui.radioButton_ListFriends, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) );
|
|
|
|
connect( ui.radioButton_ListOthers, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) );
|
|
|
|
connect( ui.radioButton_ListPseudo, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) );
|
|
|
|
connect( ui.radioButton_ListAll, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) );
|
|
|
|
|
|
|
|
QTimer *timer = new QTimer(this);
|
|
|
|
timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate()));
|
|
|
|
timer->start(1000);
|
|
|
|
|
2012-11-01 20:49:06 -04:00
|
|
|
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void IdDialog::ListTypeToggled(bool checked)
|
|
|
|
{
|
|
|
|
if (checked)
|
|
|
|
{
|
2012-06-07 13:11:57 -04:00
|
|
|
requestIdList();
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void IdDialog::updateSelection()
|
|
|
|
{
|
|
|
|
/* */
|
|
|
|
QTreeWidgetItem *item = ui.treeWidget_IdList->currentItem();
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
{
|
2012-06-07 13:11:57 -04:00
|
|
|
blankSelection();
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-06-07 13:11:57 -04:00
|
|
|
std::string id = item->text(RSID_COL_KEYID).toStdString();
|
|
|
|
requestIdDetails(id);
|
|
|
|
}
|
|
|
|
}
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
void IdDialog::blankSelection()
|
|
|
|
{
|
|
|
|
/* blank it all - and fix buttons */
|
|
|
|
ui.lineEdit_Nickname->setText("");
|
|
|
|
ui.lineEdit_KeyId->setText("");
|
|
|
|
ui.lineEdit_GpgHash->setText("");
|
|
|
|
ui.lineEdit_GpgId->setText("");
|
|
|
|
ui.lineEdit_GpgName->setText("");
|
|
|
|
ui.lineEdit_GpgEmail->setText("");
|
|
|
|
|
|
|
|
ui.pushButton_Reputation->setEnabled(false);
|
|
|
|
ui.pushButton_Delete->setEnabled(false);
|
|
|
|
ui.pushButton_EditId->setEnabled(false);
|
|
|
|
ui.pushButton_NewId->setEnabled(true);
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
void IdDialog::requestIdDetails(std::string &id)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-06-13 20:36:25 -04:00
|
|
|
RsTokReqOptions opts;
|
2012-11-01 20:49:06 -04:00
|
|
|
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
uint32_t token;
|
|
|
|
std::list<std::string> groupIds;
|
|
|
|
groupIds.push_back(id);
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
mIdQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds, IDDIALOG_IDDETAILS);
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
|
|
|
|
void IdDialog::insertIdDetails(uint32_t token)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-06-07 13:11:57 -04:00
|
|
|
/* get details from libretroshare */
|
2012-10-31 19:32:56 -04:00
|
|
|
RsGxsIdGroup data;
|
2012-11-01 20:49:06 -04:00
|
|
|
std::vector<RsGxsIdGroup> datavector;
|
|
|
|
if (!rsIdentity->getGroupData(token, datavector))
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-06-07 13:11:57 -04:00
|
|
|
ui.lineEdit_KeyId->setText("ERROR GETTING KEY!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-11-01 20:49:06 -04:00
|
|
|
if (datavector.size() != 1)
|
|
|
|
{
|
|
|
|
std::cerr << "IdDialog::insertIdDetails() Invalid datavector size";
|
|
|
|
ui.lineEdit_KeyId->setText("INVALID DV SIZE");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
data = datavector[0];
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
/* get GPG Details from rsPeers */
|
2012-11-06 14:18:56 -05:00
|
|
|
std::string ownPgpId = rsPeers->getGPGOwnId();
|
2012-06-07 13:11:57 -04:00
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
ui.lineEdit_Nickname->setText(QString::fromStdString(data.mMeta.mGroupName));
|
|
|
|
ui.lineEdit_KeyId->setText(QString::fromStdString(data.mMeta.mGroupId));
|
2012-11-05 17:32:52 -05:00
|
|
|
ui.lineEdit_GpgHash->setText(QString::fromStdString(data.mPgpIdHash));
|
2012-11-06 14:18:56 -05:00
|
|
|
ui.lineEdit_GpgId->setText(QString::fromStdString(data.mPgpId));
|
2012-11-05 17:32:52 -05:00
|
|
|
|
2012-11-06 14:18:56 -05:00
|
|
|
if (data.mPgpKnown)
|
2012-06-07 13:11:57 -04:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
RsPeerDetails details;
|
|
|
|
rsPeers->getGPGDetails(data.mPgpId, details);
|
|
|
|
ui.lineEdit_GpgName->setText(QString::fromStdString(details.name));
|
|
|
|
ui.lineEdit_GpgEmail->setText(QString::fromStdString(details.email));
|
2012-06-07 13:11:57 -04:00
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
else
|
2012-06-07 13:11:57 -04:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID)
|
|
|
|
{
|
|
|
|
ui.lineEdit_GpgName->setText("Unknown Real Name");
|
|
|
|
ui.lineEdit_GpgEmail->setText("Unknown Email");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui.lineEdit_GpgName->setText("Anonymous Id");
|
|
|
|
ui.lineEdit_GpgEmail->setText("-- N/A --");
|
|
|
|
}
|
2012-06-07 13:11:57 -04:00
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
|
|
|
|
bool isOwnId = (data.mPgpKnown && (data.mPgpId == ownPgpId)) ||
|
|
|
|
(data.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
|
|
|
|
|
|
|
if (isOwnId)
|
2012-06-07 13:11:57 -04:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
ui.radioButton_IdYourself->setChecked(true);
|
2012-06-07 13:11:57 -04:00
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
else if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID)
|
2012-06-07 13:11:57 -04:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
if (data.mPgpKnown)
|
|
|
|
{
|
|
|
|
if (rsPeers->isGPGAccepted(data.mPgpId))
|
|
|
|
{
|
|
|
|
ui.radioButton_IdFriend->setChecked(true);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui.radioButton_IdFOF->setChecked(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui.radioButton_IdOther->setChecked(true);
|
|
|
|
}
|
2012-06-07 13:11:57 -04:00
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
else
|
2012-06-07 13:11:57 -04:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
ui.radioButton_IdPseudo->setChecked(true);
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
ui.pushButton_NewId->setEnabled(true);
|
2012-11-06 14:18:56 -05:00
|
|
|
|
|
|
|
if (isOwnId)
|
2012-06-07 13:11:57 -04:00
|
|
|
{
|
|
|
|
ui.pushButton_Reputation->setEnabled(false);
|
|
|
|
ui.pushButton_Delete->setEnabled(true);
|
2012-11-07 16:40:07 -05:00
|
|
|
// No Editing Ids yet!
|
|
|
|
//ui.pushButton_EditId->setEnabled(true);
|
2012-06-07 13:11:57 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui.pushButton_Reputation->setEnabled(true);
|
|
|
|
ui.pushButton_Delete->setEnabled(false);
|
|
|
|
ui.pushButton_EditId->setEnabled(false);
|
|
|
|
}
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void IdDialog::checkUpdate()
|
|
|
|
{
|
|
|
|
/* update */
|
|
|
|
if (!rsIdentity)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (rsIdentity->updated())
|
|
|
|
{
|
2012-06-07 13:11:57 -04:00
|
|
|
requestIdList();
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IdDialog::OpenOrShowAddDialog()
|
|
|
|
{
|
|
|
|
if (!mEditDialog)
|
|
|
|
{
|
|
|
|
mEditDialog = new IdEditDialog(NULL);
|
|
|
|
}
|
|
|
|
bool pseudo = false;
|
|
|
|
mEditDialog->setupNewId(pseudo);
|
|
|
|
|
|
|
|
mEditDialog->show();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IdDialog::OpenOrShowEditDialog()
|
|
|
|
{
|
|
|
|
if (!mEditDialog)
|
|
|
|
{
|
|
|
|
mEditDialog = new IdEditDialog(NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* */
|
|
|
|
QTreeWidgetItem *item = ui.treeWidget_IdList->currentItem();
|
|
|
|
|
|
|
|
if (!item)
|
|
|
|
{
|
|
|
|
std::cerr << "IdDialog::OpenOrShowEditDialog() Invalid item";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string keyId = item->text(RSID_COL_KEYID).toStdString();
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
if (mEditDialog)
|
|
|
|
{
|
2012-06-13 20:36:25 -04:00
|
|
|
mEditDialog->setupExistingId(keyId);
|
2012-06-07 13:11:57 -04:00
|
|
|
mEditDialog->show();
|
|
|
|
}
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
void IdDialog::requestIdList()
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-06-13 20:36:25 -04:00
|
|
|
RsTokReqOptions opts;
|
2012-11-01 20:49:06 -04:00
|
|
|
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
uint32_t token;
|
2012-06-13 20:36:25 -04:00
|
|
|
std::list<std::string> groupIds;
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-11-01 20:49:06 -04:00
|
|
|
//mIdQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds, IDDIALOG_IDLIST);
|
|
|
|
mIdQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, IDDIALOG_IDLIST);
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
void IdDialog::insertIdList(uint32_t token)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
|
|
|
QTreeWidget *tree = ui.treeWidget_IdList;
|
|
|
|
|
|
|
|
tree->clear();
|
|
|
|
|
|
|
|
std::list<std::string> ids;
|
|
|
|
std::list<std::string>::iterator it;
|
|
|
|
|
|
|
|
bool acceptAll = ui.radioButton_ListAll->isChecked();
|
|
|
|
bool acceptPseudo = ui.radioButton_ListPseudo->isChecked();
|
|
|
|
bool acceptYourself = ui.radioButton_ListYourself->isChecked();
|
|
|
|
bool acceptFriends = ui.radioButton_ListFriends->isChecked();
|
|
|
|
bool acceptOthers = ui.radioButton_ListOthers->isChecked();
|
|
|
|
|
2012-10-31 19:32:56 -04:00
|
|
|
RsGxsIdGroup data;
|
2012-11-01 20:49:06 -04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2012-11-06 14:18:56 -05:00
|
|
|
std::string ownPgpId = rsPeers->getGPGOwnId();
|
|
|
|
|
2012-11-01 20:49:06 -04:00
|
|
|
for(vit = datavector.begin(); vit != datavector.end(); vit++)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-11-01 20:49:06 -04:00
|
|
|
data = (*vit);
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-11-06 14:18:56 -05:00
|
|
|
bool isOwnId = (data.mPgpKnown && (data.mPgpId == ownPgpId)) ||
|
|
|
|
(data.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
|
|
|
|
2012-02-13 13:43:15 -05:00
|
|
|
/* do filtering */
|
|
|
|
bool ok = false;
|
|
|
|
if (acceptAll)
|
|
|
|
{
|
|
|
|
ok = true;
|
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
else if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
if (isOwnId && acceptYourself)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
|
|
|
ok = true;
|
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
else
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
if (data.mPgpKnown)
|
|
|
|
{
|
|
|
|
if (acceptFriends)
|
|
|
|
{
|
|
|
|
ok = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (acceptOthers)
|
|
|
|
{
|
|
|
|
ok = true;
|
|
|
|
}
|
|
|
|
}
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
if (acceptPseudo)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
ok = true;
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
|
|
|
|
if (isOwnId && acceptYourself)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-11-06 14:18:56 -05:00
|
|
|
ok = true;
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ok)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2012-07-28 09:52:54 -04:00
|
|
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
2012-06-13 20:36:25 -04:00
|
|
|
item->setText(RSID_COL_NICKNAME, QString::fromStdString(data.mMeta.mGroupName));
|
|
|
|
item->setText(RSID_COL_KEYID, QString::fromStdString(data.mMeta.mGroupId));
|
2012-11-06 14:18:56 -05:00
|
|
|
if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID)
|
|
|
|
{
|
2012-11-07 16:40:07 -05:00
|
|
|
if (data.mPgpKnown)
|
|
|
|
{
|
|
|
|
RsPeerDetails details;
|
|
|
|
rsPeers->getGPGDetails(data.mPgpId, details);
|
|
|
|
item->setText(RSID_COL_IDTYPE, QString::fromStdString(details.name));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->setText(RSID_COL_IDTYPE, "PGP Linked Id");
|
|
|
|
}
|
2012-11-06 14:18:56 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->setText(RSID_COL_IDTYPE, "Anon Id");
|
|
|
|
}
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
tree->addTopLevelItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
// fix up buttons.
|
|
|
|
updateSelection();
|
|
|
|
}
|
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
void IdDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-06-13 20:36:25 -04:00
|
|
|
std::cerr << "IdDialog::loadRequest() UserType: " << req.mUserType;
|
|
|
|
std::cerr << std::endl;
|
|
|
|
|
|
|
|
switch(req.mUserType)
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2012-06-13 20:36:25 -04:00
|
|
|
case IDDIALOG_IDLIST:
|
|
|
|
insertIdList(req.mToken);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IDDIALOG_IDDETAILS:
|
|
|
|
insertIdDetails(req.mToken);
|
|
|
|
break;
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
default:
|
2012-06-13 20:36:25 -04:00
|
|
|
std::cerr << "IdDialog::loadRequest() ERROR";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
break;
|
|
|
|
|
2012-02-13 13:43:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
|