00001 // Copyright (c) 2000-2001 Brad Hughes <bhughes@trolltech.com> 00002 // 00003 // Use, modification and distribution is allowed without limitation, 00004 // warranty, or liability of any kind. 00005 // 00006 00007 #ifndef INPUT_H 00008 #define INPUT_H 00009 00010 class StreamInput; 00011 00012 #include <QUrl> 00013 #include <QTcpSocket> 00014 00015 class StreamInput : public QObject 00016 { 00017 Q_OBJECT 00018 00019 public: 00020 StreamInput(const QUrl&); 00021 00022 QIODevice *GetSocket(void) { return sock; } 00023 00024 void Setup(void); 00025 00026 private slots: 00027 void HostFound(void); 00028 void Connected(void); 00029 void ReadyRead(void); 00030 void Error(QAbstractSocket::SocketError); 00031 00032 private: 00033 QString request; 00034 QUrl url; 00035 QTcpSocket *sock; 00036 int stage; 00037 }; 00038 00039 00040 #endif // INPUT_H
1.6.3