diff --git a/chatcleaner.proto b/chatcleaner.proto new file mode 100644 index 00000000..5f7b23e0 --- /dev/null +++ b/chatcleaner.proto @@ -0,0 +1,91 @@ +/***************************************************************************** + * PokerTH - The open source texas holdem engine * + * Copyright (C) 2006-2013 Felix Hammer, Florian Thauer, Lothar May * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU Affero General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Affero General Public License for more details. * + * * + * You should have received a copy of the GNU Affero General Public License * + * along with this program. If not, see . * + * * + * * + * Additional permission under GNU AGPL version 3 section 7 * + * * + * If you modify this program, or any covered work, by linking or * + * combining it with the OpenSSL project's OpenSSL library (or a * + * modified version of that library), containing parts covered by the * + * terms of the OpenSSL or SSLeay licenses, the authors of PokerTH * + * (Felix Hammer, Florian Thauer, Lothar May) grant you additional * + * permission to convey the resulting work. * + * Corresponding Source for a non-source form of such a combination * + * shall include the source code for the parts of OpenSSL used as well * + * as that of the covered work. * + *****************************************************************************/ + +option java_package = "de.chatcleaner.protocol"; +option java_outer_classname = "ProtoBuf"; +option optimize_for = LITE_RUNTIME; + +message CleanerInitMessage { + required uint32 requestedVersion = 1; + required string clientSecret = 2; +} + +message CleanerInitAckMessage { + required uint32 serverVersion = 1; + required string serverSecret = 2; +} + +enum CleanerChatType { + cleanerChatTypeLobby = 0; + cleanerChatTypeGame = 1; +} + +message CleanerChatRequestMessage { + required uint32 requestId = 1; + required CleanerChatType cleanerChatType = 2; + optional uint32 gameId = 3 [default = 0]; + required uint32 playerId = 4; + required string playerName = 5; + required string chatMessage = 6; +} + +message CleanerChatReplyMessage { + required uint32 requestId = 1; + required CleanerChatType cleanerChatType = 2; + optional uint32 gameId = 3 [default = 0]; + required uint32 playerId = 4; + enum CleanerActionType { + cleanerActionNone = 0; + cleanerActionWarning = 1; + cleanerActionKick = 2; + cleanerActionBan = 3; + cleanerActionMute = 4; + } + required CleanerActionType cleanerActionType = 5; + optional string cleanerText = 6 [default = ""]; +} + +// The main message type (it is prefixed by 4 bytes length of the message). + +message ChatCleanerMessage { + enum ChatCleanerMessageType { + Type_CleanerInitMessage = 1; + Type_CleanerInitAckMessage = 2; + Type_CleanerChatRequestMessage = 3; + Type_CleanerChatReplyMessage = 4; + } + required ChatCleanerMessageType messageType = 1; + + optional CleanerInitMessage cleanerInitMessage = 2; + optional CleanerInitAckMessage cleanerInitAckMessage = 3; + optional CleanerChatRequestMessage cleanerChatRequestMessage = 4; + optional CleanerChatReplyMessage cleanerChatReplyMessage = 5; +} diff --git a/docs/chatcleaner.asn1 b/docs/chatcleaner.asn1 deleted file mode 100644 index 42aa788d..00000000 --- a/docs/chatcleaner.asn1 +++ /dev/null @@ -1,76 +0,0 @@ -/***************************************************************************** - * PokerTH - The open source texas holdem engine * - * Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU Affero General Public License as * - * published by the Free Software Foundation, either version 3 of the * - * License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Affero General Public License for more details. * - * * - * You should have received a copy of the GNU Affero General Public License * - * along with this program. If not, see . * - *****************************************************************************/ - -CHATCLEANER-PROTOCOL DEFINITIONS -IMPLICIT TAGS -EXTENSIBILITY IMPLIED ::= - -BEGIN - -ChatCleanerMessage ::= CHOICE { - cleanerInitMessage CleanerInitMessage, - cleanerInitAckMessage CleanerInitAckMessage, - cleanerChatRequestMessage CleanerChatRequestMessage, - cleanerChatReplyMessage CleanerChatReplyMessage -} - -CleanerInitMessage ::= [APPLICATION 0] SEQUENCE { - requestedVersion INTEGER(0..65535), - clientSecret UTF8String (SIZE(1..32)) -} - -CleanerInitAckMessage ::= [APPLICATION 1] SEQUENCE { - serverVersion INTEGER(0..65535), - serverSecret UTF8String (SIZE(1..32)) -} - -CleanerChatType ::= CHOICE { - cleanerChatTypeLobby [0] CleanerChatTypeLobby, - cleanerChatTypeGame [1] CleanerChatTypeGame -} - -CleanerChatTypeLobby ::= SEQUENCE { -} - -CleanerChatTypeGame ::= SEQUENCE { - gameId INTEGER(1..4294967295) -} - -CleanerChatRequestMessage ::= [APPLICATION 2] SEQUENCE { - requestId INTEGER(1..4294967295), - cleanerChatType CleanerChatType, - playerId INTEGER(1..4294967295), - playerName UTF8String (SIZE(1..32)), - chatMessage UTF8String (SIZE(1..128)) -} - -CleanerChatReplyMessage ::= [APPLICATION 3] SEQUENCE { - requestId INTEGER(1..4294967295), - cleanerChatType CleanerChatType, - playerId INTEGER(1..4294967295), - cleanerActionType ENUMERATED { - cleanerActionNone (0), - cleanerActionWarning (1), - cleanerActionKick (2), - cleanerActionBan (3), - cleanerActionMute (4) - }, - cleanerText UTF8String (SIZE(1..128)) OPTIONAL -} - -END diff --git a/docs/pokerth.asn1 b/docs/pokerth.asn1 deleted file mode 100644 index adddceaf..00000000 --- a/docs/pokerth.asn1 +++ /dev/null @@ -1,848 +0,0 @@ -/***************************************************************************** - * PokerTH - The open source texas holdem engine * - * Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU Affero General Public License as * - * published by the Free Software Foundation, either version 3 of the * - * License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Affero General Public License for more details. * - * * - * You should have received a copy of the GNU Affero General Public License * - * along with this program. If not, see . * - *****************************************************************************/ - - /* This file is now deprecated! google protocol buffers are used instead. - * Please refer to pokerth.proto. */ - -POKERTH-PROTOCOL DEFINITIONS -IMPLICIT TAGS -EXTENSIBILITY IMPLIED ::= - -BEGIN - -PokerTHMessage ::= CHOICE { - announceMessage AnnounceMessage, - initMessage InitMessage, - authMessage AuthMessage, - initAckMessage InitAckMessage, - avatarRequestMessage AvatarRequestMessage, - avatarReplyMessage AvatarReplyMessage, - playerListMessage PlayerListMessage, - gameListMessage GameListMessage, - playerInfoRequestMessage PlayerInfoRequestMessage, - playerInfoReplyMessage PlayerInfoReplyMessage, - subscriptionRequestMessage SubscriptionRequestMessage, - joinGameRequestMessage JoinGameRequestMessage, - joinGameReplyMessage JoinGameReplyMessage, - gamePlayerMessage GamePlayerMessage, - kickPlayerRequestMessage KickPlayerRequestMessage, - leaveGameRequestMessage LeaveGameRequestMessage, - invitePlayerToGameMessage InvitePlayerToGameMessage, - inviteNotifyMessage InviteNotifyMessage, - rejectGameInvitationMessage RejectGameInvitationMessage, - rejectInvNotifyMessage RejectInvNotifyMessage, - startEventMessage StartEventMessage, - startEventAckMessage StartEventAckMessage, - gameStartMessage GameStartMessage, - handStartMessage HandStartMessage, - playersTurnMessage PlayersTurnMessage, - myActionRequestMessage MyActionRequestMessage, - yourActionRejectedMessage YourActionRejectedMessage, - playersActionDoneMessage PlayersActionDoneMessage, - dealFlopCardsMessage DealFlopCardsMessage, - dealTurnCardMessage DealTurnCardMessage, - dealRiverCardMessage DealRiverCardMessage, - allInShowCardsMessage AllInShowCardsMessage, - endOfHandMessage EndOfHandMessage, - showMyCardsRequestMessage ShowMyCardsRequestMessage, - afterHandShowCardsMessage AfterHandShowCardsMessage, - endOfGameMessage EndOfGameMessage, - playerIdChangedMessage PlayerIdChangedMessage, - askKickPlayerMessage AskKickPlayerMessage, - askKickDeniedMessage AskKickDeniedMessage, - startKickPetitionMessage StartKickPetitionMessage, - voteKickRequestMessage VoteKickRequestMessage, - voteKickReplyMessage VoteKickReplyMessage, - kickPetitionUpdateMessage KickPetitionUpdateMessage, - endKickPetitionMessage EndKickPetitionMessage, - statisticsMessage StatisticsMessage, - chatRequestMessage ChatRequestMessage, - chatMessage ChatMessage, - chatRejectMessage ChatRejectMessage, - dialogMessage DialogMessage, - timeoutWarningMessage TimeoutWarningMessage, - resetTimeoutMessage ResetTimeoutMessage, - reportAvatarMessage ReportAvatarMessage, - reportAvatarAckMessage ReportAvatarAckMessage, - reportGameMessage ReportGameMessage, - reportGameAckMessage ReportGameAckMessage, - errorMessage ErrorMessage -} - -AnnounceMessage ::= [APPLICATION 0] SEQUENCE { - protocolVersion Version, - latestGameVersion Version, - latestBetaRevision INTEGER(0..65535), - serverType ENUMERATED { - serverTypeLAN (0), - serverTypeInternetNoAuth (1), - serverTypeInternetAuth (2) - }, - numPlayersOnServer INTEGER(0..65535) -} - --- buildId contains a constant build id (specific for Windows/Linux/Mac builds) -InitMessage ::= [APPLICATION 1] SEQUENCE { - requestedVersion Version, - buildId INTEGER, - myLastSessionId Guid OPTIONAL, - authServerPassword UTF8String (SIZE(1..64)) OPTIONAL, - login CHOICE { - guestLogin [0] GuestLogin, - authenticatedLogin [1] AuthenticatedLogin, - unauthenticatedLogin [2] UnauthenticatedLogin - } -} - -Version ::= SEQUENCE { - major INTEGER(0..65535), - minor INTEGER(0..65535) -} - -GuestLogin ::= SEQUENCE { - nickName UTF8String (SIZE(1..64)) -} - --- Login data is according to SCRAM SHA-1 -AuthenticatedLogin ::= SEQUENCE { - clientUserData OCTET STRING (SIZE(1..256)), - avatar AvatarHash OPTIONAL -} - -UnauthenticatedLogin ::= SEQUENCE { - nickName UTF8String (SIZE(1..64)), - avatar AvatarHash OPTIONAL -} - -AuthMessage ::= [APPLICATION 2] CHOICE { - authServerChallenge [0] AuthServerChallenge, - authClientResponse [1] AuthClientResponse, - authServerVerification [2] AuthServerVerification -} - -AuthServerChallenge ::= SEQUENCE { - serverChallenge OCTET STRING (SIZE(1..256)) -} - -AuthClientResponse ::= SEQUENCE { - clientResponse OCTET STRING (SIZE(1..256)) -} - -AuthServerVerification ::= SEQUENCE { - serverVerification OCTET STRING (SIZE(1..256)) -} - -InitAckMessage ::= [APPLICATION 3] SEQUENCE { - yourSessionId Guid, - yourPlayerId NonZeroId, - yourAvatar AvatarHash OPTIONAL, - rejoinGameId NonZeroId OPTIONAL -} - -AvatarRequestMessage ::= [APPLICATION 4] SEQUENCE { - requestId NonZeroId, - avatar AvatarHash -} - -AvatarReplyMessage ::= [APPLICATION 5] SEQUENCE { - requestId NonZeroId, - avatarResult CHOICE { - avatarHeader [0] AvatarHeader, - avatarData [1] AvatarData, - avatarEnd [2] AvatarEnd, - unknownAvatar [3] UnknownAvatar - } -} - -AvatarHeader ::= SEQUENCE { - avatarType NetAvatarType, - avatarSize INTEGER(32..30720) -} - -AvatarData ::= SEQUENCE { - avatarBlock OCTET STRING (SIZE(1..256)) -} - -AvatarEnd ::= SEQUENCE { -} - -UnknownAvatar ::= SEQUENCE { -} - -AvatarHash ::= OCTET STRING (SIZE(16)) -- md5 hash value - -NetAvatarType ::= ENUMERATED { - avatarImagePng (1), - avatarImageJpg (2), - avatarImageGif (3) -} - -PlayerListMessage ::= [APPLICATION 6] SEQUENCE { - playerId NonZeroId, - playerListNotification ENUMERATED { - playerListNew (0), - playerListLeft (1) - } -} - -GameListMessage ::= [APPLICATION 7] SEQUENCE { - gameId NonZeroId, - gameListNotification CHOICE { - gameListNew [0] GameListNew, - gameListUpdate [1] GameListUpdate, - gameListPlayerJoined [2] GameListPlayerJoined, - gameListPlayerLeft [3] GameListPlayerLeft, - gameListAdminChanged [4] GameListAdminChanged - } -} - -GameListNew ::= SEQUENCE { - gameMode NetGameMode, - isPrivate BOOLEAN, - playerIds SEQUENCE SIZE(0..10) OF NonZeroId, - adminPlayerId NonZeroId, - gameInfo NetGameInfo -} - -GameListUpdate ::= SEQUENCE { - gameMode NetGameMode -} - -GameListPlayerJoined ::= SEQUENCE { - playerId NonZeroId -} - -GameListPlayerLeft ::= SEQUENCE { - playerId NonZeroId -} - -GameListAdminChanged ::= SEQUENCE { - newAdminPlayerId NonZeroId -} - -NetGameMode ::= ENUMERATED { - gameCreated (1), - gameStarted (2), - gameClosed (3) -} - -PlayerInfoRequestMessage ::= [APPLICATION 8] SEQUENCE { - playerId NonZeroId -} - -PlayerInfoReplyMessage ::= [APPLICATION 9] SEQUENCE { - playerId NonZeroId, - playerInfoResult CHOICE { - playerInfoData [0] PlayerInfoData, - unknownPlayerInfo [1] UnknownPlayerInfo - } -} - -PlayerInfoRights ::= ENUMERATED { - playerRightsGuest (1), - playerRightsNormal (2), - playerRightsAdmin (3) -} - -PlayerInfoData ::= SEQUENCE { - playerName UTF8String (SIZE(1..32)), - isHuman BOOLEAN, - playerRights PlayerInfoRights, - countryCode UTF8String (SIZE(2)) OPTIONAL, - avatarData SEQUENCE { - avatarType NetAvatarType, - avatar AvatarHash - } OPTIONAL -} - -UnknownPlayerInfo ::= SEQUENCE { -} - --- The following request will not be confirmed by the server. It is used, --- optionally, to reduce server traffic. The server might ignore it. -SubscriptionRequestMessage ::= [APPLICATION 10] SEQUENCE { - subscriptionAction ENUMERATED { - unsubscribeGameList (1), - resubscribeGameList (2) - } -} - -JoinGameRequestMessage ::= [APPLICATION 11] SEQUENCE { - joinGameAction CHOICE { - joinExistingGame [0] JoinExistingGame, - joinNewGame [1] JoinNewGame, - rejoinExistingGame [2] RejoinExistingGame - }, - autoLeave BOOLEAN -} - -JoinExistingGame ::= SEQUENCE { - gameId NonZeroId, - password UTF8String (SIZE(1..64)) OPTIONAL -} - -JoinNewGame ::= SEQUENCE { - gameInfo NetGameInfo, - password UTF8String (SIZE(1..64)) OPTIONAL -} - -RejoinExistingGame ::= SEQUENCE { - gameId NonZeroId -} - -JoinGameReplyMessage ::= [APPLICATION 12] SEQUENCE { - gameId NonZeroId, - joinGameResult CHOICE { - joinGameAck [0] JoinGameAck, - joinGameFailed [1] JoinGameFailed - } -} - -JoinGameAck ::= SEQUENCE { - areYouGameAdmin BOOLEAN, - gameInfo NetGameInfo -} - -JoinGameFailed ::= SEQUENCE { - joinGameFailureReason ENUMERATED { - invalidGame (1), - gameIsFull (2), - gameIsRunning (3), - invalidPassword (4), - notAllowedAsGuest (5), - notInvited (6), - gameNameInUse (7), - badGameName (8), - invalidSettings (9), - ipAddressBlocked (10), - rejoinFailed (11) - } -} - -NetGameInfo ::= SEQUENCE { - gameName UTF8String (SIZE(1..64)), - netGameType ENUMERATED { - normalGame (1), - registeredOnlyGame (2), - inviteOnlyGame (3), - rankingGame (4) - }, - maxNumPlayers INTEGER(2..10), - raiseIntervalMode CHOICE { - raiseEveryHands [0] INTEGER(1..1000), - raiseEveryMinutes [1] INTEGER(1..1000) - }, - endRaiseMode ENUMERATED { - doubleBlinds (1), - raiseByEndValue (2), - keepLastBlind (3) - }, - proposedGuiSpeed INTEGER(1..11), - delayBetweenHands INTEGER(5..20), -- These are seconds - playerActionTimeout INTEGER(0..60), -- These are seconds - firstSmallBlind INTEGER(1..20000), - endRaiseSmallBlindValue InitialAmountOfMoney, - startMoney InitialNonZeroAmountOfMoney, - manualBlinds SEQUENCE SIZE(0..30) OF InitialNonZeroAmountOfMoney -} - -GamePlayerMessage ::= [APPLICATION 13] SEQUENCE { - gameId NonZeroId, - gamePlayerNotification CHOICE { - gamePlayerJoined [0] GamePlayerJoined, - gamePlayerLeft [1] GamePlayerLeft, - gameAdminChanged [2] GameAdminChanged, - removedFromGame [3] RemovedFromGame - } -} - -GamePlayerJoined ::= SEQUENCE { - playerId NonZeroId, - isGameAdmin BOOLEAN -} - -GamePlayerLeft ::= SEQUENCE { - playerId NonZeroId, - gamePlayerLeftReason ENUMERATED { - leftOnRequest (0), - leftKicked (1), - leftError (2) - } -} - -GameAdminChanged ::= SEQUENCE { - newAdminPlayerId NonZeroId -} - -RemovedFromGame ::= SEQUENCE { - removedFromGameReason ENUMERATED { - removedOnRequest (0), -- No error, client wished to leave. - kickedFromGame (1), - gameIsFull (2), - gameIsRunning (3), - gameTimeout (4), - removedStartFailed (5) - } -} - -KickPlayerRequestMessage ::= [APPLICATION 14] SEQUENCE { - gameId NonZeroId, - playerId NonZeroId -} - -LeaveGameRequestMessage ::= [APPLICATION 15] SEQUENCE { - gameId NonZeroId -} - -InvitePlayerToGameMessage ::= [APPLICATION 16] SEQUENCE { - gameId NonZeroId, - playerId NonZeroId -} - -InviteNotifyMessage ::= [APPLICATION 17] SEQUENCE { - gameId NonZeroId, - playerIdWho NonZeroId, - playerIdByWhom NonZeroId -} - -RejectGameInvReason ::= ENUMERATED { - no (0), - busy (1) -} - -RejectGameInvitationMessage ::= [APPLICATION 18] SEQUENCE { - gameId NonZeroId, - myRejectReason RejectGameInvReason -} - -RejectInvNotifyMessage ::= [APPLICATION 19] SEQUENCE { - gameId NonZeroId, - playerId NonZeroId, - playerRejectReason RejectGameInvReason -} - -StartEventMessage ::= [APPLICATION 20] SEQUENCE { - gameId NonZeroId, - startEventType CHOICE { - startEvent [0] StartEvent, - rejoinEvent [1] RejoinEvent - } -} - -StartEvent ::= SEQUENCE { - fillWithComputerPlayers BOOLEAN -} - -RejoinEvent ::= SEQUENCE { -} - -StartEventAckMessage ::= [APPLICATION 21] SEQUENCE { - gameId NonZeroId -} - -RejoinPlayerData ::= SEQUENCE { - playerId NonZeroId, - playerMoney AmountOfMoney -} - -GameStartModeInitial ::= SEQUENCE { - playerSeats SEQUENCE SIZE(2..10) OF NonZeroId -} - -GameStartModeRejoin ::= SEQUENCE { - handNum NonZeroId, - rejoinPlayerData SEQUENCE SIZE(2..10) OF RejoinPlayerData -} - -GameStartMessage ::= [APPLICATION 22] SEQUENCE { - gameId NonZeroId, - startDealerPlayerId NonZeroId, - gameStartMode CHOICE { - gameStartModeInitial [0] GameStartModeInitial, - gameStartModeRejoin [1] GameStartModeRejoin - } -} - -PlainCards ::= SEQUENCE { - plainCard1 Card, - plainCard2 Card -} - -EncryptedCards ::= SEQUENCE { - cardData OCTET STRING (SIZE(16..64)) -} - -HandStartMessage ::= [APPLICATION 23] SEQUENCE { - gameId NonZeroId, - yourCards CHOICE { - plainCards [0] PlainCards, - encryptedCards [1] EncryptedCards - }, - smallBlind INTEGER(1..100000000), - seatStates SEQUENCE SIZE(2..10) OF NetPlayerState -} - -PlayersTurnMessage ::= [APPLICATION 24] SEQUENCE { - gameId NonZeroId, - playerId NonZeroId, - gameState NetGameState -} - -MyActionRequestMessage ::= [APPLICATION 25] SEQUENCE { - gameId NonZeroId, - handNum NonZeroId, - gameState NetGameState, - myAction NetPlayerAction, - myRelativeBet AmountOfMoney -} - -YourActionRejectedMessage ::= [APPLICATION 26] SEQUENCE { - gameId NonZeroId, - gameState NetGameState, - yourAction NetPlayerAction, - yourRelativeBet AmountOfMoney, - rejectionReason ENUMERATED { - rejectedInvalidGameState (1), - rejectedNotYourTurn (2), - rejectedActionNotAllowed (3) - } -} - -PlayersActionDoneMessage ::= [APPLICATION 27] SEQUENCE { - gameId NonZeroId, - playerId NonZeroId, - gameState NetGameState, - playerAction NetPlayerAction, - totalPlayerBet AmountOfMoney, - playerMoney AmountOfMoney, - highestSet AmountOfMoney, - minimumRaise AmountOfMoney -} - -DealFlopCardsMessage ::= [APPLICATION 28] SEQUENCE { - gameId NonZeroId, - flopCard1 Card, - flopCard2 Card, - flopCard3 Card -} - -DealTurnCardMessage ::= [APPLICATION 29] SEQUENCE { - gameId NonZeroId, - turnCard Card -} - -DealRiverCardMessage ::= [APPLICATION 30] SEQUENCE { - gameId NonZeroId, - riverCard Card -} - -AllInShowCardsMessage ::= [APPLICATION 31] SEQUENCE { - gameId NonZeroId, - playersAllIn SEQUENCE SIZE(1..10) OF PlayerAllIn -} - -PlayerAllIn ::= SEQUENCE { - playerId NonZeroId, - allInCard1 Card, - allInCard2 Card -} - -EndOfHandMessage ::= [APPLICATION 32] SEQUENCE { - gameId NonZeroId, - endOfHandType CHOICE { - endOfHandShowCards [0] EndOfHandShowCards, - endOfHandHideCards [1] EndOfHandHideCards - } -} - -EndOfHandShowCards ::= SEQUENCE { - playerResults SEQUENCE SIZE(1..10) OF PlayerResult -} - -PlayerResult ::= SEQUENCE { - playerId NonZeroId, - resultCard1 Card, - resultCard2 Card, - bestHandPosition SEQUENCE SIZE(5) OF INTEGER, -- TODO size restrictions - moneyWon AmountOfMoney, - playerMoney AmountOfMoney, - cardsValue INTEGER OPTIONAL -} - -EndOfHandHideCards ::= SEQUENCE { - playerId NonZeroId, - moneyWon AmountOfMoney, - playerMoney AmountOfMoney -} - -ShowMyCardsRequestMessage ::= [APPLICATION 33] SEQUENCE { -} - -AfterHandShowCardsMessage ::= [APPLICATION 34] SEQUENCE { - playerResult PlayerResult -} - -EndOfGameMessage ::= [APPLICATION 35] SEQUENCE { - gameId NonZeroId, - winnerPlayerId NonZeroId -} - -PlayerIdChangedMessage ::= [APPLICATION 36] SEQUENCE { - oldPlayerId NonZeroId, - newPlayerId NonZeroId -} - -AskKickPlayerMessage ::= [APPLICATION 64] SEQUENCE { - gameId NonZeroId, - playerId NonZeroId -} - -AskKickDeniedMessage ::= [APPLICATION 65] SEQUENCE { - gameId NonZeroId, - playerId NonZeroId, - kickDeniedReason ENUMERATED { - kickDeniedInvalidGameState (0), - kickDeniedNotPossible (1), - kickDeniedTryAgainLater (2), - kickDeniedAlreadyInProgress (3), - kickDeniedInvalidPlayerId (4) - } -} - -StartKickPetitionMessage ::= [APPLICATION 66] SEQUENCE { - gameId NonZeroId, - petitionId NonZeroId, - proposingPlayerId NonZeroId, - kickPlayerId NonZeroId, - kickTimeoutSec INTEGER(1..120), - numVotesNeededToKick INTEGER(1..9) -} - -VoteKickRequestMessage ::= [APPLICATION 67] SEQUENCE { - gameId NonZeroId, - petitionId NonZeroId, - voteKick BOOLEAN -} - -VoteKickReplyMessage ::= [APPLICATION 68] SEQUENCE { - gameId NonZeroId, - petitionId NonZeroId, - voteKickReplyType CHOICE { - voteKickAck [0] VoteKickAck, - voteKickDenied [1] VoteKickDenied - } -} - -VoteKickAck ::= SEQUENCE { -} - -VoteKickDenied ::= SEQUENCE { - voteKickDeniedReason ENUMERATED { - voteKickDeniedInvalid (0), - voteKickDeniedAlreadyVoted (1) - } -} - -KickPetitionUpdateMessage ::= [APPLICATION 69] SEQUENCE { - gameId NonZeroId, - petitionId NonZeroId, - numVotesAgainstKicking INTEGER(0..9), - numVotesInFavourOfKicking INTEGER(1..9), - numVotesNeededToKick INTEGER(1..9) -} - -EndKickPetitionMessage ::= [APPLICATION 70] SEQUENCE { - gameId NonZeroId, - petitionId NonZeroId, - numVotesAgainstKicking INTEGER(0..9), - numVotesInFavourOfKicking INTEGER(1..9), - resultPlayerKicked BOOLEAN, - petitionEndReason ENUMERATED { - petitionEndEnoughVotes (0), - petitionEndTooFewPlayers (1), - petitionEndPlayerLeft (2), - petitionEndTimeout (3) - } -} - -StatisticsMessage ::= [APPLICATION 128] SEQUENCE { - statisticsData SEQUENCE SIZE(1..32) OF StatisticsData -} - -StatisticsData ::= SEQUENCE { - statisticsType ENUMERATED { - statNumberOfPlayers (1) - }, - statisticsValue INTEGER -} - -ChatRequestMessage ::= [APPLICATION 129] SEQUENCE { - chatRequestType CHOICE { - chatRequestTypeLobby [0] ChatRequestTypeLobby, - chatRequestTypeGame [1] ChatRequestTypeGame, - chatRequestTypePrivate [2] ChatRequestTypePrivate - }, - chatText UTF8String (SIZE(1..128)) -} - -ChatRequestTypeLobby ::= SEQUENCE { -} - -ChatRequestTypeGame ::= SEQUENCE { - gameId NonZeroId -} - -ChatRequestTypePrivate ::= SEQUENCE { - targetPlayerId NonZeroId -} - -ChatMessage ::= [APPLICATION 130] SEQUENCE { - chatType CHOICE { - chatTypeLobby [0] ChatTypeLobby, - chatTypeGame [1] ChatTypeGame, - chatTypeBot [2] ChatTypeBot, - chatTypeBroadcast [3] ChatTypeBroadcast, - chatTypePrivate [4] ChatTypePrivate - }, - chatText UTF8String (SIZE(1..128)) -} - -ChatTypeLobby ::= SEQUENCE { - playerId NonZeroId -} - -ChatTypeGame ::= SEQUENCE { - gameId NonZeroId, - playerId NonZeroId -} - -ChatTypeBroadcast ::= SEQUENCE { -} - -ChatTypeBot ::= SEQUENCE { -} - -ChatTypePrivate ::= SEQUENCE { - playerId NonZeroId -} - -ChatRejectMessage ::= [APPLICATION 131] SEQUENCE { - chatText UTF8String (SIZE(1..128)) -} - -DialogMessage ::= [APPLICATION 132] SEQUENCE { - notificationText UTF8String (SIZE(1..128)) -} - -TimeoutWarningMessage ::= [APPLICATION 133] SEQUENCE { - timeoutReason ENUMERATED { - timeoutNoDataReceived (0), - timeoutInactiveGame (1), - timeoutKickAfterAutofold (2) - }, - remainingSeconds INTEGER -} - -ResetTimeoutMessage ::= [APPLICATION 134] SEQUENCE { -} - -ReportAvatarMessage ::= [APPLICATION 135] SEQUENCE { - reportedPlayerId NonZeroId, - reportedAvatar AvatarHash -} - -ReportAvatarAckMessage ::= [APPLICATION 136] SEQUENCE { - reportedPlayerId NonZeroId, - reportAvatarResult ENUMERATED { - avatarReportAccepted (0), - avatarReportDuplicate (1), - avatarReportInvalid (2) - } -} - -ReportGameMessage ::= [APPLICATION 137] SEQUENCE { - reportedGameId NonZeroId -} - -ReportGameAckMessage ::= [APPLICATION 138] SEQUENCE { - reportedGameId NonZeroId, - reportGameResult ENUMERATED { - gameReportAccepted (0), - gameReportDuplicate (1), - gameReportInvalid (2) - } -} - -ErrorMessage ::= [APPLICATION 255] SEQUENCE { - errorReason ENUMERATED { - errorReserved (0), - errorInitVersionNotSupported (1), - errorInitServerFull (2), - errorInitAuthFailure (3), - errorInitPlayerNameInUse (4), - errorInitInvalidPlayerName (5), - errorInitServerMaintenance (6), - errorInitBlocked (7), - errorAvatarTooLarge (8), - errorInvalidPacket (256), - errorInvalidState (257), - errorKickedFromServer (258), - errorBannedFromServer (259), - errorBlockedByServer (260), - errorSessionTimeout (261) - } -} - -NetGameState ::= ENUMERATED { - statePreflop (0), - stateFlop (1), - stateTurn (2), - stateRiver (3), - statePreflopSmallBlind (4), - statePreflopBigBlind (5) -} - -NetPlayerAction ::= ENUMERATED { - actionNone (0), - actionFold (1), - actionCheck (2), - actionCall (3), - actionBet (4), - actionRaise (5), - actionAllIn (6) -} - -NetPlayerState ::= ENUMERATED { - playerStateNormal (0), - playerStateSessionInactive (1), - playerStateNoMoney (2) -} - -NonZeroId ::= INTEGER(1..4294967295) - -Id ::= INTEGER(0..4294967295) - -Guid ::= OCTET STRING (SIZE(16)) - -Card ::= INTEGER(0..51) - -AmountOfMoney ::= INTEGER(0..10000000) -InitialAmountOfMoney ::= INTEGER(0..1000000) -InitialNonZeroAmountOfMoney ::= INTEGER(1..1000000) - -END