home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / examples / network / networkprotocol / nntp.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-11  |  1.1 KB  |  51 lines

  1. /****************************************************************************
  2. ** $Id:  qt/nntp.h   3.0.0   edited Jun 1 18:44 $
  3. **
  4. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  5. **
  6. ** This file is part of an example program for Qt.  This example
  7. ** program may be used, distributed and modified without limitation.
  8. **
  9. *****************************************************************************/
  10.  
  11. #ifndef NNTP_H
  12. #define NNTP_H
  13.  
  14. #include <qsocket.h>
  15. #include <qnetworkprotocol.h>
  16.  
  17. class Nntp : public QNetworkProtocol
  18. {
  19.     Q_OBJECT
  20.  
  21. public:
  22.     Nntp();
  23.     virtual ~Nntp();
  24.     virtual int supportedOperations() const;
  25.  
  26. protected:
  27.     virtual void operationListChildren( QNetworkOperation *op );
  28.     virtual void operationGet( QNetworkOperation *op );
  29.  
  30.     QSocket *commandSocket;
  31.     bool connectionReady;
  32.     bool readGroups;
  33.     bool readArticle;
  34.  
  35. private:
  36.     bool checkConnection( QNetworkOperation *op );
  37.     void close();
  38.     void parseGroups();
  39.     void parseArticle();
  40.  
  41. protected slots:
  42.     void hostFound();
  43.     void connected();
  44.     void closed();
  45.     void readyRead();
  46.     void error( int );
  47.  
  48. };
  49.  
  50. #endif
  51.