Exemple #1
0
/**
 * 初始化
 */
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();
        }
    }
}
Exemple #2
0
    Result
  SyncHTTPLookup::runQuery()
  {
    data_ = QByteArray();
    state_ = WaitingForQueryResponse;

    result_ = sendQuery();

    if ( Success != result_ )
      return result_;

    kDebug(60010) << "runQuery() Result: " << resultToString(result_);

    return result_;
  }
Exemple #3
0
	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();
	}
Exemple #4
0
	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);
	}
Exemple #5
0
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;
}