/****************************************************************************
** TQSocket meta object code from reading C++ file 'ntqsocket.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/ntqsocket.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 *TQSocket::className() const
{
    return "TQSocket";
}

TQMetaObject *TQSocket::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TQSocket( "TQSocket", &TQSocket::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* TQSocket::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 = TQObject::staticMetaObject();
    static const TQUMethod slot_0 = {"sn_read", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ "force", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"sn_read", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"sn_write", 0, 0 };
    static const TQUMethod slot_3 = {"tryConnecting", 0, 0 };
    static const TQUMethod slot_4 = {"emitErrorConnectionRefused", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "sn_read()", &slot_0, TQMetaData::Protected },
	{ "sn_read(bool)", &slot_1, TQMetaData::Protected },
	{ "sn_write()", &slot_2, TQMetaData::Protected },
	{ "tryConnecting()", &slot_3, TQMetaData::Private },
	{ "emitErrorConnectionRefused()", &slot_4, TQMetaData::Private }
    };
    static const TQUMethod signal_0 = {"hostFound", 0, 0 };
    static const TQUMethod signal_1 = {"connected", 0, 0 };
    static const TQUMethod signal_2 = {"connectionClosed", 0, 0 };
    static const TQUMethod signal_3 = {"delayedCloseFinished", 0, 0 };
    static const TQUMethod signal_4 = {"readyRead", 0, 0 };
    static const TQUParameter param_signal_5[] = {
	{ "nbytes", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_5 = {"bytesWritten", 1, param_signal_5 };
    static const TQUParameter param_signal_6[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_6 = {"error", 1, param_signal_6 };
    static const TQMetaData signal_tbl[] = {
	{ "hostFound()", &signal_0, TQMetaData::Public },
	{ "connected()", &signal_1, TQMetaData::Public },
	{ "connectionClosed()", &signal_2, TQMetaData::Public },
	{ "delayedCloseFinished()", &signal_3, TQMetaData::Public },
	{ "readyRead()", &signal_4, TQMetaData::Public },
	{ "bytesWritten(int)", &signal_5, TQMetaData::Public },
	{ "error(int)", &signal_6, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"TQSocket", parentObject,
	slot_tbl, 5,
	signal_tbl, 7,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TQSocket.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* TQSocket::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "TQSocket" ) )
	return this;
    if ( !qstrcmp( clname, "TQIODevice" ) )
	return (TQIODevice*)this;
    return TQObject::tqt_cast( clname );
}

// TQ_SIGNAL hostFound
void TQSocket::hostFound()
{
    activate_signal( staticMetaObject()->signalOffset() + 0 );
}

// TQ_SIGNAL connected
void TQSocket::connected()
{
    activate_signal( staticMetaObject()->signalOffset() + 1 );
}

// TQ_SIGNAL connectionClosed
void TQSocket::connectionClosed()
{
    activate_signal( staticMetaObject()->signalOffset() + 2 );
}

// TQ_SIGNAL delayedCloseFinished
void TQSocket::delayedCloseFinished()
{
    activate_signal( staticMetaObject()->signalOffset() + 3 );
}

// TQ_SIGNAL readyRead
void TQSocket::readyRead()
{
    activate_signal( staticMetaObject()->signalOffset() + 4 );
}

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

// TQ_SIGNAL error
void TQSocket::error( int t0 )
{
    activate_signal( staticMetaObject()->signalOffset() + 6, t0 );
}

bool TQSocket::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: sn_read(); break;
    case 1: sn_read((bool)static_QUType_bool.get(_o+1)); break;
    case 2: sn_write(); break;
    case 3: tryConnecting(); break;
    case 4: emitErrorConnectionRefused(); break;
    default:
	return TQObject::tqt_invoke( _id, _o );
    }
    return true;
}

bool TQSocket::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: hostFound(); break;
    case 1: connected(); break;
    case 2: connectionClosed(); break;
    case 3: delayedCloseFinished(); break;
    case 4: readyRead(); break;
    case 5: bytesWritten((int)static_QUType_int.get(_o+1)); break;
    case 6: error((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQObject::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

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

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