Пример #1
0
void PhoneReg::startCodeRequest()
{
    qDebug() << QString("reg/req/%1/start").arg(method);
    request = new WARequest(userAgent, "code", this);
    request->addParam("cc", cc);
    request->addParam("in", number);
    //request->addParam("reason", "next-method");
    request->addParam("reason", "self-send-jailbroken");
    request->addParam("method", method);
    request->addParam("mcc", mcc);
    request->addParam("mnc", mnc);
    QString locale = QLocale::system().name();
    QString lg = locale.split("_").first();
    QString lc = locale.split("_").length() > 1 ? locale.split("_").last() : "";
    request->addParam("lg", lc.isEmpty() ? "en" : lg);
    request->addParam("lc", lc.isEmpty() ? "US" : lc);
    request->addParam("token", Utilities::getTokenAndroid(number));
    request->addParam("id", id);

    connect(request,SIGNAL(finished(QVariantMap)),
            this,SLOT(onCodeRequestDone(QVariantMap)));
    connect(request,SIGNAL(sslError()),
            this,SLOT(sslError()));
    connect(request,SIGNAL(httpError(QString)),
            this,SLOT(errorHandler(QString)));
    request->getRequest();
}
Пример #2
0
void PhoneReg::startCodeRequest()
{
    qDebug() << QString("reg/req/%1/start").arg(method);
    request = new WARequest(this, "code");
    request->addParam("cc", cc);
    request->addParam("in", number);
    if (method == "voice") {
        request->addParam("reason", "next-method");
    }
    //request->addParam("reason", "self-send-jailbroken");
    request->addParam("method", method);
    request->addParam("sim_mcc", mcc);
    //request->addParam("sim_mcc", "214");
    request->addParam("sim_mnc", mnc);
    //request->addParam("sim_mnc", "007");
    request->addParam("lg", lg.isEmpty() ? "en" : lg);
    request->addParam("lc", lc.isEmpty() ? "zz" : lc);
    request->addParam("token", Utilities::getTokenAndroid(number));
    request->addParam("id", id);

    connect(request,SIGNAL(finished(QVariantMap)),
            this,SLOT(onCodeRequestDone(QVariantMap)));
    connect(request,SIGNAL(sslError()),
            this,SLOT(sslError()));
    connect(request,SIGNAL(httpError(QString)),
            this,SLOT(errorHandler(QString)));
    request->getRequest();
}
Пример #3
0
void PhoneReg::startCodeRequest()
{
    qDebug() << QString("reg/req/%1/start").arg(method);
    request = new WARequest(this, "code");
    request->addParam("cc", cc);
    request->addParam("in", number);
    //request->addParam("reason","next-method");
    request->addParam("reason", "self-send-jailbroken");
    request->addParam("method", method);
    request->addParam("mcc", "000");
    request->addParam("mnc", "000");
    request->addParam("lg", "en");
    request->addParam("lc", "US");
    request->addParam("token", Utilities::getTokenAndroid(number));
    request->addParam("id",id);

    connect(request,SIGNAL(finished(QVariantMap)),
            this,SLOT(onCodeRequestDone(QVariantMap)));
    connect(request,SIGNAL(sslError()),
            this,SLOT(sslError()));
    connect(request,SIGNAL(httpError(int)),
            this,SLOT(errorHandler(int)));
    request->getRequest();
}