capybara-webkit/src/Connection.h

38 lines
827 B
C
Raw Normal View History

2011-02-19 03:53:06 +00:00
#include <QObject>
#include <QStringList>
2011-02-19 03:53:06 +00:00
class QTcpSocket;
class WebPage;
class Command;
class Response;
2011-10-14 15:22:24 +00:00
class CommandParser;
class CommandFactory;
class PageLoadingCommand;
class WebPageManager;
2011-02-19 03:53:06 +00:00
class Connection : public QObject {
Q_OBJECT
public:
Connection(QTcpSocket *socket, WebPageManager *manager, QObject *parent = 0);
2011-02-19 03:53:06 +00:00
public slots:
void commandReady(Command *command);
void finishCommand(Response *response);
void pendingLoadFinished(bool success);
2011-02-19 03:53:06 +00:00
private:
void startCommand(Command *);
void writeResponse(Response *response);
2012-03-21 23:11:50 +00:00
void writePageLoadFailure();
2011-02-19 03:53:06 +00:00
QTcpSocket *m_socket;
WebPageManager *m_manager;
2011-10-14 15:22:24 +00:00
CommandParser *m_commandParser;
CommandFactory *m_commandFactory;
bool m_pageSuccess;
WebPage *currentPage();
Command *m_pendingCommand;
2011-02-19 03:53:06 +00:00
};