1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00
capybara-webkit/src/Connection.h

39 lines
848 B
C
Raw Normal View History

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