/****************************************************************************
** TQHttp meta object code from reading C++ file 'ntqhttp.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "../../network/ntqhttp.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *TQHttp::className() const
{
    return "TQHttp";
}

TQMetaObject *TQHttp::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TQHttp( "TQHttp", &TQHttp::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString TQHttp::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "TQHttp", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString TQHttp::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "TQHttp", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* TQHttp::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQNetworkProtocol::staticMetaObject();
    static const TQUMethod slot_0 = {"abort", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ "rep", &static_QUType_ptr, "TQHttpResponseHeader", TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"clientReply", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"clientDone", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"clientStateChanged", 1, param_slot_3 };
    static const TQUMethod slot_4 = {"startNextRequest", 0, 0 };
    static const TQUMethod slot_5 = {"slotReadyRead", 0, 0 };
    static const TQUMethod slot_6 = {"slotConnected", 0, 0 };
    static const TQUParameter param_slot_7[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_7 = {"slotError", 1, param_slot_7 };
    static const TQUMethod slot_8 = {"slotClosed", 0, 0 };
    static const TQUParameter param_slot_9[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_9 = {"slotBytesWritten", 1, param_slot_9 };
    static const TQMetaData slot_tbl[] = {
	{ "abort()", &slot_0, TQMetaData::Public },
	{ "clientReply(const TQHttpResponseHeader&)", &slot_1, TQMetaData::Private },
	{ "clientDone(bool)", &slot_2, TQMetaData::Private },
	{ "clientStateChanged(int)", &slot_3, TQMetaData::Private },
	{ "startNextRequest()", &slot_4, TQMetaData::Private },
	{ "slotReadyRead()", &slot_5, TQMetaData::Private },
	{ "slotConnected()", &slot_6, TQMetaData::Private },
	{ "slotError(int)", &slot_7, TQMetaData::Private },
	{ "slotClosed()", &slot_8, TQMetaData::Private },
	{ "slotBytesWritten(int)", &slot_9, TQMetaData::Private }
    };
    static const TQUParameter param_signal_0[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_0 = {"stateChanged", 1, param_signal_0 };
    static const TQUParameter param_signal_1[] = {
	{ "resp", &static_QUType_ptr, "TQHttpResponseHeader", TQUParameter::In }
    };
    static const TQUMethod signal_1 = {"responseHeaderReceived", 1, param_signal_1 };
    static const TQUParameter param_signal_2[] = {
	{ "resp", &static_QUType_ptr, "TQHttpResponseHeader", TQUParameter::In }
    };
    static const TQUMethod signal_2 = {"readyRead", 1, param_signal_2 };
    static const TQUParameter param_signal_3[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In },
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_3 = {"dataSendProgress", 2, param_signal_3 };
    static const TQUParameter param_signal_4[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In },
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_4 = {"dataReadProgress", 2, param_signal_4 };
    static const TQUParameter param_signal_5[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_5 = {"requestStarted", 1, param_signal_5 };
    static const TQUParameter param_signal_6[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In },
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod signal_6 = {"requestFinished", 2, param_signal_6 };
    static const TQUParameter param_signal_7[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod signal_7 = {"done", 1, param_signal_7 };
    static const TQMetaData signal_tbl[] = {
	{ "stateChanged(int)", &signal_0, TQMetaData::Public },
	{ "responseHeaderReceived(const TQHttpResponseHeader&)", &signal_1, TQMetaData::Public },
	{ "readyRead(const TQHttpResponseHeader&)", &signal_2, TQMetaData::Public },
	{ "dataSendProgress(int,int)", &signal_3, TQMetaData::Public },
	{ "dataReadProgress(int,int)", &signal_4, TQMetaData::Public },
	{ "requestStarted(int)", &signal_5, TQMetaData::Public },
	{ "requestFinished(int,bool)", &signal_6, TQMetaData::Public },
	{ "done(bool)", &signal_7, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"TQHttp", parentObject,
	slot_tbl, 10,
	signal_tbl, 8,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TQHttp.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* TQHttp::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "TQHttp" ) )
	return this;
    return TQNetworkProtocol::tqt_cast( clname );
}

// TQ_SIGNAL stateChanged
void TQHttp::stateChanged( int t0 )
{
    activate_signal( staticMetaObject()->signalOffset() + 0, t0 );
}

#include <ntqobjectdefs.h>
#include <ntqsignalslotimp.h>

// TQ_SIGNAL responseHeaderReceived
void TQHttp::responseHeaderReceived( const TQHttpResponseHeader& t0 )
{
    if ( signalsBlocked() )
	return;
    TQConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 1 );
    if ( !clist )
	return;
    TQUObject o[2];
    static_QUType_ptr.set(o+1,&t0);
    o[1].isLastObject = true;
    activate_signal( clist, o );
}

// TQ_SIGNAL readyRead
void TQHttp::readyRead( const TQHttpResponseHeader& t0 )
{
    if ( signalsBlocked() )
	return;
    TQConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 2 );
    if ( !clist )
	return;
    TQUObject o[2];
    static_QUType_ptr.set(o+1,&t0);
    o[1].isLastObject = true;
    activate_signal( clist, o );
}

// TQ_SIGNAL dataSendProgress
void TQHttp::dataSendProgress( int t0, int t1 )
{
    if ( signalsBlocked() )
	return;
    TQConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 3 );
    if ( !clist )
	return;
    TQUObject o[3];
    static_QUType_int.set(o+1,t0);
    static_QUType_int.set(o+2,t1);
    o[2].isLastObject = true;
    activate_signal( clist, o );
}

// TQ_SIGNAL dataReadProgress
void TQHttp::dataReadProgress( int t0, int t1 )
{
    if ( signalsBlocked() )
	return;
    TQConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 4 );
    if ( !clist )
	return;
    TQUObject o[3];
    static_QUType_int.set(o+1,t0);
    static_QUType_int.set(o+2,t1);
    o[2].isLastObject = true;
    activate_signal( clist, o );
}

// TQ_SIGNAL requestStarted
void TQHttp::requestStarted( int t0 )
{
    activate_signal( staticMetaObject()->signalOffset() + 5, t0 );
}

// TQ_SIGNAL requestFinished
void TQHttp::requestFinished( int t0, bool t1 )
{
    if ( signalsBlocked() )
	return;
    TQConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 6 );
    if ( !clist )
	return;
    TQUObject o[3];
    static_QUType_int.set(o+1,t0);
    static_QUType_bool.set(o+2,t1);
    o[2].isLastObject = true;
    activate_signal( clist, o );
}

// TQ_SIGNAL done
void TQHttp::done( bool t0 )
{
    activate_signal_bool( staticMetaObject()->signalOffset() + 7, t0 );
}

bool TQHttp::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: abort(); break;
    case 1: clientReply((const TQHttpResponseHeader&)*((const TQHttpResponseHeader*)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 TQNetworkProtocol::tqt_invoke( _id, _o );
    }
    return true;
}

bool TQHttp::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: stateChanged((int)static_QUType_int.get(_o+1)); break;
    case 1: responseHeaderReceived((const TQHttpResponseHeader&)*((const TQHttpResponseHeader*)static_QUType_ptr.get(_o+1))); break;
    case 2: readyRead((const TQHttpResponseHeader&)*((const TQHttpResponseHeader*)static_QUType_ptr.get(_o+1))); break;
    case 3: dataSendProgress((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 4: dataReadProgress((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 5: requestStarted((int)static_QUType_int.get(_o+1)); break;
    case 6: requestFinished((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 7: done((bool)static_QUType_bool.get(_o+1)); break;
    default:
	return TQNetworkProtocol::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

bool TQHttp::tqt_property( int id, int f, TQVariant* v)
{
    return TQNetworkProtocol::tqt_property( id, f, v);
}

bool TQHttp::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
