本文整理汇总了C++中AsyncOp::result方法的典型用法代码示例。如果您正苦于以下问题:C++ AsyncOp::result方法的具体用法?C++ AsyncOp::result怎么用?C++ AsyncOp::result使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AsyncOp
的用法示例。
在下文中一共展示了AsyncOp::result方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onConnectHostFinished
void CheckInternetOp::onConnectHostFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
LOG_DEBUG(QString::fromUtf8("connectHost self aborted!"));
return;
}
if (op->isAborted())
{
LOG_DEBUG(QString::fromUtf8("connectHost op aborted!"));
return notifyFinished(AbortedError);
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("connectHost result: %1").arg(result));
if (result != NoError)
{
return retry();
}
notifyFinished(NoError);
}
示例2: onSoapFinished
void ChangeRouterWanSettingsOp::onSoapFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
return;
}
int result = op->result();
if (result != NoError)
{
return notifyFinished(result);
}
QVariant varResponseCode = op->value("responseCode");
if (!varResponseCode.isValid())
{
return notifyFinished(UnknownError);
}
bool ok;
int responseCode = varResponseCode.toInt(&ok);
if (!ok)
{
return notifyFinished(UnknownError);
}
notifyFinished(NoError);
}
示例3: onDiscoverRouterFinished
void ReconnectRouterOp::onDiscoverRouterFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
LOG_DEBUG(QString::fromUtf8("discoverRouter self aborted!"));
return;
}
if (op->isAborted())
{
LOG_DEBUG(QString::fromUtf8("discoverRouter op aborted!"));
return notifyFinished(AbortedError);
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("discoverRouterSoap result: %1").arg(result));
if (result != NoError)
{
return retry();
}
int matchIndex = op->value("matchIndex").toInt();
LOG_DEBUG(QString::fromUtf8("matchIndex %1").arg(matchIndex));
if (matchIndex < 0)
{
return retry();
}
copyValues(op);
notifyFinished(NoError);
}
示例4: onOpFinished
void MasterDiscoverRouterSoapOp::onOpFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (op->isAborted())
{
LOG_DEBUG(QString::fromUtf8("MasterDiscoverRouterSoapOp::onOpFinished() aborted"));
return;
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("MasterDiscoverRouterSoapOp::onOpFinished() %1").arg(result));
if (result != NoError)
{
if (m_retryCount < m_maxRetryCount)
{
LOG_DEBUG(QString::fromUtf8("MasterDiscoverRouterSoapOp Failed, but will retry later"));
++m_retryCount;
m_timer1.setSingleShot(true);
m_timer1.setInterval(m_retryDelay);
connect(&m_timer1, SIGNAL(timeout()), SLOT(onRetryTimeout()));
m_timer1.start();
return;
}
LOG_DEBUG(QString::fromUtf8("MasterDiscoverRouterSoapOp Failed, no more retry chance!"));
return notifyFinished(UnknownError);
}
copyValues(op);
notifyFinished(NoError);
}
示例5: onConnectProfileFinished
void ReconnectRouterOp::onConnectProfileFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
LOG_DEBUG(QString::fromUtf8("connectProfile self aborted!"));
return;
}
if (op->isAborted())
{
LOG_DEBUG(QString::fromUtf8("connectProfile op aborted!"));
return notifyFinished(AbortedError);
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("connectWlanProfile %1 result: %1").arg(m_wifiName).arg(result));
if (result == WlanProfileNotFound )
{
LOG_DEBUG(QString::fromUtf8("recreate profile?"));
notifyFinished(WlanProfileNotFound);
}
if (result != NoError)
{
return retry();
}
discoverRouter();
}
示例6: onCreateProfileFinished
void ChangeRouterPasswordOp::onCreateProfileFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (op->isAborted())
{
return;
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("createWlanProfile result: %1").arg(result));
if (result == WlanRadioOffError || result == WlanServiceDownError || result == WlanNoDeviceError)
{
return notifyFinished(NoError);
}
if (result != AsyncOp::NoError)
{
return notifyFinished(result);
}
m_op = m_bean->reconnectRouter(3000, 10, m_infoResp.value(QLatin1String("NewWLANMACAddress")).toString(), m_infoResp.value(QLatin1String("NewSSID")).toString(), true);
connect(m_op, SIGNAL(finished()), SLOT(onReconnectFinished()));
}
示例7: notifyFinished
void CheckRouterSoapOp::onGetInfo3Finished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (op->isAborted())
{
LOG_DEBUG(QString::fromUtf8("CheckRouterSoapOp::onGetInfo3Finished() aborted"));
return;
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("CheckRouterSoapOp::onGetInfo3Finished() %1").arg(result));
if (result != NoError)
{
return notifyFinished(UnknownError);
}
bool ok;
int responseCode = op->value("responseCode").toInt(&ok);
if (!ok || responseCode != 0)
{
LOG_DEBUG(QString::fromUtf8("CheckRouterSoapOp::onGetInfo3Finished() response error: %1 %2").arg(responseCode).arg(ok));
return notifyFinished(result);
}
m_values.unite(qvariant_cast<QVariantMap>(op->value("response")));
setValues(m_values);
notifyFinished(result);
}
示例8: onSetWLANFinished
void ChangeRouterWifiPasswordOp::onSetWLANFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
return;
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("onSetWLANFinished %1").arg(result));
if (result != NoError)
{
return notifyFinished(result);
}
QVariant varResponseCode = op->value("responseCode");
if (!varResponseCode.isValid())
{
return notifyFinished(UnknownError);
}
bool ok;
int responseCode = varResponseCode.toInt(&ok);
if (!ok)
{
return notifyFinished(UnknownError);
}
if (responseCode != 0)
{
return notifyFinished(UnknownError);
}
if (m_configFinish)
{
m_op = m_bean->m_soapCore->invoke(QLatin1String("DeviceConfig"), QLatin1String("ConfigurationFinished"), QLatin1String("NewStatus"), QLatin1String("ChangesApplied"));
connect(m_op, SIGNAL(finished()), SLOT(onCommitFinished()));
connect(&m_timer1, SIGNAL(timeout()), SLOT(onTimeout1()));
m_timer1.setSingleShot(true);
m_timer1.start(8000);
}
else
{
notifyFinished(NoError);
}
}
示例9: onCommitFinished
void ChangeRouterWifiPasswordOp::onCommitFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
return;
}
LOG_DEBUG(QString::fromUtf8("onCommitFinished %1").arg(op->result()));
notifyFinished(NoError);
}
示例10: onGetKeysFinished
void ChangeRouterPasswordOp::onGetKeysFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
return;
}
int result = op->result();
if (result != NoError)
{
return notifyFinished(result);
}
QVariant varResponseCode = op->value("responseCode");
if (!varResponseCode.isValid())
{
return notifyFinished(UnknownError);
}
bool ok;
int responseCode = varResponseCode.toInt(&ok);
if (!ok)
{
return notifyFinished(UnknownError);
}
if (responseCode != 0)
{
return notifyFinished(UnknownError);
}
QVariant varResponse = op->value("response");
if (!varResponse.isValid())
{
return notifyFinished(UnknownError);
}
QVariantMap resp = qvariant_cast<QVariantMap>(varResponse);
m_currentWifiKey = resp.value(QLatin1String("NewWPAPassphrase")).toString();
m_bean->m_soapCore->setWrappedMode(false);
m_op = m_bean->m_soapCore->invoke(QLatin1String("LANConfigSecurity"), QLatin1String("GetInfo"));
connect(m_op, SIGNAL(finished()), SLOT(onGetLanInfoFinished()));
}
示例11: onConfigOutFinished
void ChangeRouterPasswordOp::onConfigOutFinished()
{
m_timer1.stop();
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (op->isAborted())
{
return;
}
if (isAborted())
{
return;
}
int result = op->result();
if (result != NoError)
{
return notifyFinished(result);
}
QVariant varResponseCode = op->value("responseCode");
if (!varResponseCode.isValid())
{
return notifyFinished(UnknownError);
}
bool ok;
int responseCode = varResponseCode.toInt(&ok);
if (!ok)
{
return notifyFinished(UnknownError);
}
// if (responseCode != 0) {
// return notifyFinished(UnknownError);
// }
// notifyFinished(NoError);
updateProfile();
}
示例12: onWifiConfigFinished
void ChangeRouterPasswordOp::onWifiConfigFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
return;
}
int result = op->result();
if (result != NoError)
{
return notifyFinished(result);
}
QVariant varResponseCode = op->value("responseCode");
if (!varResponseCode.isValid())
{
return notifyFinished(UnknownError);
}
bool ok;
int responseCode = varResponseCode.toInt(&ok);
if (!ok)
{
return notifyFinished(UnknownError);
}
if (responseCode != 0)
{
return notifyFinished(UnknownError);
}
if (!m_adminPassword.isNull())
{
startAdminConfig();
}
else
{
startConfigOut();
}
}
示例13: onReconnectFinished
void ChangeRouterPasswordOp::onReconnectFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (op->isAborted())
{
return;
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("reconnectRouter result: %1").arg(result));
if (result != NoError)
{
notifyFinished(result);
}
notifyFinished(NoError);
}
示例14: onConfigStarted
void RestartRouterOp::onConfigStarted()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
return;
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("onConfigStarted %1").arg(result));
if (result != NoError)
{
return notifyFinished(result);
}
QVariant varResponseCode = op->value("responseCode");
if (!varResponseCode.isValid())
{
return notifyFinished(UnknownError);
}
bool ok;
int responseCode = varResponseCode.toInt(&ok);
if (!ok)
{
return notifyFinished(UnknownError);
}
if (responseCode != 0)
{
return notifyFinished(UnknownError);
}
m_op = m_bean->m_soapCore->invoke(QLatin1String("DeviceConfig"), QLatin1String("ConfigurationFinished"), QLatin1String("NewStatus"), QLatin1String("RebootRequired"));
connect(m_op, SIGNAL(finished()), SLOT(onConfigFinished()));
}
示例15: onConfigFinished
void RestartRouterOp::onConfigFinished()
{
AsyncOp *op = m_op;
m_op->deleteLater();
m_op = NULL;
if (isAborted())
{
return;
}
int result = op->result();
LOG_DEBUG(QString::fromUtf8("onConfigFinished %1").arg(result));
if (result != NoError)
{
return notifyFinished(result);
}
QVariant varResponseCode = op->value("responseCode");
if (!varResponseCode.isValid())
{
return notifyFinished(UnknownError);
}
bool ok;
int responseCode = varResponseCode.toInt(&ok);
if (!ok)
{
return notifyFinished(UnknownError);
}
if (responseCode != 0)
{
return notifyFinished(UnknownError);
}
notifyFinished(NoError);
}