00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __CONNECTIONHANDLER_H__
00026 #define __CONNECTIONHANDLER_H__
00027
00028 #include <QObject>
00029
00030 class CommandLineInfo;
00031 class Server;
00032 class QUrl;
00033 class QWidget;
00034
00035 class ConnectionHandler : public QObject
00036 {
00037 Q_OBJECT
00038
00039 public:
00040 ConnectionHandler(Server *server, QWidget *parent=NULL, bool handleResponse=false);
00041
00042 void run();
00043
00044 static bool checkWadseekerValidity(QWidget *parent=NULL);
00045 static ConnectionHandler *connectByUrl(const QUrl &url);
00057 static bool obtainJoinCommandLine(QWidget *parent, const Server* server, CommandLineInfo& cli, const QString& errorCaption, bool managedDemo, bool *hadMissing=NULL);
00058
00059 protected:
00060 void finish(int response);
00061 void refreshToJoin();
00062
00063 protected slots:
00064 void checkResponse(Server *server, int response);
00065
00066 signals:
00067 void finished(int response);
00068
00069 private:
00070 bool handleResponse;
00071 Server *server;
00072 QWidget *parent;
00073 };
00074
00075 #endif