X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fttt-error.h;h=fff3c14d4543c45e5e66cf911436b4d16b81d959;hb=f42483382a5b2529fb1b36d5c6049b6bd1780876;hp=a800ea6b8e512ddd62b4e32a6c6943ba493fc9dd;hpb=907321c065fb1383e800f0794981df91d4327f57;p=ttt diff --git a/src/ttt-error.h b/src/ttt-error.h index a800ea6..fff3c14 100644 --- a/src/ttt-error.h +++ b/src/ttt-error.h @@ -26,16 +26,27 @@ typedef enum { TTT_ERROR_NONE, - TTT_ERROR_NONAMESET, - TTT_ERROR_INVALIDNAME, + /* 3.1. Connection setup errors */ + TTT_ERROR_NO_NAME_SET, + TTT_ERROR_INVALID_NAME, + /* 3.2. Command format errors */ TTT_ERROR_COMMAND, TTT_ERROR_SYNTAX, - TTT_ERROR_NOTNUMBER, - TTT_ERROR_NOTGRID, - TTT_ERROR_NOUSER, - TTT_ERROR_NOTINGAME, - TTT_ERROR_NOTPLAYING, - TTT_ERROR_NOTYOURTURN + TTT_ERROR_NOT_NUMBER, + TTT_ERROR_NOT_GRID, + /* 3.3. Global command errors */ + /* 3.4. Game management errors */ + TTT_ERROR_NO_INVITE, + TTT_ERROR_NO_GAME, + /* 3.5. User information errors */ + TTT_ERROR_NO_USER, + /* 3.6. In-game errors */ + TTT_ERROR_NOT_PLAYING, + TTT_ERROR_NOT_YOUR_TURN, + TTT_ERROR_NOT_VALID_MOVE, + + /* Here's a non-protocol pseudo-error used to implement QUIT. */ + TTT_ERROR_QUIT_REQUESTED } ttt_error_t; const char *