Esempio n. 1
0
void AuthenticationAppMsgProxy::OnAsyncRequest(iviLink::Ipc::MsgID id, UInt8 const* pPayload,
        UInt32 payloadSize, iviLink::Ipc::DirectionID)
{
    LOG4CPLUS_TRACE_METHOD(logger, __PRETTY_FUNCTION__);

    AuthenticationMessage const* req = reinterpret_cast<AuthenticationMessage const*>(pPayload);

    switch (req->requestType)
    {
    case AA_SC_AUTHENTICATION_OK:
        LOG4CPLUS_INFO(logger, "AA_SC_AUTHENTICATION_OK");
        onAuthenticationOK();
        break;
    case AA_SC_AUTHENTICATION_NOK:
        LOG4CPLUS_INFO(logger, "AA_SC_AUTHENTICATION_NOK");
        onAuthenticationNOK();
        break;
    case AA_SC_AUTHENTICATION_CANCELED:
        LOG4CPLUS_INFO(logger, "AA_SC_AUTHENTICATION_CANCELED");
        onAuthenticationCanceled();
        break;
    case AA_SC_AUTHENTICATION_ERROR:
        LOG4CPLUS_INFO(logger, "AA_SC_AUTHENTICATION_ERROR");
        onAuthenticationError();
        break;
    default:
        break;
    }

}
Esempio n. 2
0
void MainWindow::skipLoginScreen(const QString &username, const QString &password)
{
    connectWindow_->setAcountData(username, password);
    getServers_ = new GetServers(this);
    getServers_->setLoginData(username, password);
    connect(getServers_, SIGNAL(updateFinished(bool, QString, bool)), SLOT(onGetServersFinished(bool, QString, bool)));
    connect(getServers_, SIGNAL(authenticationError()), SLOT(onAuthenticationError()));
    getServers_->start();
}
Esempio n. 3
0
void MainWindow::onGetServersFinished(bool bSuccess, QString errorStr, bool bConfigChanged)
{
    if (bSuccess)
    {
        waitWindow_->hide();
        connectWindow_->setServers(getServers_->servers());
        connectWindow_->show();
        adjustSize();
        setFixedSize(size());

        placeWindowToCenter();

        QSettings settings;
        QString autoConnectOnStart = settings.value("autoConnectOnStart", "false").toString();
        if (autoConnectOnStart == "true")
        {
            connectWindow_->autoConnect();
        }
    }
    else
    {
        onAuthenticationError();
    }
}