More work on ASN.1 protocol spec.
This commit is contained in:
+150
-18
@@ -31,9 +31,20 @@ PokerTHMessage ::= CHOICE {
|
|||||||
gameListMessage GameListMessage,
|
gameListMessage GameListMessage,
|
||||||
playerInfoRequestMessage PlayerInfoRequestMessage,
|
playerInfoRequestMessage PlayerInfoRequestMessage,
|
||||||
playerInfoReplyMessage PlayerInfoReplyMessage,
|
playerInfoReplyMessage PlayerInfoReplyMessage,
|
||||||
subscriptionMessage SubscriptionMessage,
|
subscriptionRequestMessage SubscriptionRequestMessage,
|
||||||
joinGameRequestMessage JoinGameRequestMessage,
|
joinGameRequestMessage JoinGameRequestMessage,
|
||||||
joinGameReplyMessage JoinGameReplyMessage
|
joinGameReplyMessage JoinGameReplyMessage,
|
||||||
|
gamePlayerMessage GamePlayerMessage,
|
||||||
|
kickPlayerRequestMessage KickPlayerRequestMessage,
|
||||||
|
leaveGameRequestMessage LeaveGameRequestMessage,
|
||||||
|
startEventMessage StartEventMessage,
|
||||||
|
startEventAckMessage StartEventAckMessage,
|
||||||
|
gameStartMessage GameStartMessage,
|
||||||
|
handStartMessage HandStartMessage,
|
||||||
|
playersTurnMessage PlayersTurnMessage,
|
||||||
|
myActionRequestMessage MyActionRequestMessage,
|
||||||
|
yourActionRejectedMessage YourActionRejectedMessage,
|
||||||
|
playersActionDoneMessage PlayersActionDoneMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
InitMessage ::= [APPLICATION 0] SEQUENCE {
|
InitMessage ::= [APPLICATION 0] SEQUENCE {
|
||||||
@@ -45,6 +56,11 @@ InitMessage ::= [APPLICATION 0] SEQUENCE {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Version ::= SEQUENCE {
|
||||||
|
major INTEGER(0..65535),
|
||||||
|
minor INTEGER(0..65535)
|
||||||
|
}
|
||||||
|
|
||||||
AnonymousLogin ::= SEQUENCE {
|
AnonymousLogin ::= SEQUENCE {
|
||||||
playerName UTF8String
|
playerName UTF8String
|
||||||
}
|
}
|
||||||
@@ -82,6 +98,14 @@ AvatarData ::= SEQUENCE {
|
|||||||
UnknownAvatar ::= SEQUENCE {
|
UnknownAvatar ::= SEQUENCE {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AvatarHash ::= OCTET STRING (SIZE(20)) -- sha-1 hash value
|
||||||
|
|
||||||
|
AvatarType ::= ENUMERATED {
|
||||||
|
imagePng (1),
|
||||||
|
imageJpg (2),
|
||||||
|
imageGif (3)
|
||||||
|
}
|
||||||
|
|
||||||
GameListMessage ::= [APPLICATION 4] SEQUENCE {
|
GameListMessage ::= [APPLICATION 4] SEQUENCE {
|
||||||
gameId NonZeroId,
|
gameId NonZeroId,
|
||||||
gameListNotification CHOICE {
|
gameListNotification CHOICE {
|
||||||
@@ -117,6 +141,12 @@ GameListAdminChanged ::= SEQUENCE {
|
|||||||
newAdminPlayerId NonZeroId
|
newAdminPlayerId NonZeroId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GameMode ::= ENUMERATED {
|
||||||
|
gameCreated (1),
|
||||||
|
gameStarted (2),
|
||||||
|
gameClosed (3)
|
||||||
|
}
|
||||||
|
|
||||||
PlayerInfoRequestMessage ::= [APPLICATION 5] SEQUENCE {
|
PlayerInfoRequestMessage ::= [APPLICATION 5] SEQUENCE {
|
||||||
playerId NonZeroId
|
playerId NonZeroId
|
||||||
}
|
}
|
||||||
@@ -141,7 +171,10 @@ PlayerInfoData ::= SEQUENCE {
|
|||||||
UnknownPlayerInfo ::= SEQUENCE {
|
UnknownPlayerInfo ::= SEQUENCE {
|
||||||
}
|
}
|
||||||
|
|
||||||
SubscriptionMessage ::= [APPLICATION 7] 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 7] SEQUENCE {
|
||||||
subscriptionAction ENUMERATED {
|
subscriptionAction ENUMERATED {
|
||||||
unsubscribeGameList (1),
|
unsubscribeGameList (1),
|
||||||
resubscribeGameList (2)
|
resubscribeGameList (2)
|
||||||
@@ -188,7 +221,7 @@ JoinGameFailed ::= SEQUENCE {
|
|||||||
|
|
||||||
GameInfo ::= SEQUENCE {
|
GameInfo ::= SEQUENCE {
|
||||||
gameName UTF8String,
|
gameName UTF8String,
|
||||||
maxNumPlayers NumPlayers,
|
maxNumPlayers INTEGER(2..10),
|
||||||
raiseIntervalMode CHOICE {
|
raiseIntervalMode CHOICE {
|
||||||
raiseEveryHands [0] INTEGER(1..1000),
|
raiseEveryHands [0] INTEGER(1..1000),
|
||||||
raiseEveryMinutes [1] INTEGER(1..1000)
|
raiseEveryMinutes [1] INTEGER(1..1000)
|
||||||
@@ -206,29 +239,128 @@ GameInfo ::= SEQUENCE {
|
|||||||
manualBlinds SEQUENCE SIZE(0..30) OF INTEGER(1..20001)
|
manualBlinds SEQUENCE SIZE(0..30) OF INTEGER(1..20001)
|
||||||
}
|
}
|
||||||
|
|
||||||
GameMode ::= ENUMERATED {
|
GamePlayerMessage ::= [APPLICATION 10] SEQUENCE {
|
||||||
created (1),
|
gameId NonZeroId,
|
||||||
started (2),
|
gamePlayerNotification CHOICE {
|
||||||
closed (3)
|
gamePlayerJoined [0] GamePlayerJoined,
|
||||||
|
gamePlayerLeft [1] GamePlayerLeft,
|
||||||
|
gameAdminChanged [2] GameAdminChanged,
|
||||||
|
removedFromGame [3] RemovedFromGame
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AvatarHash ::= OCTET STRING (SIZE(20)) -- sha-1 hash value
|
GamePlayerJoined ::= SEQUENCE {
|
||||||
|
playerId NonZeroId
|
||||||
AvatarType ::= ENUMERATED {
|
|
||||||
png (1),
|
|
||||||
jpg (2),
|
|
||||||
gif (3)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Version ::= SEQUENCE {
|
GamePlayerLeft ::= SEQUENCE {
|
||||||
major INTEGER(0..65535),
|
playerId NonZeroId
|
||||||
minor INTEGER(0..65535)
|
}
|
||||||
|
|
||||||
|
GameAdminChanged ::= SEQUENCE {
|
||||||
|
newAdminPlayerId NonZeroId
|
||||||
|
}
|
||||||
|
|
||||||
|
RemovedFromGame ::= SEQUENCE {
|
||||||
|
removedFromGameReason ENUMERATED {
|
||||||
|
removedOnRequest (0), -- No error, client wished to leave.
|
||||||
|
kickedFromGame (1),
|
||||||
|
gameIsFull (2),
|
||||||
|
gameIsRunning (3),
|
||||||
|
gameTimeout (4)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
KickPlayerRequestMessage ::= [APPLICATION 11] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
playerId NonZeroId
|
||||||
|
}
|
||||||
|
|
||||||
|
LeaveGameRequestMessage ::= [APPLICATION 12] SEQUENCE {
|
||||||
|
gameId NonZeroId
|
||||||
|
}
|
||||||
|
|
||||||
|
StartEventMessage ::= [APPLICATION 13] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
fillWithComputerPlayers BOOLEAN
|
||||||
|
}
|
||||||
|
|
||||||
|
StartEventAckMessage ::= [APPLICATION 14] SEQUENCE {
|
||||||
|
gameId NonZeroId
|
||||||
|
}
|
||||||
|
|
||||||
|
GameStartMessage ::= [APPLICATION 15] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
startDealerPlayerId NonZeroId,
|
||||||
|
playerSeats SEQUENCE SIZE(2..10) OF NonZeroId
|
||||||
|
}
|
||||||
|
|
||||||
|
HandStartMessage ::= [APPLICATION 16] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
yourFirstCard Card,
|
||||||
|
yourSecondCard Card,
|
||||||
|
smallBlind INTEGER(1..20001)
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayersTurnMessage ::= [APPLICATION 17] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
playerId NonZeroId,
|
||||||
|
gameState GameState
|
||||||
|
}
|
||||||
|
|
||||||
|
MyActionRequestMessage ::= [APPLICATION 18] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
gameState GameState,
|
||||||
|
myAction PlayerAction,
|
||||||
|
myRelativeBet INTEGER(0..10000000)
|
||||||
|
}
|
||||||
|
|
||||||
|
YourActionRejectedMessage ::= [APPLICATION 19] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
gameState GameState,
|
||||||
|
yourAction PlayerAction,
|
||||||
|
yourRelativeBet INTEGER(0..10000000),
|
||||||
|
rejectionReason ENUMERATED {
|
||||||
|
rejectedInvalidGameState (1),
|
||||||
|
rejectedNotYourTurn (2),
|
||||||
|
rejectedActionNotAllowed (3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayersActionDoneMessage ::= [APPLICATION 20] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
playerId NonZeroId,
|
||||||
|
gameState GameState,
|
||||||
|
playerAction PlayerAction,
|
||||||
|
totalPlayerBet INTEGER(0..10000000),
|
||||||
|
playerMoney INTEGER(0..10000000),
|
||||||
|
highestSet INTEGER(0..10000000),
|
||||||
|
minimumRaise INTEGER(0..10000000) -- TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
GameState ::= ENUMERATED {
|
||||||
|
statePreflop (0),
|
||||||
|
stateFlop (1),
|
||||||
|
stateTurn (2),
|
||||||
|
stateRiver (3),
|
||||||
|
statePreflopSmallBlind (4),
|
||||||
|
statePreflopBigBlind (5)
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerAction ::= ENUMERATED {
|
||||||
|
actionNone (0),
|
||||||
|
actionFold (1),
|
||||||
|
actionCheck (2),
|
||||||
|
actionCall (3),
|
||||||
|
actionBet (4),
|
||||||
|
actionRaise (5),
|
||||||
|
actionAllIn (6)
|
||||||
}
|
}
|
||||||
|
|
||||||
NonZeroId ::= INTEGER(1..4294967295)
|
NonZeroId ::= INTEGER(1..4294967295)
|
||||||
|
|
||||||
Guid ::= INTEGER(1..4294967295) -- TODO
|
Guid ::= INTEGER(1..4294967295) -- TODO
|
||||||
|
|
||||||
NumPlayers ::= INTEGER(1..10)
|
Card ::= INTEGER(0..51)
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|||||||
Reference in New Issue
Block a user