int iNet::TcpSocket::Impl::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTcpSocket::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: SendDataSignal((*reinterpret_cast< QByteArray(*)>(_a[1]))); break; case 1: ConnectToHostSignal((*reinterpret_cast< Utils::HostInf(*)>(_a[1]))); break; case 2: DisconnectFromHostSignal(); break; case 3: DeleteSignal((*reinterpret_cast< boost::shared_ptr<Utils::ThreadSyncEvent>(*)>(_a[1]))); break; case 4: ConnectToHostSlot((*reinterpret_cast< const Utils::HostInf(*)>(_a[1]))); break; case 5: ConnectedSlot(); break; case 6: SendDataSlot((*reinterpret_cast< const QByteArray(*)>(_a[1]))); break; case 7: ReceiveData(); break; case 8: DisconnectFromHostSlot(); break; case 9: DisconnectedSlot(); break; case 10: SocketErrorOccur((*reinterpret_cast< QAbstractSocket::SocketError(*)>(_a[1]))); break; case 11: DeleteSlot((*reinterpret_cast< boost::shared_ptr<Utils::ThreadSyncEvent>(*)>(_a[1]))); break; default: ; } _id -= 12; } return _id; }
TcpSocket::TcpSocket(QObject *parent):QTcpSocket(parent) { setProxy(QNetworkProxy::NoProxy); connect(this,SIGNAL(SendData(QByteArray)),this,SLOT(SendDataSlot(QByteArray))); connect(this,SIGNAL(readyRead()),this,SLOT(RecvDataSlot())); }