64 lines
1.7 KiB
Rust
64 lines
1.7 KiB
Rust
/*
|
|
** Status Codes
|
|
*/
|
|
|
|
pub const STATUS_OK :u16 = 0x0000;
|
|
|
|
pub const STATUS_ERROR :u16 = 0x0001;
|
|
pub const STATUS_NOAUTH :u16 = 0x0002;
|
|
|
|
pub const STATUS_APPROVE :u16 = 0x0003;
|
|
pub const STATUS_REJECT :u16 = 0x0004;
|
|
|
|
pub const STATUS_BAD_HANDLE :u16 = 0x0010;
|
|
pub const STATUS_BAD_SECRET :u16 = 0x0011;
|
|
pub const STATUS_BAD_CODE :u16 = 0x0012;
|
|
|
|
pub const STATUS_SERVER_ERROR :u16 = 0x00FE;
|
|
pub const STATUS_NOT_IMPL :u16 = 0x00FF;
|
|
|
|
|
|
/*
|
|
** Operation Codes
|
|
*/
|
|
|
|
pub const CODE_HELLO :u16 = 0x0001;
|
|
|
|
pub const CODE_REGISTER :u16 = 0x0010;
|
|
pub const CODE_AUTH :u16 = 0x0011;
|
|
pub const CODE_AUTH_RESUME :u16 = 0x0012;
|
|
pub const CODE_AUTH_REVOKE :u16 = 0x0013;
|
|
|
|
pub const CODE_STATUS :u16 = 0x001F;
|
|
|
|
pub const CODE_SESSION_LIST :u16 = 0x0020;
|
|
pub const CODE_SESSION_JOIN :u16 = 0x0021;
|
|
pub const CODE_SESSION_VIEW :u16 = 0x0022;
|
|
pub const CODE_SESSION_RETIRE :u16 = 0x002E;
|
|
pub const CODE_SESSION_LEAVE :u16 = 0x002F;
|
|
|
|
pub const CODE_GAME_STATE :u16 = 0x0030;
|
|
pub const CODE_GAME_MESSAGE :u16 = 0x0031;
|
|
|
|
pub const CODE_CHALLENGE :u16 = 0x0060;
|
|
pub const CODE_CHALLENGE_ANSWER :u16 = 0x0061;
|
|
pub const CODE_CHALLENGE_LIST :u16 = 0x0062;
|
|
|
|
pub const CODE_USER_LIST :u16 = 0x0100;
|
|
//pub const CODE_USER_AWAIT_GET :u16 = 0x0110;
|
|
//pub const CODE_USER_AWAIT_SET :u16 = 0x0111;
|
|
|
|
|
|
/*
|
|
** Game Messages
|
|
*/
|
|
|
|
pub const GMSG_ERROR :u8 = 0x00;
|
|
pub const GMSG_PLAY_MOVE :u8 = 0x01;
|
|
pub const GMSG_PLAY_DROP :u8 = 0x02;
|
|
pub const GMSG_PLAY_ALT :u8 = 0x03;
|
|
pub const GMSG_ONLINE :u8 = 0x08;
|
|
pub const GMSG_UNDO :u8 = 0x10;
|
|
pub const GMSG_RETIRE :u8 = 0x11;
|
|
pub const GMSG_REACTION :u8 = 0x20;
|