capybara-webkit/src/CommandParser.h

34 lines
684 B
C
Raw Permalink Normal View History

2011-10-14 15:22:24 +00:00
#include <QObject>
#include <QStringList>
class QIODevice;
class CommandFactory;
class Command;
2011-10-14 15:22:24 +00:00
class CommandParser : public QObject {
Q_OBJECT
public:
CommandParser(QIODevice *device, CommandFactory *commandFactory, QObject *parent = 0);
2011-10-14 15:22:24 +00:00
public slots:
void checkNext();
signals:
void commandReady(Command *command);
2011-10-14 15:22:24 +00:00
private:
void readLine();
void readDataBlock();
void processNext(const char *line);
void processArgument(const char *data);
void reset();
2011-10-14 15:22:24 +00:00
QIODevice *m_device;
QString m_commandName;
QStringList m_arguments;
int m_argumentsExpected;
int m_expectingDataSize;
CommandFactory *m_commandFactory;
2011-10-14 15:22:24 +00:00
};