mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
started protocol documentation
This commit is contained in:
parent
9e044ffad0
commit
47eadb6f86
3 changed files with 111 additions and 2 deletions
|
|
@ -15,7 +15,6 @@ bool ReturnMessage::send(ReturnCode code)
|
|||
case ReturnSyntaxError: returnCodeString = "syntax"; break;
|
||||
case ReturnContextError: returnCodeString = "context"; break;
|
||||
case ReturnPasswordWrong: returnCodeString = "password"; break;
|
||||
case ReturnNameNotFound: returnCodeString = "name_not_found"; break;
|
||||
}
|
||||
s->msg(QString("resp|%1|%2|%3").arg(msg_id)
|
||||
.arg(success ? "ok" : "err")
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ private:
|
|||
unsigned int msg_id;
|
||||
QString cmd;
|
||||
public:
|
||||
enum ReturnCode { ReturnNothing, ReturnOk, ReturnLoginNeeded, ReturnSyntaxError, ReturnContextError, ReturnPasswordWrong, ReturnNameNotFound };
|
||||
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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue