/** * 初始化 */ void SLESContext::init() { ALOGI("createEngine"); SLresult result = createEngine(); ALOGI("createEngine result is s%", resultToString(result)); if (SL_RESULT_SUCCESS == result) { ALOGI("Realize the engine object"); result = realizeObject(engineObject); if (SL_RESULT_SUCCESS == result) { ALOGI("Get the engine interface"); result = GetEngineInterface(); } } }
Result SyncHTTPLookup::runQuery() { data_ = QByteArray(); state_ = WaitingForQueryResponse; result_ = sendQuery(); if ( Success != result_ ) return result_; kDebug(60010) << "runQuery() Result: " << resultToString(result_); return result_; }
void tls_handshaken() { //QCA::Certificate cert = tls->peerCertificate(); int vr = tls->peerIdentityResult(); if (vr == QCA::TLS::Valid && !tlsHandler->certMatchesHostname()) vr = QCA::TLS::HostMismatch; appendSysMsg("Successful TLS handshake."); if(vr == QCA::TLS::Valid) appendSysMsg("Valid certificate."); else { appendSysMsg(QString("Invalid certificate: %1").arg(resultToString(vr)), Qt::red); appendSysMsg("Continuing anyway"); } tlsHandler->continueAfterHandshake(); }
void ssl_handshaken() { cert = ssl->peerCertificate(); int vr = ssl->certificateValidityResult(); printf("Successful SSL handshake.\n"); if(!cert.isNull()) showCertInfo(cert); if(vr == QCA::TLS::Valid) printf("Valid certificate.\n"); else printf("Invalid certificate: %s\n", resultToString(vr).toLatin1().data()); printf("Let's try a GET request now.\n"); QString req = "GET / HTTP/1.0\nHost: " + host + "\n\n"; QByteArray buf = req.toLatin1(); ssl->write(buf); }
void checkResult(const VkResult resultCode, std::string file, int line){ if (resultCode != VK_SUCCESS) cerr << "Error Code: " << resultToString(resultCode) << " , at file: " << file << ",line: "<< line << std::endl; }