2011-02-19 03:53:06 +00:00
|
|
|
#ifndef COMMAND_H
|
|
|
|
#define COMMAND_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2011-05-05 21:45:44 +00:00
|
|
|
#include "Response.h"
|
2012-12-12 06:47:54 +00:00
|
|
|
#include <QString>
|
2011-02-19 03:53:06 +00:00
|
|
|
|
|
|
|
class Command : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2012-07-08 19:04:30 +00:00
|
|
|
Command(QObject *parent = 0);
|
|
|
|
virtual void start() = 0;
|
2012-06-29 16:14:22 +00:00
|
|
|
virtual QString toString() const;
|
2011-02-19 03:53:06 +00:00
|
|
|
|
2012-12-12 06:47:54 +00:00
|
|
|
protected:
|
|
|
|
void emitFinished(bool success);
|
|
|
|
void emitFinished(bool success, QString message);
|
|
|
|
|
2011-02-19 03:53:06 +00:00
|
|
|
signals:
|
2011-05-05 21:45:44 +00:00
|
|
|
void finished(Response *response);
|
2011-02-19 03:53:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|