/* * Copyright (C) 2007-2012 Xagasoft, All rights reserved. * * This file is part of the libgats library and is released under the * terms of the license contained in the file LICENSE. */ #ifndef PROXY_THREAD_H #define PROXY_THREAD_H #include #include #include class ProxyThread : public QThread { Q_OBJECT; public: ProxyThread( QObject *pParent, int iPortIn, const QByteArray &baHostOut, int iPortOut ); virtual ~ProxyThread(); class ProxyHostThread *pHost; void send( Gats::Object *pObj ); signals: void recv( Gats::Object *pObj ); void gotConnection(); protected: virtual void run(); private: int iPortIn; QByteArray baHostOut; int iPortOut; Bu::StreamStack ssCli; Gats::GatsStream gsCli; }; class ProxyHostThread : public QThread { Q_OBJECT; public: ProxyHostThread( QObject *pParent, ProxyThread *pClient ); virtual ~ProxyHostThread(); void send( Gats::Object *pObj ); void setStream( Bu::Stream *pStr ); signals: void recv( Gats::Object *pObj ); protected: virtual void run(); private: ProxyThread *pClient; Bu::StreamStack ssHst; Gats::GatsStream gsHst; }; #endif