source: trunk/examples/network/infoprotocol/infourlclient/qip.h

Last change on this file was 2, checked in by dmik, 20 years ago

Imported xplatform parts of the official release 3.3.1 from Trolltech

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1/****************************************************************************
2** $Id: qip.h 2 2005-11-16 15:49:26Z dmik $
3**
4** Copyright (C) 1992-2002 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 QIP_H
12#define QIP_H
13
14#include <qnetworkprotocol.h>
15
16class QSocket;
17
18static const Q_UINT16 infoPort = 42417;
19
20
21class Qip : public QNetworkProtocol
22{
23 Q_OBJECT
24
25public:
26 Qip();
27 virtual int supportedOperations() const;
28
29protected:
30 virtual void operationListChildren( QNetworkOperation *op );
31 virtual void operationGet( QNetworkOperation *op );
32 virtual bool checkConnection( QNetworkOperation *op );
33
34private slots:
35 void socketConnected();
36 void socketReadyRead();
37 void socketConnectionClosed();
38 void socketError( int code );
39
40private:
41 QSocket *socket;
42 enum State { Start, List, Data } state;
43 void error( int code, const QString& msg );
44};
45
46
47
48#endif // QIP_H
49
Note: See TracBrowser for help on using the repository browser.