7
#ifndef IGSCONNECTION_H
8
#define IGSCONNECTION_H
10
#include "igsinterface.h"
15
#define MAX_LINESIZE 512
17
class IGSConnection : public QObject, public IGSInterface
23
virtual ~IGSConnection();
25
// Implementation of IGSInterface virtual functions
26
virtual bool isConnected();
27
virtual bool openConnection(const char *host, unsigned port,
28
const char *user=0, const char *pass=0);
29
virtual bool closeConnection();
30
virtual void sendTextToHost(const char *txt);
31
virtual void sendTextToHost(QString *txt);
33
virtual const char* getUsername();
36
// for statistics reason
37
void signal_setBytesIn(int);
38
void signal_setBytesOut(int);
41
virtual bool checkPrompt();
42
// void convertBlockToLines();
44
void sendTextToApp(const char *txt, unsigned int size);
45
void sendTextToApp(const char *s);
46
void sendTextToApp(QString *txt);
47
void sendTextToApp(QCString *txt);
53
void OnConnectionClosed();
54
void OnDelayedCloseFinish();
55
void OnBytesWritten(int);
67
LOGIN, // parse will search for login prompt
68
PASSWORD, // parse will search for password prompt
70
AUTH_FAILED // wrong user/pass
73
QString bufferLineRest;