Esempio n. 1
0
void BoshTransport::close (const ResultCallback & callback) {
	if (mState == Connected) {
		StringMap map;
		map["type"] = "terminate";
		startNextRequest(map, callback);
		mState = Closing;
	}
}
Esempio n. 2
0
void BoshTransport::restart () {
	if (mState != Connected) {
		Log (LogWarning) << LOGID << "Wrong state for restart " << toString (mState) << std::endl;
		return;
	}
	StringMap args;
	args["xmpp:restart"] = "true";
	args["xmlns:xmpp"] = "urn:xmpp:xbosh";
	startNextRequest (args);
}
Esempio n. 3
0
void BoshTransport::continueWorking () {
	if (mOpenRidCount >= 2) {
		Log (LogInfo) << LOGID << "Not continuing " << mOpenRidCount << "(>=2) connections are open..." << std::endl;
		return;
	}
	if (mOpenRidCount >= 1 && mOutputBuffer.empty()){
		Log (LogInfo) << LOGID << "Not continuing, pending connection and no data to be sent" << std::endl;
		return;
	}
	startNextRequest ();
}
bool QHttp::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: abort(); break;
    case 1: clientReply((const QHttpResponseHeader&)*((const QHttpResponseHeader*)static_QUType_ptr.get(_o+1))); break;
    case 2: clientDone((bool)static_QUType_bool.get(_o+1)); break;
    case 3: clientStateChanged((int)static_QUType_int.get(_o+1)); break;
    case 4: startNextRequest(); break;
    case 5: slotReadyRead(); break;
    case 6: slotConnected(); break;
    case 7: slotError((int)static_QUType_int.get(_o+1)); break;
    case 8: slotClosed(); break;
    case 9: slotBytesWritten((int)static_QUType_int.get(_o+1)); break;
    default:
	return QNetworkProtocol::qt_invoke( _id, _o );
    }
    return TRUE;
}