mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-12 13:15:18 -08:00
22 lines
609 B
C++
22 lines
609 B
C++
#ifndef RETURNMESSAGE_H
|
|
#define RETURNMESSAGE_H
|
|
|
|
#include <QStringList>
|
|
|
|
class ReturnMessage : public QObject {
|
|
Q_OBJECT
|
|
private:
|
|
unsigned int msg_id;
|
|
QString cmd;
|
|
public:
|
|
enum ReturnCode { ReturnNothing, ReturnOk, ReturnLoginNeeded, ReturnSyntaxError, ReturnContextError, ReturnPasswordWrong };
|
|
ReturnMessage(QObject *parent = 0) : QObject(parent), msg_id(0) { }
|
|
unsigned int getMsgId() const { return msg_id; }
|
|
void setMsgId(unsigned int _msg_id) { msg_id = _msg_id; }
|
|
void setCmd(const QString &_cmd) { cmd = _cmd; }
|
|
bool send(ReturnCode code);
|
|
bool sendList(const QStringList &args);
|
|
};
|
|
|
|
#endif
|