mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
minor improvements
This commit is contained in:
parent
a429a4a004
commit
792a400a3d
30 changed files with 1022 additions and 829 deletions
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef RETURNMESSAGE_H
|
||||
#define RETURNMESSAGE_H
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
|
||||
class ReturnMessage : public QObject {
|
||||
Q_OBJECT
|
||||
|
|
@ -10,11 +9,12 @@ private:
|
|||
unsigned int msg_id;
|
||||
QString cmd;
|
||||
public:
|
||||
enum ReturnCode { ReturnNothing, ReturnOk, ReturnLoginNeeded, ReturnSyntaxError, ReturnContextError, ReturnPasswordWrong, ReturnNameNotFound };
|
||||
ReturnMessage(QObject *parent = 0) : QObject(parent), msg_id(0) { }
|
||||
unsigned int getMsgId() const { return msg_id; }
|
||||
void setMsgId(unsigned int _msg_id);
|
||||
void setCmd(const QString &_cmd) { cmd = _cmd; }
|
||||
bool send(const QString &args = QString(), bool success = true);
|
||||
bool send(ReturnCode code);
|
||||
bool sendList(const QStringList &args);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue