1 /****************************************************************************
2 ** ui.h extension file, included from the uic-generated form implementation.
4 ** If you want to add, delete, or rename functions or slots, use
5 ** Qt Designer to update this file, preserving your code.
7 ** You should not define a constructor or destructor in this file.
8 ** Instead, write your code in functions called init() and destroy().
9 ** These will automatically be called by the form's constructor and
11 *****************************************************************************/
13 int UserDataRequest::setParams(WpaGui *_wpagui, const char *reqMsg)
15 char *tmp, *pos, *pos2;
20 pos = strchr(tmp, '-');
27 pos2 = strchr(pos, ':');
34 networkid = atoi(pos);
35 queryInfo->setText(pos2);
36 if (strcmp(tmp, "PASSWORD") == 0) {
37 queryField->setText("Password: ");
38 queryEdit->setEchoMode(QLineEdit::Password);
39 } else if (strcmp(tmp, "NEW_PASSWORD") == 0) {
40 queryField->setText("New password: ");
41 queryEdit->setEchoMode(QLineEdit::Password);
42 } else if (strcmp(tmp, "IDENTITY") == 0)
43 queryField->setText("Identity: ");
44 else if (strcmp(tmp, "PASSPHRASE") == 0) {
45 queryField->setText("Private key passphrase: ");
46 queryEdit->setEchoMode(QLineEdit::Password);
48 queryField->setText(field + ":");
55 void UserDataRequest::sendReply()
58 size_t reply_len = sizeof(reply);
65 QString cmd = QString(WPA_CTRL_RSP) + field + '-' +
66 QString::number(networkid) + ':' +
68 wpagui->ctrlRequest(cmd.ascii(), reply, &reply_len);