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 *****************************************************************************/
15 int UserDataRequest::setParams(WpaGui *_wpagui, const char *reqMsg)
17 char *tmp, *pos, *pos2;
22 pos = strchr(tmp, '-');
29 pos2 = strchr(pos, ':');
36 networkid = atoi(pos);
37 queryInfo->setText(pos2);
38 if (strcmp(tmp, "PASSWORD") == 0) {
39 queryField->setText("Password: ");
40 queryEdit->setEchoMode(QLineEdit::Password);
41 } else if (strcmp(tmp, "NEW_PASSWORD") == 0) {
42 queryField->setText("New password: ");
43 queryEdit->setEchoMode(QLineEdit::Password);
44 } else if (strcmp(tmp, "IDENTITY") == 0)
45 queryField->setText("Identity: ");
46 else if (strcmp(tmp, "PASSPHRASE") == 0) {
47 queryField->setText("Private key passphrase: ");
48 queryEdit->setEchoMode(QLineEdit::Password);
50 queryField->setText(field + ":");
57 void UserDataRequest::sendReply()
60 size_t reply_len = sizeof(reply);
67 QString cmd = QString(WPA_CTRL_RSP) + field + '-' +
68 QString::number(networkid) + ':' +
70 wpagui->ctrlRequest(cmd.ascii(), reply, &reply_len);