Preparing network protocol for rejoin.

This commit is contained in:
lotodore
2011-07-16 14:52:45 +00:00
parent 711091bcd9
commit e109c0037d
303 changed files with 8477 additions and 7528 deletions
+28 -4
View File
@@ -96,6 +96,7 @@ AnnounceMessage ::= [APPLICATION 0] SEQUENCE {
InitMessage ::= [APPLICATION 1] SEQUENCE {
requestedVersion Version,
buildId INTEGER,
myLastSessionId Guid,
login CHOICE {
guestLogin [0] GuestLogin,
authenticatedLogin [1] AuthenticatedLogin,
@@ -144,7 +145,8 @@ AuthServerVerification ::= SEQUENCE {
InitAckMessage ::= [APPLICATION 3] SEQUENCE {
yourSessionId Guid,
yourPlayerId NonZeroId,
yourAvatar AvatarHash OPTIONAL
yourAvatar AvatarHash OPTIONAL,
rejoinGameId NonZeroId OPTIONAL
}
AvatarRequestMessage ::= [APPLICATION 4] SEQUENCE {
@@ -279,7 +281,8 @@ SubscriptionRequestMessage ::= [APPLICATION 10] SEQUENCE {
JoinGameRequestMessage ::= [APPLICATION 11] SEQUENCE {
joinGameAction CHOICE {
joinExistingGame [0] JoinExistingGame,
joinNewGame [1] JoinNewGame
joinNewGame [1] JoinNewGame,
rejoinExistingGame [2] RejoinExistingGame
},
password UTF8String (SIZE(1..64)) OPTIONAL,
autoLeave BOOLEAN
@@ -293,6 +296,10 @@ JoinNewGame ::= SEQUENCE {
gameInfo NetGameInfo
}
RejoinExistingGame ::= SEQUENCE {
gameId NonZeroId
}
JoinGameReplyMessage ::= [APPLICATION 12] SEQUENCE {
gameId NonZeroId,
joinGameResult CHOICE {
@@ -317,7 +324,8 @@ JoinGameFailed ::= SEQUENCE {
gameNameInUse (7),
badGameName (8),
invalidSettings (9),
ipAddressBlocked (10)
ipAddressBlocked (10),
rejoinFailed (11)
}
}
@@ -432,10 +440,26 @@ StartEventAckMessage ::= [APPLICATION 21] SEQUENCE {
gameId NonZeroId
}
RejoinPlayerData ::= SEQUENCE {
playerId NonZeroId,
playerMoney INTEGER(0..10000000)
}
GameStartModeInitial ::= SEQUENCE {
playerSeats SEQUENCE SIZE(2..10) OF NonZeroId
}
GameStartModeRejoin ::= SEQUENCE {
rejoinPlayerData SEQUENCE SIZE(2..10) OF RejoinPlayerData
}
GameStartMessage ::= [APPLICATION 22] SEQUENCE {
gameId NonZeroId,
startDealerPlayerId NonZeroId,
playerSeats SEQUENCE SIZE(2..10) OF NonZeroId
gameStartMode CHOICE {
gameStartModeInitial [0] GameStartModeInitial,
gameStartModeRejoin [1] GameStartModeRejoin
}
}
PlainCards ::= SEQUENCE {
+8
View File
@@ -94,6 +94,8 @@ HEADERS += src/third_party/asn1/AllInShowCardsMessage.h \
src/third_party/asn1/GamePlayerLeft.h \
src/third_party/asn1/GamePlayerMessage.h \
src/third_party/asn1/GameStartMessage.h \
src/third_party/asn1/GameStartModeInitial.h \
src/third_party/asn1/GameStartModeRejoin.h \
src/third_party/asn1/Guid.h \
src/third_party/asn1/HandStartMessage.h \
src/third_party/asn1/Id.h \
@@ -138,6 +140,8 @@ HEADERS += src/third_party/asn1/AllInShowCardsMessage.h \
src/third_party/asn1/RejectGameInvitationMessage.h \
src/third_party/asn1/RejectGameInvReason.h \
src/third_party/asn1/RejectInvNotifyMessage.h \
src/third_party/asn1/RejoinExistingGame.h \
src/third_party/asn1/RejoinPlayerData.h \
src/third_party/asn1/RemovedFromGame.h \
src/third_party/asn1/ResetTimeoutMessage.h \
src/third_party/asn1/StartEventAckMessage.h \
@@ -245,6 +249,8 @@ SOURCES += src/third_party/asn1/ChatCleanerMessage.c \
src/third_party/asn1/HandStartMessage.c \
src/third_party/asn1/Guid.c \
src/third_party/asn1/GameStartMessage.c \
src/third_party/asn1/GameStartModeInitial.c \
src/third_party/asn1/GameStartModeRejoin.c \
src/third_party/asn1/GamePlayerMessage.c \
src/third_party/asn1/GamePlayerLeft.c \
src/third_party/asn1/GamePlayerJoined.c \
@@ -306,6 +312,8 @@ SOURCES += src/third_party/asn1/ChatCleanerMessage.c \
src/third_party/asn1/RejectGameInvitationMessage.c \
src/third_party/asn1/RejectInvNotifyMessage.c \
src/third_party/asn1/RejectGameInvReason.c \
src/third_party/asn1/RejoinExistingGame.c \
src/third_party/asn1/RejoinPlayerData.c \
src/third_party/asn1/AfterHandShowCardsMessage.c \
src/third_party/asn1/ShowMyCardsRequestMessage.c \
src/third_party/asn1/EncryptedCards.c \
+7 -3
View File
@@ -1485,13 +1485,17 @@ ClientStateWaitStart::InternalHandlePacket(boost::shared_ptr<ClientThread> clien
GameStartMessage_t *netGameStart = &tmpPacket->GetMsg()->choice.gameStartMessage;
StartData startData;
startData.numberOfPlayers = netGameStart->playerSeats.list.count;
startData.startDealerPlayerId = netGameStart->startDealerPlayerId;
if (netGameStart->gameStartMode.present != gameStartMode_PR_gameStartModeInitial)
throw ClientException(__FILE__, __LINE__, ERR_NET_INTERNAL_GAME_ERROR, 0);
GameStartModeInitial_t *netStartModeInitial = &netGameStart->gameStartMode.choice.gameStartModeInitial;
startData.numberOfPlayers = netStartModeInitial->playerSeats.list.count;
client->SetStartData(startData);
// Set player numbers using the game start data slots.
NonZeroId_t **playerIds = netGameStart->playerSeats.list.array;
unsigned numPlayers = netGameStart->playerSeats.list.count;
NonZeroId_t **playerIds = netStartModeInitial->playerSeats.list.array;
unsigned numPlayers = netStartModeInitial->playerSeats.list.count;
// Request player info for players if needed.
if (numPlayers && playerIds && *playerIds) {
for (unsigned i = 0; i < numPlayers; i++) {
+3 -1
View File
@@ -721,6 +721,8 @@ ServerGameStateStartGame::DoStart(boost::shared_ptr<ServerGame> server)
GameStartMessage_t *netGameStart = &packet->GetMsg()->choice.gameStartMessage;
netGameStart->gameId = server->GetId();
netGameStart->startDealerPlayerId = server->GetStartData().startDealerPlayerId;
netGameStart->gameStartMode.present = gameStartMode_PR_gameStartModeInitial;
GameStartModeInitial_t *netStartModeInitial = &netGameStart->gameStartMode.choice.gameStartModeInitial;
// Send player order to clients.
// Assume player list is sorted by number.
@@ -729,7 +731,7 @@ ServerGameStateStartGame::DoStart(boost::shared_ptr<ServerGame> server)
while (player_i != player_end) {
NonZeroId_t *playerSlot = (NonZeroId_t *)calloc(1, sizeof(NonZeroId_t));
*playerSlot = (*player_i)->GetUniqueId();
ASN_SEQUENCE_ADD(&netGameStart->playerSeats.list, playerSlot);
ASN_SEQUENCE_ADD(&netStartModeInitial->playerSeats.list, playerSlot);
++player_i;
}
+1 -1
View File
@@ -23,7 +23,7 @@ static ber_tlv_tag_t asn_DEF_AfkWarningMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AfkWarningMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* remainingTimeouts at 719 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* remainingTimeouts at 742 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AfkWarningMessage_specs_1 = {
sizeof(struct AfkWarningMessage),
+1 -1
View File
@@ -23,7 +23,7 @@ static ber_tlv_tag_t asn_DEF_AfterHandShowCardsMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AfterHandShowCardsMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* playerResult at 557 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* playerResult at 580 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AfterHandShowCardsMessage_specs_1 = {
sizeof(struct AfterHandShowCardsMessage),
+2 -2
View File
@@ -102,8 +102,8 @@ static ber_tlv_tag_t asn_DEF_AllInShowCardsMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AllInShowCardsMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 514 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* playersAllIn at 516 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 537 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* playersAllIn at 539 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AllInShowCardsMessage_specs_1 = {
sizeof(struct AllInShowCardsMessage),
+2 -1
View File
@@ -26,7 +26,8 @@ typedef enum serverType {
serverType_serverTypeLAN = 0,
serverType_serverTypeInternetNoAuth = 1,
serverType_serverTypeInternetAuth = 2
} e_serverType;
}
e_serverType;
/* AnnounceMessage */
typedef struct AnnounceMessage {
+3 -3
View File
@@ -164,9 +164,9 @@ static ber_tlv_tag_t asn_DEF_AskKickDeniedMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AskKickDeniedMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 570 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* playerId at 571 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 } /* kickDeniedReason at 573 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 593 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* playerId at 594 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 } /* kickDeniedReason at 596 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AskKickDeniedMessage_specs_1 = {
sizeof(struct AskKickDeniedMessage),
+2 -1
View File
@@ -27,7 +27,8 @@ typedef enum kickDeniedReason {
kickDeniedReason_kickDeniedTryAgainLater = 2,
kickDeniedReason_kickDeniedAlreadyInProgress = 3,
kickDeniedReason_kickDeniedInvalidPlayerId = 4
} e_kickDeniedReason;
}
e_kickDeniedReason;
/* AskKickDeniedMessage */
typedef struct AskKickDeniedMessage {
+2 -2
View File
@@ -32,8 +32,8 @@ static ber_tlv_tag_t asn_DEF_AskKickPlayerMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AskKickPlayerMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 565 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 567 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 588 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 590 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AskKickPlayerMessage_specs_1 = {
sizeof(struct AskKickPlayerMessage),
+1 -1
View File
@@ -48,7 +48,7 @@ static ber_tlv_tag_t asn_DEF_AuthClientResponse_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AuthClientResponse_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* clientResponse at 137 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* clientResponse at 138 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AuthClientResponse_specs_1 = {
sizeof(struct AuthClientResponse),
+3 -3
View File
@@ -40,9 +40,9 @@ static ber_tlv_tag_t asn_DEF_AuthMessage_tags_1[] = {
(ASN_TAG_CLASS_APPLICATION | (2 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AuthMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* authServerChallenge at 127 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* authClientResponse at 128 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* authServerVerification at 130 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* authServerChallenge at 128 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* authClientResponse at 129 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* authServerVerification at 131 */
};
static asn_CHOICE_specifics_t asn_SPC_AuthMessage_specs_1 = {
sizeof(struct AuthMessage),
+2 -1
View File
@@ -29,7 +29,8 @@ typedef enum AuthMessage_PR {
AuthMessage_PR_authServerVerification,
/* Extensions may appear below */
} AuthMessage_PR;
}
AuthMessage_PR;
/* AuthMessage */
typedef struct AuthMessage {
+1 -1
View File
@@ -48,7 +48,7 @@ static ber_tlv_tag_t asn_DEF_AuthServerChallenge_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AuthServerChallenge_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* serverChallenge at 133 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* serverChallenge at 134 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AuthServerChallenge_specs_1 = {
sizeof(struct AuthServerChallenge),
+1 -1
View File
@@ -48,7 +48,7 @@ static ber_tlv_tag_t asn_DEF_AuthServerVerification_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AuthServerVerification_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* serverVerification at 141 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* serverVerification at 142 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AuthServerVerification_specs_1 = {
sizeof(struct AuthServerVerification),
+2 -2
View File
@@ -57,8 +57,8 @@ static ber_tlv_tag_t asn_DEF_AuthenticatedLogin_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AuthenticatedLogin_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 1 }, /* clientUserData at 117 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 0 } /* avatar at 118 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 1 }, /* clientUserData at 118 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 0 } /* avatar at 119 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AuthenticatedLogin_specs_1 = {
sizeof(struct AuthenticatedLogin),
+1 -1
View File
@@ -48,7 +48,7 @@ static ber_tlv_tag_t asn_DEF_AvatarData_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AvatarData_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* avatarBlock at 171 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* avatarBlock at 173 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AvatarData_specs_1 = {
sizeof(struct AvatarData),
+2 -2
View File
@@ -56,8 +56,8 @@ static ber_tlv_tag_t asn_DEF_AvatarHeader_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AvatarHeader_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* avatarSize at 167 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* avatarType at 166 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* avatarSize at 169 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* avatarType at 168 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AvatarHeader_specs_1 = {
sizeof(struct AvatarHeader),
+9 -9
View File
@@ -46,10 +46,10 @@ static asn_TYPE_member_t asn_MBR_avatarResult_3[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_avatarResult_tag2el_3[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* avatarHeader at 158 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* avatarData at 159 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* avatarEnd at 160 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* unknownAvatar at 162 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* avatarHeader at 160 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* avatarData at 161 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* avatarEnd at 162 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* unknownAvatar at 164 */
};
static asn_CHOICE_specifics_t asn_SPC_avatarResult_specs_3 = {
sizeof(struct avatarResult),
@@ -109,11 +109,11 @@ static ber_tlv_tag_t asn_DEF_AvatarReplyMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AvatarReplyMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* requestId at 156 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* avatarHeader at 158 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* avatarData at 159 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* avatarEnd at 160 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* unknownAvatar at 162 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* requestId at 158 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* avatarHeader at 160 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* avatarData at 161 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* avatarEnd at 162 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* unknownAvatar at 164 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AvatarReplyMessage_specs_1 = {
sizeof(struct AvatarReplyMessage),
+2 -1
View File
@@ -33,7 +33,8 @@ typedef enum avatarResult_PR {
avatarResult_PR_unknownAvatar,
/* Extensions may appear below */
} avatarResult_PR;
}
avatarResult_PR;
/* AvatarReplyMessage */
typedef struct AvatarReplyMessage {
+2 -2
View File
@@ -32,8 +32,8 @@ static ber_tlv_tag_t asn_DEF_AvatarRequestMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_AvatarRequestMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* requestId at 151 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 } /* avatar at 153 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* requestId at 153 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 } /* avatar at 155 */
};
static asn_SEQUENCE_specifics_t asn_SPC_AvatarRequestMessage_specs_1 = {
sizeof(struct AvatarRequestMessage),
+9 -3
View File
@@ -255,9 +255,15 @@ BOOLEAN_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
* Extract a single bit
*/
switch(per_get_few_bits(pd, 1)) {
case 1: *st = 1; break;
case 0: *st = 0; break;
case -1: default: _ASN_DECODE_STARVED;
case 1:
*st = 1;
break;
case 0:
*st = 0;
break;
case -1:
default:
_ASN_DECODE_STARVED;
}
ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE");
+2 -1
View File
@@ -31,7 +31,8 @@ typedef enum ChatCleanerMessage_PR {
ChatCleanerMessage_PR_cleanerChatReplyMessage,
/* Extensions may appear below */
} ChatCleanerMessage_PR;
}
ChatCleanerMessage_PR;
/* ChatCleanerMessage */
typedef struct ChatCleanerMessage {
+11 -11
View File
@@ -87,11 +87,11 @@ static asn_TYPE_member_t asn_MBR_chatType_2[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_chatType_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatTypeLobby at 670 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* chatTypeGame at 671 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* chatTypeBot at 672 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* chatTypeBroadcast at 673 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* chatTypePrivate at 675 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatTypeLobby at 693 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* chatTypeGame at 694 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* chatTypeBot at 695 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* chatTypeBroadcast at 696 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* chatTypePrivate at 698 */
};
static asn_CHOICE_specifics_t asn_SPC_chatType_specs_2 = {
sizeof(struct chatType),
@@ -151,12 +151,12 @@ static ber_tlv_tag_t asn_DEF_ChatMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ChatMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* chatText at 676 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatTypeLobby at 670 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* chatTypeGame at 671 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* chatTypeBot at 672 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* chatTypeBroadcast at 673 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* chatTypePrivate at 675 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* chatText at 699 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatTypeLobby at 693 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* chatTypeGame at 694 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* chatTypeBot at 695 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* chatTypeBroadcast at 696 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* chatTypePrivate at 698 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ChatMessage_specs_1 = {
sizeof(struct ChatMessage),
+2 -1
View File
@@ -35,7 +35,8 @@ typedef enum chatType_PR {
chatType_PR_chatTypePrivate,
/* Extensions may appear below */
} chatType_PR;
}
chatType_PR;
/* ChatMessage */
typedef struct ChatMessage {
+1 -1
View File
@@ -55,7 +55,7 @@ static ber_tlv_tag_t asn_DEF_ChatRejectMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ChatRejectMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* chatText at 699 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* chatText at 722 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ChatRejectMessage_specs_1 = {
sizeof(struct ChatRejectMessage),
+7 -7
View File
@@ -69,9 +69,9 @@ static asn_TYPE_member_t asn_MBR_chatRequestType_2[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_chatRequestType_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatRequestTypeLobby at 650 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* chatRequestTypeGame at 651 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* chatRequestTypePrivate at 653 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatRequestTypeLobby at 673 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* chatRequestTypeGame at 674 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* chatRequestTypePrivate at 676 */
};
static asn_CHOICE_specifics_t asn_SPC_chatRequestType_specs_2 = {
sizeof(struct chatRequestType),
@@ -131,10 +131,10 @@ static ber_tlv_tag_t asn_DEF_ChatRequestMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ChatRequestMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* chatText at 654 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatRequestTypeLobby at 650 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* chatRequestTypeGame at 651 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 } /* chatRequestTypePrivate at 653 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* chatText at 677 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatRequestTypeLobby at 673 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* chatRequestTypeGame at 674 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 } /* chatRequestTypePrivate at 676 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ChatRequestMessage_specs_1 = {
sizeof(struct ChatRequestMessage),
+2 -1
View File
@@ -31,7 +31,8 @@ typedef enum chatRequestType_PR {
chatRequestType_PR_chatRequestTypePrivate,
/* Extensions may appear below */
} chatRequestType_PR;
}
chatRequestType_PR;
/* ChatRequestMessage */
typedef struct ChatRequestMessage {
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_ChatRequestTypeGame_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ChatRequestTypeGame_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 662 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 685 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ChatRequestTypeGame_specs_1 = {
sizeof(struct ChatRequestTypeGame),
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_ChatRequestTypePrivate_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ChatRequestTypePrivate_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* targetPlayerId at 666 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* targetPlayerId at 689 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ChatRequestTypePrivate_specs_1 = {
sizeof(struct ChatRequestTypePrivate),
+2 -2
View File
@@ -31,8 +31,8 @@ static ber_tlv_tag_t asn_DEF_ChatTypeGame_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ChatTypeGame_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 684 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 686 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 707 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 709 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ChatTypeGame_specs_1 = {
sizeof(struct ChatTypeGame),
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_ChatTypeLobby_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ChatTypeLobby_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 681 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 704 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ChatTypeLobby_specs_1 = {
sizeof(struct ChatTypeLobby),
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_ChatTypePrivate_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ChatTypePrivate_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 696 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 719 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ChatTypePrivate_specs_1 = {
sizeof(struct ChatTypePrivate),
+2 -1
View File
@@ -28,7 +28,8 @@ typedef enum cleanerActionType {
cleanerActionType_cleanerActionWarning = 1,
cleanerActionType_cleanerActionKick = 2,
cleanerActionType_cleanerActionBan = 3
} e_cleanerActionType;
}
e_cleanerActionType;
/* CleanerChatReplyMessage */
typedef struct CleanerChatReplyMessage {
+2 -1
View File
@@ -27,7 +27,8 @@ typedef enum CleanerChatType_PR {
CleanerChatType_PR_cleanerChatTypeGame,
/* Extensions may appear below */
} CleanerChatType_PR;
}
CleanerChatType_PR;
/* CleanerChatType */
typedef struct CleanerChatType {
+4 -4
View File
@@ -50,10 +50,10 @@ static ber_tlv_tag_t asn_DEF_DealFlopCardsMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_DealFlopCardsMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 3 }, /* gameId at 497 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 2 }, /* flopCard1 at 498 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 1 }, /* flopCard2 at 499 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -3, 0 } /* flopCard3 at 501 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 3 }, /* gameId at 520 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 2 }, /* flopCard1 at 521 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 1 }, /* flopCard2 at 522 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -3, 0 } /* flopCard3 at 524 */
};
static asn_SEQUENCE_specifics_t asn_SPC_DealFlopCardsMessage_specs_1 = {
sizeof(struct DealFlopCardsMessage),
+2 -2
View File
@@ -32,8 +32,8 @@ static ber_tlv_tag_t asn_DEF_DealRiverCardMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_DealRiverCardMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 509 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* riverCard at 511 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 532 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* riverCard at 534 */
};
static asn_SEQUENCE_specifics_t asn_SPC_DealRiverCardMessage_specs_1 = {
sizeof(struct DealRiverCardMessage),
+2 -2
View File
@@ -32,8 +32,8 @@ static ber_tlv_tag_t asn_DEF_DealTurnCardMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_DealTurnCardMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 504 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* turnCard at 506 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 527 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* turnCard at 529 */
};
static asn_SEQUENCE_specifics_t asn_SPC_DealTurnCardMessage_specs_1 = {
sizeof(struct DealTurnCardMessage),
+1 -1
View File
@@ -55,7 +55,7 @@ static ber_tlv_tag_t asn_DEF_DialogMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_DialogMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* notificationText at 703 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* notificationText at 726 */
};
static asn_SEQUENCE_specifics_t asn_SPC_DialogMessage_specs_1 = {
sizeof(struct DialogMessage),
+1 -1
View File
@@ -48,7 +48,7 @@ static ber_tlv_tag_t asn_DEF_EncryptedCards_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_EncryptedCards_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* cardData at 447 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* cardData at 470 */
};
static asn_SEQUENCE_specifics_t asn_SPC_EncryptedCards_specs_1 = {
sizeof(struct EncryptedCards),
+6 -6
View File
@@ -239,12 +239,12 @@ static ber_tlv_tag_t asn_DEF_EndKickPetitionMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_EndKickPetitionMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 4, 0, 0 }, /* resultPlayerKicked at 628 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 3 }, /* gameId at 624 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 2 }, /* petitionId at 625 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 1 }, /* numVotesAgainstKicking at 626 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -3, 0 }, /* numVotesInFavourOfKicking at 627 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 0 } /* petitionEndReason at 630 */
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 4, 0, 0 }, /* resultPlayerKicked at 651 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 3 }, /* gameId at 647 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 2 }, /* petitionId at 648 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 1 }, /* numVotesAgainstKicking at 649 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -3, 0 }, /* numVotesInFavourOfKicking at 650 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 0 } /* petitionEndReason at 653 */
};
static asn_SEQUENCE_specifics_t asn_SPC_EndKickPetitionMessage_specs_1 = {
sizeof(struct EndKickPetitionMessage),
+2 -1
View File
@@ -28,7 +28,8 @@ typedef enum petitionEndReason {
petitionEndReason_petitionEndTooFewPlayers = 1,
petitionEndReason_petitionEndPlayerLeft = 2,
petitionEndReason_petitionEndTimeout = 3
} e_petitionEndReason;
}
e_petitionEndReason;
/* EndKickPetitionMessage */
typedef struct EndKickPetitionMessage {
+2 -2
View File
@@ -32,8 +32,8 @@ static ber_tlv_tag_t asn_DEF_EndOfGameMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_EndOfGameMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 560 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* winnerPlayerId at 562 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 583 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* winnerPlayerId at 585 */
};
static asn_SEQUENCE_specifics_t asn_SPC_EndOfGameMessage_specs_1 = {
sizeof(struct EndOfGameMessage),
+3 -3
View File
@@ -90,9 +90,9 @@ static ber_tlv_tag_t asn_DEF_EndOfHandHideCards_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_EndOfHandHideCards_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* playerId at 547 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* moneyWon at 548 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 0 } /* playerMoney at 549 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* playerId at 570 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* moneyWon at 571 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 0 } /* playerMoney at 572 */
};
static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandHideCards_specs_1 = {
sizeof(struct EndOfHandHideCards),
+5 -5
View File
@@ -28,8 +28,8 @@ static asn_TYPE_member_t asn_MBR_endOfHandType_3[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_endOfHandType_tag2el_3[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* endOfHandShowCards at 527 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* endOfHandHideCards at 529 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* endOfHandShowCards at 550 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* endOfHandHideCards at 552 */
};
static asn_CHOICE_specifics_t asn_SPC_endOfHandType_specs_3 = {
sizeof(struct endOfHandType),
@@ -89,9 +89,9 @@ static ber_tlv_tag_t asn_DEF_EndOfHandMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_EndOfHandMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 525 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* endOfHandShowCards at 527 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* endOfHandHideCards at 529 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 548 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* endOfHandShowCards at 550 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* endOfHandHideCards at 552 */
};
static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandMessage_specs_1 = {
sizeof(struct EndOfHandMessage),
+2 -1
View File
@@ -29,7 +29,8 @@ typedef enum endOfHandType_PR {
endOfHandType_PR_endOfHandHideCards,
/* Extensions may appear below */
} endOfHandType_PR;
}
endOfHandType_PR;
/* EndOfHandMessage */
typedef struct EndOfHandMessage {
+1 -1
View File
@@ -92,7 +92,7 @@ static ber_tlv_tag_t asn_DEF_EndOfHandShowCards_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_EndOfHandShowCards_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* playerResults at 534 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* playerResults at 557 */
};
static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandShowCards_specs_1 = {
sizeof(struct EndOfHandShowCards),
+1 -1
View File
@@ -166,7 +166,7 @@ static ber_tlv_tag_t asn_DEF_ErrorMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ErrorMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* errorReason at 737 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* errorReason at 760 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ErrorMessage_specs_1 = {
sizeof(struct ErrorMessage),
+2 -1
View File
@@ -36,7 +36,8 @@ typedef enum errorReason {
errorReason_errorBannedFromServer = 259,
errorReason_errorBlockedByServer = 260,
errorReason_errorSessionTimeout = 261
} e_errorReason;
}
e_errorReason;
/* ErrorMessage */
typedef struct ErrorMessage {
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_GameAdminChanged_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameAdminChanged_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* newAdminPlayerId at 377 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* newAdminPlayerId at 384 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameAdminChanged_specs_1 = {
sizeof(struct GameAdminChanged),
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_GameListAdminChanged_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameListAdminChanged_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* newAdminPlayerId at 229 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* newAdminPlayerId at 231 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameListAdminChanged_specs_1 = {
sizeof(struct GameListAdminChanged),
+11 -11
View File
@@ -55,11 +55,11 @@ static asn_TYPE_member_t asn_MBR_gameListNotification_3[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_gameListNotification_tag2el_3[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gameListNew at 199 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gameListUpdate at 200 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gameListPlayerJoined at 201 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gameListPlayerLeft at 202 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* gameListAdminChanged at 204 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gameListNew at 201 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gameListUpdate at 202 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gameListPlayerJoined at 203 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gameListPlayerLeft at 204 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* gameListAdminChanged at 206 */
};
static asn_CHOICE_specifics_t asn_SPC_gameListNotification_specs_3 = {
sizeof(struct gameListNotification),
@@ -119,12 +119,12 @@ static ber_tlv_tag_t asn_DEF_GameListMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameListMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 197 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gameListNew at 199 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gameListUpdate at 200 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* gameListPlayerJoined at 201 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* gameListPlayerLeft at 202 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 } /* gameListAdminChanged at 204 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 199 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gameListNew at 201 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gameListUpdate at 202 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* gameListPlayerJoined at 203 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* gameListPlayerLeft at 204 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 } /* gameListAdminChanged at 206 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameListMessage_specs_1 = {
sizeof(struct GameListMessage),
+2 -1
View File
@@ -35,7 +35,8 @@ typedef enum gameListNotification_PR {
gameListNotification_PR_gameListAdminChanged,
/* Extensions may appear below */
} gameListNotification_PR;
}
gameListNotification_PR;
/* GameListMessage */
typedef struct GameListMessage {
+5 -5
View File
@@ -128,11 +128,11 @@ static ber_tlv_tag_t asn_DEF_GameListNew_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameListNew_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* isPrivate at 209 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* adminPlayerId at 211 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* gameMode at 208 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* playerIds at 210 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 0 } /* gameInfo at 213 */
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* isPrivate at 211 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* adminPlayerId at 213 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* gameMode at 210 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* playerIds at 212 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 0 } /* gameInfo at 215 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameListNew_specs_1 = {
sizeof(struct GameListNew),
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_GameListPlayerJoined_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameListPlayerJoined_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 221 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 223 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameListPlayerJoined_specs_1 = {
sizeof(struct GameListPlayerJoined),
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_GameListPlayerLeft_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameListPlayerLeft_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 225 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 227 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameListPlayerLeft_specs_1 = {
sizeof(struct GameListPlayerLeft),
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_GameListUpdate_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameListUpdate_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* gameMode at 217 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* gameMode at 219 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameListUpdate_specs_1 = {
sizeof(struct GameListUpdate),
+2 -2
View File
@@ -31,8 +31,8 @@ static ber_tlv_tag_t asn_DEF_GamePlayerJoined_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GamePlayerJoined_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* isGameAdmin at 363 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 362 */
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* isGameAdmin at 370 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 369 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerJoined_specs_1 = {
sizeof(struct GamePlayerJoined),
+2 -2
View File
@@ -150,8 +150,8 @@ static ber_tlv_tag_t asn_DEF_GamePlayerLeft_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GamePlayerLeft_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* playerId at 367 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* gamePlayerLeftReason at 369 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* playerId at 374 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* gamePlayerLeftReason at 376 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerLeft_specs_1 = {
sizeof(struct GamePlayerLeft),
+2 -1
View File
@@ -25,7 +25,8 @@ typedef enum gamePlayerLeftReason {
gamePlayerLeftReason_leftOnRequest = 0,
gamePlayerLeftReason_leftKicked = 1,
gamePlayerLeftReason_leftError = 2
} e_gamePlayerLeftReason;
}
e_gamePlayerLeftReason;
/* GamePlayerLeft */
typedef struct GamePlayerLeft {
+9 -9
View File
@@ -46,10 +46,10 @@ static asn_TYPE_member_t asn_MBR_gamePlayerNotification_3[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_gamePlayerNotification_tag2el_3[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gamePlayerJoined at 354 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gamePlayerLeft at 355 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gameAdminChanged at 356 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* removedFromGame at 358 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gamePlayerJoined at 361 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gamePlayerLeft at 362 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gameAdminChanged at 363 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* removedFromGame at 365 */
};
static asn_CHOICE_specifics_t asn_SPC_gamePlayerNotification_specs_3 = {
sizeof(struct gamePlayerNotification),
@@ -109,11 +109,11 @@ static ber_tlv_tag_t asn_DEF_GamePlayerMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GamePlayerMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 352 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gamePlayerJoined at 354 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gamePlayerLeft at 355 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* gameAdminChanged at 356 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* removedFromGame at 358 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 359 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gamePlayerJoined at 361 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gamePlayerLeft at 362 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* gameAdminChanged at 363 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* removedFromGame at 365 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerMessage_specs_1 = {
sizeof(struct GamePlayerMessage),
+2 -1
View File
@@ -33,7 +33,8 @@ typedef enum gamePlayerNotification_PR {
gamePlayerNotification_PR_removedFromGame,
/* Extensions may appear below */
} gamePlayerNotification_PR;
}
gamePlayerNotification_PR;
/* GamePlayerMessage */
typedef struct GamePlayerMessage {
+55 -67
View File
@@ -7,74 +7,61 @@
#include "GameStartMessage.h"
static int
memb_playerSeats_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
size_t size;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
/* Determine the number of elements */
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
if((size >= 2 && size <= 10)) {
/* Perform validation of the inner elements */
return td->check_constraints(td, sptr, ctfailcb, app_key);
} else {
_ASN_CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_TYPE_member_t asn_MBR_playerSeats_4[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_NonZeroId,
static asn_TYPE_member_t asn_MBR_gameStartMode_4[] = {
{ ATF_NOFLAGS, 0, offsetof(struct gameStartMode, choice.gameStartModeInitial),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GameStartModeInitial,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
""
"gameStartModeInitial"
},
{ ATF_NOFLAGS, 0, offsetof(struct gameStartMode, choice.gameStartModeRejoin),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GameStartModeRejoin,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"gameStartModeRejoin"
},
};
static ber_tlv_tag_t asn_DEF_playerSeats_tags_4[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
static asn_TYPE_tag2member_t asn_MAP_gameStartMode_tag2el_4[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gameStartModeInitial at 459 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gameStartModeRejoin at 461 */
};
static asn_SET_OF_specifics_t asn_SPC_playerSeats_specs_4 = {
sizeof(struct playerSeats),
offsetof(struct playerSeats, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
static asn_CHOICE_specifics_t asn_SPC_gameStartMode_specs_4 = {
sizeof(struct gameStartMode),
offsetof(struct gameStartMode, _asn_ctx),
offsetof(struct gameStartMode, present),
sizeof(((struct gameStartMode *)0)->present),
asn_MAP_gameStartMode_tag2el_4,
2, /* Count of tags in the map */
0,
2 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_playerSeats_4 = {
"playerSeats",
"playerSeats",
SEQUENCE_OF_free,
SEQUENCE_OF_print,
SEQUENCE_OF_constraint,
SEQUENCE_OF_decode_ber,
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
asn_TYPE_descriptor_t asn_DEF_gameStartMode_4 = {
"gameStartMode",
"gameStartMode",
CHOICE_free,
CHOICE_print,
CHOICE_constraint,
CHOICE_decode_ber,
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_playerSeats_tags_4,
sizeof(asn_DEF_playerSeats_tags_4)
/sizeof(asn_DEF_playerSeats_tags_4[0]), /* 1 */
asn_DEF_playerSeats_tags_4, /* Same as above */
sizeof(asn_DEF_playerSeats_tags_4)
/sizeof(asn_DEF_playerSeats_tags_4[0]), /* 1 */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_playerSeats_4,
1, /* Single element */
&asn_SPC_playerSeats_specs_4 /* Additional specs */
asn_MBR_gameStartMode_4,
2, /* Elements count */
&asn_SPC_gameStartMode_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_GameStartMessage_1[] = {
@@ -96,14 +83,14 @@ static asn_TYPE_member_t asn_MBR_GameStartMessage_1[] = {
0,
"startDealerPlayerId"
},
{ ATF_NOFLAGS, 0, offsetof(struct GameStartMessage, playerSeats),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
{ ATF_NOFLAGS, 0, offsetof(struct GameStartMessage, gameStartMode),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_playerSeats_4,
memb_playerSeats_constraint_1,
&asn_DEF_gameStartMode_4,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"playerSeats"
"gameStartMode"
},
};
static ber_tlv_tag_t asn_DEF_GameStartMessage_tags_1[] = {
@@ -111,15 +98,16 @@ static ber_tlv_tag_t asn_DEF_GameStartMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameStartMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 436 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* startDealerPlayerId at 437 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* playerSeats at 439 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 456 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* startDealerPlayerId at 457 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* gameStartModeInitial at 459 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* gameStartModeRejoin at 461 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameStartMessage_specs_1 = {
sizeof(struct GameStartMessage),
offsetof(struct GameStartMessage, _asn_ctx),
asn_MAP_GameStartMessage_tag2el_1,
3, /* Count of tags in the map */
4, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* Start extensions */
4 /* Stop extensions */
+24 -5
View File
@@ -13,24 +13,43 @@
/* Including external dependencies */
#include "NonZeroId.h"
#include <asn_SEQUENCE_OF.h>
#include <constr_SEQUENCE_OF.h>
#include "GameStartModeInitial.h"
#include "GameStartModeRejoin.h"
#include <constr_CHOICE.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum gameStartMode_PR {
gameStartMode_PR_NOTHING, /* No components present */
gameStartMode_PR_gameStartModeInitial,
gameStartMode_PR_gameStartModeRejoin,
/* Extensions may appear below */
}
gameStartMode_PR;
/* GameStartMessage */
typedef struct GameStartMessage {
NonZeroId_t gameId;
NonZeroId_t startDealerPlayerId;
struct playerSeats {
A_SEQUENCE_OF(NonZeroId_t) list;
struct gameStartMode {
gameStartMode_PR present;
union GameStartMessage__gameStartMode_u {
GameStartModeInitial_t gameStartModeInitial;
GameStartModeRejoin_t gameStartModeRejoin;
/*
* This type is extensible,
* possible extensions are below.
*/
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} playerSeats;
} gameStartMode;
/*
* This type is extensible,
* possible extensions are below.
+129
View File
@@ -0,0 +1,129 @@
/*
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
* From ASN.1 module "POKERTH-PROTOCOL"
* found in "../../../docs/pokerth.asn1"
* `asn1c -fskeletons-copy`
*/
#include "GameStartModeInitial.h"
static int
memb_playerSeats_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
size_t size;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
/* Determine the number of elements */
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
if((size >= 2 && size <= 10)) {
/* Perform validation of the inner elements */
return td->check_constraints(td, sptr, ctfailcb, app_key);
} else {
_ASN_CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_TYPE_member_t asn_MBR_playerSeats_2[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_NonZeroId,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
""
},
};
static ber_tlv_tag_t asn_DEF_playerSeats_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_playerSeats_specs_2 = {
sizeof(struct playerSeats),
offsetof(struct playerSeats, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_playerSeats_2 = {
"playerSeats",
"playerSeats",
SEQUENCE_OF_free,
SEQUENCE_OF_print,
SEQUENCE_OF_constraint,
SEQUENCE_OF_decode_ber,
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_playerSeats_tags_2,
sizeof(asn_DEF_playerSeats_tags_2)
/sizeof(asn_DEF_playerSeats_tags_2[0]), /* 1 */
asn_DEF_playerSeats_tags_2, /* Same as above */
sizeof(asn_DEF_playerSeats_tags_2)
/sizeof(asn_DEF_playerSeats_tags_2[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_playerSeats_2,
1, /* Single element */
&asn_SPC_playerSeats_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_GameStartModeInitial_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GameStartModeInitial, playerSeats),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_playerSeats_2,
memb_playerSeats_constraint_1,
0, /* PER is not compiled, use -gen-PER */
0,
"playerSeats"
},
};
static ber_tlv_tag_t asn_DEF_GameStartModeInitial_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameStartModeInitial_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* playerSeats at 449 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameStartModeInitial_specs_1 = {
sizeof(struct GameStartModeInitial),
offsetof(struct GameStartModeInitial, _asn_ctx),
asn_MAP_GameStartModeInitial_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
0, /* Start extensions */
2 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_GameStartModeInitial = {
"GameStartModeInitial",
"GameStartModeInitial",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_GameStartModeInitial_tags_1,
sizeof(asn_DEF_GameStartModeInitial_tags_1)
/sizeof(asn_DEF_GameStartModeInitial_tags_1[0]), /* 1 */
asn_DEF_GameStartModeInitial_tags_1, /* Same as above */
sizeof(asn_DEF_GameStartModeInitial_tags_1)
/sizeof(asn_DEF_GameStartModeInitial_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_GameStartModeInitial_1,
1, /* Elements count */
&asn_SPC_GameStartModeInitial_specs_1 /* Additional specs */
};
+49
View File
@@ -0,0 +1,49 @@
/*
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
* From ASN.1 module "POKERTH-PROTOCOL"
* found in "../../../docs/pokerth.asn1"
* `asn1c -fskeletons-copy`
*/
#ifndef _GameStartModeInitial_H_
#define _GameStartModeInitial_H_
#include <asn_application.h>
/* Including external dependencies */
#include "NonZeroId.h"
#include <asn_SEQUENCE_OF.h>
#include <constr_SEQUENCE_OF.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* GameStartModeInitial */
typedef struct GameStartModeInitial {
struct playerSeats {
A_SEQUENCE_OF(NonZeroId_t) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} playerSeats;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GameStartModeInitial_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GameStartModeInitial;
#ifdef __cplusplus
}
#endif
#endif /* _GameStartModeInitial_H_ */
#include <asn_internal.h>
+129
View File
@@ -0,0 +1,129 @@
/*
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
* From ASN.1 module "POKERTH-PROTOCOL"
* found in "../../../docs/pokerth.asn1"
* `asn1c -fskeletons-copy`
*/
#include "GameStartModeRejoin.h"
static int
memb_rejoinPlayerData_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
size_t size;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
/* Determine the number of elements */
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
if((size >= 2 && size <= 10)) {
/* Perform validation of the inner elements */
return td->check_constraints(td, sptr, ctfailcb, app_key);
} else {
_ASN_CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_TYPE_member_t asn_MBR_rejoinPlayerData_2[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RejoinPlayerData,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
""
},
};
static ber_tlv_tag_t asn_DEF_rejoinPlayerData_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_rejoinPlayerData_specs_2 = {
sizeof(struct rejoinPlayerData),
offsetof(struct rejoinPlayerData, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_rejoinPlayerData_2 = {
"rejoinPlayerData",
"rejoinPlayerData",
SEQUENCE_OF_free,
SEQUENCE_OF_print,
SEQUENCE_OF_constraint,
SEQUENCE_OF_decode_ber,
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_rejoinPlayerData_tags_2,
sizeof(asn_DEF_rejoinPlayerData_tags_2)
/sizeof(asn_DEF_rejoinPlayerData_tags_2[0]), /* 1 */
asn_DEF_rejoinPlayerData_tags_2, /* Same as above */
sizeof(asn_DEF_rejoinPlayerData_tags_2)
/sizeof(asn_DEF_rejoinPlayerData_tags_2[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_rejoinPlayerData_2,
1, /* Single element */
&asn_SPC_rejoinPlayerData_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_GameStartModeRejoin_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GameStartModeRejoin, rejoinPlayerData),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_rejoinPlayerData_2,
memb_rejoinPlayerData_constraint_1,
0, /* PER is not compiled, use -gen-PER */
0,
"rejoinPlayerData"
},
};
static ber_tlv_tag_t asn_DEF_GameStartModeRejoin_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GameStartModeRejoin_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* rejoinPlayerData at 453 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GameStartModeRejoin_specs_1 = {
sizeof(struct GameStartModeRejoin),
offsetof(struct GameStartModeRejoin, _asn_ctx),
asn_MAP_GameStartModeRejoin_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
0, /* Start extensions */
2 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_GameStartModeRejoin = {
"GameStartModeRejoin",
"GameStartModeRejoin",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_GameStartModeRejoin_tags_1,
sizeof(asn_DEF_GameStartModeRejoin_tags_1)
/sizeof(asn_DEF_GameStartModeRejoin_tags_1[0]), /* 1 */
asn_DEF_GameStartModeRejoin_tags_1, /* Same as above */
sizeof(asn_DEF_GameStartModeRejoin_tags_1)
/sizeof(asn_DEF_GameStartModeRejoin_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_GameStartModeRejoin_1,
1, /* Elements count */
&asn_SPC_GameStartModeRejoin_specs_1 /* Additional specs */
};
+54
View File
@@ -0,0 +1,54 @@
/*
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
* From ASN.1 module "POKERTH-PROTOCOL"
* found in "../../../docs/pokerth.asn1"
* `asn1c -fskeletons-copy`
*/
#ifndef _GameStartModeRejoin_H_
#define _GameStartModeRejoin_H_
#include <asn_application.h>
/* Including external dependencies */
#include <asn_SEQUENCE_OF.h>
#include <constr_SEQUENCE_OF.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Forward declarations */
struct RejoinPlayerData;
/* GameStartModeRejoin */
typedef struct GameStartModeRejoin {
struct rejoinPlayerData {
A_SEQUENCE_OF(struct RejoinPlayerData) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} rejoinPlayerData;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GameStartModeRejoin_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GameStartModeRejoin;
#ifdef __cplusplus
}
#endif
/* Referred external types */
#include "RejoinPlayerData.h"
#endif /* _GameStartModeRejoin_H_ */
#include <asn_internal.h>
+1 -1
View File
@@ -54,7 +54,7 @@ static ber_tlv_tag_t asn_DEF_GuestLogin_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_GuestLogin_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* nickName at 112 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* nickName at 113 */
};
static asn_SEQUENCE_specifics_t asn_SPC_GuestLogin_specs_1 = {
sizeof(struct GuestLogin),
+6 -6
View File
@@ -53,8 +53,8 @@ static asn_TYPE_member_t asn_MBR_yourCards_3[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_yourCards_tag2el_3[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plainCards at 453 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* encryptedCards at 455 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plainCards at 476 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* encryptedCards at 478 */
};
static asn_CHOICE_specifics_t asn_SPC_yourCards_specs_3 = {
sizeof(struct yourCards),
@@ -123,10 +123,10 @@ static ber_tlv_tag_t asn_DEF_HandStartMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_HandStartMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 451 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 0 }, /* smallBlind at 456 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* plainCards at 453 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* encryptedCards at 455 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 474 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 0 }, /* smallBlind at 479 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* plainCards at 476 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* encryptedCards at 478 */
};
static asn_SEQUENCE_specifics_t asn_SPC_HandStartMessage_specs_1 = {
sizeof(struct HandStartMessage),
+2 -1
View File
@@ -30,7 +30,8 @@ typedef enum yourCards_PR {
yourCards_PR_encryptedCards,
/* Extensions may appear below */
} yourCards_PR;
}
yourCards_PR;
/* HandStartMessage */
typedef struct HandStartMessage {
+58 -17
View File
@@ -67,10 +67,12 @@ INTEGER_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
* b) shall not all be zero.
*/
switch(*buf) {
case 0x00: if((buf[1] & 0x80) == 0)
case 0x00:
if((buf[1] & 0x80) == 0)
continue;
break;
case 0xff: if((buf[1] & 0x80))
case 0xff:
if((buf[1] & 0x80))
continue;
break;
}
@@ -120,8 +122,12 @@ INTEGER__dump(asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_by
/* Skip the insignificant leading bytes */
for(; buf < buf_end-1; buf++) {
switch(*buf) {
case 0x00: if((buf[1] & 0x80) == 0) continue; break;
case 0xff: if((buf[1] & 0x80) != 0) continue; break;
case 0x00:
if((buf[1] & 0x80) == 0) continue;
break;
case 0xff:
if((buf[1] & 0x80) != 0) continue;
break;
}
break;
}
@@ -255,8 +261,14 @@ INTEGER_map_enum2value(asn_INTEGER_specifics_t *specs, const char *lstart, const
/* Figure out the tag name */
for(lstart++, lp = lstart; lp < lstop; lp++) {
switch(*lp) {
case 9: case 10: case 11: case 12: case 13: case 32: /* WSP */
case 0x2f: /* '/' */ case 0x3e: /* '>' */
case 9:
case 10:
case 11:
case 12:
case 13:
case 32: /* WSP */
case 0x2f: /* '/' */
case 0x3e: /* '>' */
break;
default:
continue;
@@ -346,7 +358,10 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun
for(value = 0, lp = lstart; lp < lstop; lp++) {
int lv = *lp;
switch(lv) {
case 0x09: case 0x0a: case 0x0d: case 0x20:
case 0x09:
case 0x0a:
case 0x0d:
case 0x20:
switch(state) {
case ST_SKIPSPACE:
case ST_SKIPSPHEX:
@@ -374,10 +389,19 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun
continue;
}
break;
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34:
case 0x35: case 0x36: case 0x37: case 0x38: case 0x39:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
switch(state) {
case ST_DIGITS: break;
case ST_DIGITS:
break;
case ST_SKIPSPHEX: /* Fall through */
case ST_HEXDIGIT1:
value = (lv - 0x30) << 4;
@@ -455,8 +479,18 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun
break;
}
/* [A-Fa-f] */
case 0x41:case 0x42:case 0x43:case 0x44:case 0x45:case 0x46:
case 0x61:case 0x62:case 0x63:case 0x64:case 0x65:case 0x66:
case 0x41:
case 0x42:
case 0x43:
case 0x44:
case 0x45:
case 0x46:
case 0x61:
case 0x62:
case 0x63:
case 0x64:
case 0x65:
case 0x66:
switch(state) {
case ST_SKIPSPHEX:
case ST_SKIPSPACE: /* Fall through */
@@ -789,8 +823,12 @@ asn_INTEGER2long(const INTEGER_t *iptr, long *lptr) {
/* Skip out the insignificant leading bytes */
for(; b < end1; b++) {
switch(*b) {
case 0x00: if((b[1] & 0x80) == 0) continue; break;
case 0xff: if((b[1] & 0x80) != 0) continue; break;
case 0x00:
if((b[1] & 0x80) == 0) continue;
break;
case 0xff:
if((b[1] & 0x80) != 0) continue;
break;
}
break;
}
@@ -811,7 +849,8 @@ asn_INTEGER2long(const INTEGER_t *iptr, long *lptr) {
/* Perform the sign initialization */
/* Actually l = -(*b >> 7); gains nothing, yet unreadable! */
if((*b >> 7)) l = -1; else l = 0;
if((*b >> 7)) l = -1;
else l = 0;
/* Conversion engine */
for(; b < end; b++)
@@ -913,10 +952,12 @@ asn_long2INTEGER(INTEGER_t *st, long value) {
*/
for(p = pstart; p != pend1; p += add) {
switch(*p) {
case 0x00: if((*(p+add) & 0x80) == 0)
case 0x00:
if((*(p+add) & 0x80) == 0)
continue;
break;
case 0xff: if((*(p+add) & 0x80))
case 0xff:
if((*(p+add) & 0x80))
continue;
break;
}
+18 -8
View File
@@ -26,7 +26,7 @@ static asn_TYPE_member_t asn_MBR_InitAckMessage_1[] = {
0,
"yourPlayerId"
},
{ ATF_POINTER, 1, offsetof(struct InitAckMessage, yourAvatar),
{ ATF_POINTER, 2, offsetof(struct InitAckMessage, yourAvatar),
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
0,
&asn_DEF_AvatarHash,
@@ -35,24 +35,34 @@ static asn_TYPE_member_t asn_MBR_InitAckMessage_1[] = {
0,
"yourAvatar"
},
{ ATF_POINTER, 1, offsetof(struct InitAckMessage, rejoinGameId),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_NonZeroId,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"rejoinGameId"
},
};
static ber_tlv_tag_t asn_DEF_InitAckMessage_tags_1[] = {
(ASN_TAG_CLASS_APPLICATION | (3 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_InitAckMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* yourPlayerId at 146 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 1 }, /* yourSessionId at 145 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, -1, 0 } /* yourAvatar at 147 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 1 }, /* yourPlayerId at 147 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -1, 0 }, /* rejoinGameId at 149 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 1 }, /* yourSessionId at 146 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, -1, 0 } /* yourAvatar at 148 */
};
static asn_SEQUENCE_specifics_t asn_SPC_InitAckMessage_specs_1 = {
sizeof(struct InitAckMessage),
offsetof(struct InitAckMessage, _asn_ctx),
asn_MAP_InitAckMessage_tag2el_1,
3, /* Count of tags in the map */
4, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* Start extensions */
4 /* Stop extensions */
3, /* Start extensions */
5 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_InitAckMessage = {
"InitAckMessage",
@@ -74,7 +84,7 @@ asn_TYPE_descriptor_t asn_DEF_InitAckMessage = {
/sizeof(asn_DEF_InitAckMessage_tags_1[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_InitAckMessage_1,
3, /* Elements count */
4, /* Elements count */
&asn_SPC_InitAckMessage_specs_1 /* Additional specs */
};
+1
View File
@@ -26,6 +26,7 @@ typedef struct InitAckMessage {
Guid_t yourSessionId;
NonZeroId_t yourPlayerId;
AvatarHash_t *yourAvatar /* OPTIONAL */;
NonZeroId_t *rejoinGameId /* OPTIONAL */;
/*
* This type is extensible,
* possible extensions are below.
+28 -18
View File
@@ -7,7 +7,7 @@
#include "InitMessage.h"
static asn_TYPE_member_t asn_MBR_login_4[] = {
static asn_TYPE_member_t asn_MBR_login_5[] = {
{ ATF_NOFLAGS, 0, offsetof(struct login, choice.guestLogin),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
@@ -36,23 +36,23 @@ static asn_TYPE_member_t asn_MBR_login_4[] = {
"unauthenticatedLogin"
},
};
static asn_TYPE_tag2member_t asn_MAP_login_tag2el_4[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* guestLogin at 100 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* authenticatedLogin at 101 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* unauthenticatedLogin at 103 */
static asn_TYPE_tag2member_t asn_MAP_login_tag2el_5[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* guestLogin at 101 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* authenticatedLogin at 102 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* unauthenticatedLogin at 104 */
};
static asn_CHOICE_specifics_t asn_SPC_login_specs_4 = {
static asn_CHOICE_specifics_t asn_SPC_login_specs_5 = {
sizeof(struct login),
offsetof(struct login, _asn_ctx),
offsetof(struct login, present),
sizeof(((struct login *)0)->present),
asn_MAP_login_tag2el_4,
asn_MAP_login_tag2el_5,
3, /* Count of tags in the map */
0,
3 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_login_4 = {
asn_TYPE_descriptor_t asn_DEF_login_5 = {
"login",
"login",
CHOICE_free,
@@ -69,9 +69,9 @@ asn_TYPE_descriptor_t asn_DEF_login_4 = {
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_login_4,
asn_MBR_login_5,
3, /* Elements count */
&asn_SPC_login_specs_4 /* Additional specs */
&asn_SPC_login_specs_5 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_InitMessage_1[] = {
@@ -93,10 +93,19 @@ static asn_TYPE_member_t asn_MBR_InitMessage_1[] = {
0,
"buildId"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitMessage, myLastSessionId),
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
0,
&asn_DEF_Guid,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"myLastSessionId"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitMessage, login),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_login_4,
&asn_DEF_login_5,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
@@ -109,19 +118,20 @@ static ber_tlv_tag_t asn_DEF_InitMessage_tags_1[] = {
};
static asn_TYPE_tag2member_t asn_MAP_InitMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* buildId at 98 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 0 }, /* myLastSessionId at 99 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* requestedVersion at 97 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* guestLogin at 100 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* authenticatedLogin at 101 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* unauthenticatedLogin at 103 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* guestLogin at 101 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* authenticatedLogin at 102 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 } /* unauthenticatedLogin at 104 */
};
static asn_SEQUENCE_specifics_t asn_SPC_InitMessage_specs_1 = {
sizeof(struct InitMessage),
offsetof(struct InitMessage, _asn_ctx),
asn_MAP_InitMessage_tag2el_1,
5, /* Count of tags in the map */
6, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* Start extensions */
4 /* Stop extensions */
3, /* Start extensions */
5 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_InitMessage = {
"InitMessage",
@@ -143,7 +153,7 @@ asn_TYPE_descriptor_t asn_DEF_InitMessage = {
/sizeof(asn_DEF_InitMessage_tags_1[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_InitMessage_1,
3, /* Elements count */
4, /* Elements count */
&asn_SPC_InitMessage_specs_1 /* Additional specs */
};
+4 -1
View File
@@ -14,6 +14,7 @@
/* Including external dependencies */
#include "Version.h"
#include <NativeInteger.h>
#include "Guid.h"
#include "GuestLogin.h"
#include "AuthenticatedLogin.h"
#include "UnauthenticatedLogin.h"
@@ -32,12 +33,14 @@ typedef enum login_PR {
login_PR_unauthenticatedLogin,
/* Extensions may appear below */
} login_PR;
}
login_PR;
/* InitMessage */
typedef struct InitMessage {
Version_t requestedVersion;
long buildId;
Guid_t myLastSessionId;
struct login {
login_PR present;
union InitMessage__login_u {
+3 -3
View File
@@ -41,9 +41,9 @@ static ber_tlv_tag_t asn_DEF_InviteNotifyMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_InviteNotifyMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* gameId at 405 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* playerIdWho at 406 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 0 } /* playerIdByWhom at 408 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* gameId at 412 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* playerIdWho at 413 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 0 } /* playerIdByWhom at 415 */
};
static asn_SEQUENCE_specifics_t asn_SPC_InviteNotifyMessage_specs_1 = {
sizeof(struct InviteNotifyMessage),
+2 -2
View File
@@ -32,8 +32,8 @@ static ber_tlv_tag_t asn_DEF_InvitePlayerToGameMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_InvitePlayerToGameMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 400 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 402 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 407 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 409 */
};
static asn_SEQUENCE_specifics_t asn_SPC_InvitePlayerToGameMessage_specs_1 = {
sizeof(struct InvitePlayerToGameMessage),
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_JoinExistingGame_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_JoinExistingGame_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 290 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 292 */
};
static asn_SEQUENCE_specifics_t asn_SPC_JoinExistingGame_specs_1 = {
sizeof(struct JoinExistingGame),
+2 -2
View File
@@ -31,8 +31,8 @@ static ber_tlv_tag_t asn_DEF_JoinGameAck_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_JoinGameAck_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* areYouGameAdmin at 305 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* gameInfo at 307 */
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* areYouGameAdmin at 311 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* gameInfo at 313 */
};
static asn_SEQUENCE_specifics_t asn_SPC_JoinGameAck_specs_1 = {
sizeof(struct JoinGameAck),
+6 -4
View File
@@ -90,7 +90,8 @@ static asn_INTEGER_enum_map_t asn_MAP_joinGameFailureReason_value2enum_2[] = {
{ 7, 13, "gameNameInUse" },
{ 8, 11, "badGameName" },
{ 9, 15, "invalidSettings" },
{ 10, 16, "ipAddressBlocked" }
{ 10, 16, "ipAddressBlocked" },
{ 11, 12, "rejoinFailed" }
};
static unsigned int asn_MAP_joinGameFailureReason_enum2value_2[] = {
7, /* badGameName(8) */
@@ -102,12 +103,13 @@ static unsigned int asn_MAP_joinGameFailureReason_enum2value_2[] = {
8, /* invalidSettings(9) */
9, /* ipAddressBlocked(10) */
4, /* notAllowedAsGuest(5) */
5 /* notInvited(6) */
5, /* notInvited(6) */
10 /* rejoinFailed(11) */
};
static asn_INTEGER_specifics_t asn_SPC_joinGameFailureReason_specs_2 = {
asn_MAP_joinGameFailureReason_value2enum_2, /* "tag" => N; sorted by tag */
asn_MAP_joinGameFailureReason_enum2value_2, /* N => "tag"; sorted by N */
10, /* Number of elements in the maps */
11, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
@@ -155,7 +157,7 @@ static ber_tlv_tag_t asn_DEF_JoinGameFailed_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_JoinGameFailed_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* joinGameFailureReason at 311 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* joinGameFailureReason at 317 */
};
static asn_SEQUENCE_specifics_t asn_SPC_JoinGameFailed_specs_1 = {
sizeof(struct JoinGameFailed),
+4 -2
View File
@@ -30,8 +30,10 @@ typedef enum joinGameFailureReason {
joinGameFailureReason_gameNameInUse = 7,
joinGameFailureReason_badGameName = 8,
joinGameFailureReason_invalidSettings = 9,
joinGameFailureReason_ipAddressBlocked = 10
} e_joinGameFailureReason;
joinGameFailureReason_ipAddressBlocked = 10,
joinGameFailureReason_rejoinFailed = 11
}
e_joinGameFailureReason;
/* JoinGameFailed */
typedef struct JoinGameFailed {
+5 -5
View File
@@ -28,8 +28,8 @@ static asn_TYPE_member_t asn_MBR_joinGameResult_3[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_joinGameResult_tag2el_3[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinGameAck at 299 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinGameFailed at 301 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinGameAck at 305 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinGameFailed at 307 */
};
static asn_CHOICE_specifics_t asn_SPC_joinGameResult_specs_3 = {
sizeof(struct joinGameResult),
@@ -89,9 +89,9 @@ static ber_tlv_tag_t asn_DEF_JoinGameReplyMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_JoinGameReplyMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 297 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* joinGameAck at 299 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinGameFailed at 301 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 303 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* joinGameAck at 305 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinGameFailed at 307 */
};
static asn_SEQUENCE_specifics_t asn_SPC_JoinGameReplyMessage_specs_1 = {
sizeof(struct JoinGameReplyMessage),
+2 -1
View File
@@ -29,7 +29,8 @@ typedef enum joinGameResult_PR {
joinGameResult_PR_joinGameFailed,
/* Extensions may appear below */
} joinGameResult_PR;
}
joinGameResult_PR;
/* JoinGameReplyMessage */
typedef struct JoinGameReplyMessage {
+21 -10
View File
@@ -58,10 +58,20 @@ static asn_TYPE_member_t asn_MBR_joinGameAction_2[] = {
0,
"joinNewGame"
},
{ ATF_NOFLAGS, 0, offsetof(struct joinGameAction, choice.rejoinExistingGame),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_RejoinExistingGame,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"rejoinExistingGame"
},
};
static asn_TYPE_tag2member_t asn_MAP_joinGameAction_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinExistingGame at 281 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinNewGame at 283 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinExistingGame at 282 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* joinNewGame at 283 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* rejoinExistingGame at 285 */
};
static asn_CHOICE_specifics_t asn_SPC_joinGameAction_specs_2 = {
sizeof(struct joinGameAction),
@@ -69,9 +79,9 @@ static asn_CHOICE_specifics_t asn_SPC_joinGameAction_specs_2 = {
offsetof(struct joinGameAction, present),
sizeof(((struct joinGameAction *)0)->present),
asn_MAP_joinGameAction_tag2el_2,
2, /* Count of tags in the map */
3, /* Count of tags in the map */
0,
2 /* Extensions start */
3 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_joinGameAction_2 = {
@@ -92,7 +102,7 @@ asn_TYPE_descriptor_t asn_DEF_joinGameAction_2 = {
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_joinGameAction_2,
2, /* Elements count */
3, /* Elements count */
&asn_SPC_joinGameAction_specs_2 /* Additional specs */
};
@@ -130,16 +140,17 @@ static ber_tlv_tag_t asn_DEF_JoinGameRequestMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_JoinGameRequestMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 2, 0, 0 }, /* autoLeave at 285 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* password at 284 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinExistingGame at 281 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 } /* joinNewGame at 283 */
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 2, 0, 0 }, /* autoLeave at 287 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* password at 286 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinExistingGame at 282 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* joinNewGame at 283 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 } /* rejoinExistingGame at 285 */
};
static asn_SEQUENCE_specifics_t asn_SPC_JoinGameRequestMessage_specs_1 = {
sizeof(struct JoinGameRequestMessage),
offsetof(struct JoinGameRequestMessage, _asn_ctx),
asn_MAP_JoinGameRequestMessage_tag2el_1,
4, /* Count of tags in the map */
5, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* Start extensions */
4 /* Stop extensions */
+5 -1
View File
@@ -16,6 +16,7 @@
#include <BOOLEAN.h>
#include "JoinExistingGame.h"
#include "JoinNewGame.h"
#include "RejoinExistingGame.h"
#include <constr_CHOICE.h>
#include <constr_SEQUENCE.h>
@@ -28,9 +29,11 @@ typedef enum joinGameAction_PR {
joinGameAction_PR_NOTHING, /* No components present */
joinGameAction_PR_joinExistingGame,
joinGameAction_PR_joinNewGame,
joinGameAction_PR_rejoinExistingGame,
/* Extensions may appear below */
} joinGameAction_PR;
}
joinGameAction_PR;
/* JoinGameRequestMessage */
typedef struct JoinGameRequestMessage {
@@ -39,6 +42,7 @@ typedef struct JoinGameRequestMessage {
union JoinGameRequestMessage__joinGameAction_u {
JoinExistingGame_t joinExistingGame;
JoinNewGame_t joinNewGame;
RejoinExistingGame_t rejoinExistingGame;
/*
* This type is extensible,
* possible extensions are below.
+1 -1
View File
@@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_JoinNewGame_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_JoinNewGame_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* gameInfo at 294 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* gameInfo at 296 */
};
static asn_SEQUENCE_specifics_t asn_SPC_JoinNewGame_specs_1 = {
sizeof(struct JoinNewGame),
+5 -5
View File
@@ -134,11 +134,11 @@ static ber_tlv_tag_t asn_DEF_KickPetitionUpdateMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_KickPetitionUpdateMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 4 }, /* gameId at 616 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 3 }, /* petitionId at 617 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 2 }, /* numVotesAgainstKicking at 618 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -3, 1 }, /* numVotesInFavourOfKicking at 619 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -4, 0 } /* numVotesNeededToKick at 620 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 4 }, /* gameId at 639 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 3 }, /* petitionId at 640 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 2 }, /* numVotesAgainstKicking at 641 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -3, 1 }, /* numVotesInFavourOfKicking at 642 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -4, 0 } /* numVotesNeededToKick at 643 */
};
static asn_SEQUENCE_specifics_t asn_SPC_KickPetitionUpdateMessage_specs_1 = {
sizeof(struct KickPetitionUpdateMessage),
+2 -2
View File
@@ -32,8 +32,8 @@ static ber_tlv_tag_t asn_DEF_KickPlayerRequestMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_KickPlayerRequestMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 391 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 393 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 398 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 400 */
};
static asn_SEQUENCE_specifics_t asn_SPC_KickPlayerRequestMessage_specs_1 = {
sizeof(struct KickPlayerRequestMessage),
+1 -1
View File
@@ -23,7 +23,7 @@ static ber_tlv_tag_t asn_DEF_LeaveGameRequestMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_LeaveGameRequestMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 397 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 404 */
};
static asn_SEQUENCE_specifics_t asn_SPC_LeaveGameRequestMessage_specs_1 = {
sizeof(struct LeaveGameRequestMessage),
+5 -5
View File
@@ -84,11 +84,11 @@ static ber_tlv_tag_t asn_DEF_MyActionRequestMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_MyActionRequestMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* gameId at 466 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* handNum at 467 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -2, 0 }, /* myRelativeBet at 470 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 1 }, /* gameState at 468 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, -1, 0 } /* myAction at 469 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* gameId at 489 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* handNum at 490 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -2, 0 }, /* myRelativeBet at 493 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 1 }, /* gameState at 491 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, -1, 0 } /* myAction at 492 */
};
static asn_SEQUENCE_specifics_t asn_SPC_MyActionRequestMessage_specs_1 = {
sizeof(struct MyActionRequestMessage),
+2 -1
View File
@@ -23,7 +23,8 @@ typedef enum NetAvatarType {
NetAvatarType_avatarImagePng = 1,
NetAvatarType_avatarImageJpg = 2,
NetAvatarType_avatarImageGif = 3
} e_NetAvatarType;
}
e_NetAvatarType;
/* NetAvatarType */
typedef long NetAvatarType_t;
+15 -15
View File
@@ -530,8 +530,8 @@ static asn_TYPE_member_t asn_MBR_raiseIntervalMode_9[] = {
},
};
static asn_TYPE_tag2member_t asn_MAP_raiseIntervalMode_tag2el_9[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* raiseEveryHands at 334 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* raiseEveryMinutes at 335 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* raiseEveryHands at 341 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* raiseEveryMinutes at 342 */
};
static asn_CHOICE_specifics_t asn_SPC_raiseIntervalMode_specs_9 = {
sizeof(struct raiseIntervalMode),
@@ -770,19 +770,19 @@ static ber_tlv_tag_t asn_DEF_NetGameInfo_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_NetGameInfo_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 6 }, /* maxNumPlayers at 332 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 5, -1, 5 }, /* proposedGuiSpeed at 342 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 4 }, /* delayBetweenHands at 343 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 7, -3, 3 }, /* playerActionTimeout at 344 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 8, -4, 2 }, /* firstSmallBlind at 345 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 9, -5, 1 }, /* endRaiseSmallBlindValue at 346 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 10, -6, 0 }, /* startMoney at 347 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 1 }, /* netGameType at 327 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, -1, 0 }, /* endRaiseMode at 338 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* gameName at 325 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, 0, 0 }, /* manualBlinds at 348 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* raiseEveryHands at 334 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 } /* raiseEveryMinutes at 335 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 6 }, /* maxNumPlayers at 339 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 5, -1, 5 }, /* proposedGuiSpeed at 349 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 4 }, /* delayBetweenHands at 350 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 7, -3, 3 }, /* playerActionTimeout at 351 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 8, -4, 2 }, /* firstSmallBlind at 352 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 9, -5, 1 }, /* endRaiseSmallBlindValue at 353 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 10, -6, 0 }, /* startMoney at 354 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 1 }, /* netGameType at 334 */
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, -1, 0 }, /* endRaiseMode at 345 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* gameName at 332 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, 0, 0 }, /* manualBlinds at 355 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* raiseEveryHands at 341 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 } /* raiseEveryMinutes at 342 */
};
static asn_SEQUENCE_specifics_t asn_SPC_NetGameInfo_specs_1 = {
sizeof(struct NetGameInfo),
+2 -1
View File
@@ -30,7 +30,8 @@ typedef enum netGameType {
netGameType_registeredOnlyGame = 2,
netGameType_inviteOnlyGame = 3,
netGameType_rankingGame = 4
} e_netGameType;
}
e_netGameType;
typedef enum raiseIntervalMode_PR {
raiseIntervalMode_PR_NOTHING, /* No components present */
raiseIntervalMode_PR_raiseEveryHands,
+2 -1
View File
@@ -23,7 +23,8 @@ typedef enum NetGameMode {
NetGameMode_gameCreated = 1,
NetGameMode_gameStarted = 2,
NetGameMode_gameClosed = 3
} e_NetGameMode;
}
e_NetGameMode;
/* NetGameMode */
typedef long NetGameMode_t;
+2 -1
View File
@@ -26,7 +26,8 @@ typedef enum NetGameState {
NetGameState_stateRiver = 3,
NetGameState_statePreflopSmallBlind = 4,
NetGameState_statePreflopBigBlind = 5
} e_NetGameState;
}
e_NetGameState;
/* NetGameState */
typedef long NetGameState_t;
+2 -1
View File
@@ -27,7 +27,8 @@ typedef enum NetPlayerAction {
NetPlayerAction_actionBet = 4,
NetPlayerAction_actionRaise = 5,
NetPlayerAction_actionAllIn = 6
} e_NetPlayerAction;
}
e_NetPlayerAction;
/* NetPlayerAction */
typedef long NetPlayerAction_t;
+114 -37
View File
@@ -279,8 +279,10 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
(long)(sel?sel->want_nulls:0),
(long)tl);
switch(tl) {
case -1: RETURN(RC_FAIL);
case 0: RETURN(RC_WMORE);
case -1:
RETURN(RC_FAIL);
case 0:
RETURN(RC_WMORE);
}
tlv_constr = BER_TLV_CONSTRUCTED(buf_ptr);
@@ -291,8 +293,10 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
ber_tlv_tag_string(tlv_tag), tlv_constr,
(long)Left, (long)tl, (long)tlv_len, (long)ll);
switch(ll) {
case -1: RETURN(RC_FAIL);
case 0: RETURN(RC_WMORE);
case -1:
RETURN(RC_FAIL);
case 0:
RETURN(RC_WMORE);
}
if(sel && sel->want_nulls
@@ -804,20 +808,39 @@ static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_b
for(; p < pend; p++) {
int ch = *(const unsigned char *)p;
switch(ch) {
case 0x09: case 0x0a: case 0x0c: case 0x0d:
case 0x09:
case 0x0a:
case 0x0c:
case 0x0d:
case 0x20:
/* Ignore whitespace */
continue;
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/
case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34: /*01234*/
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39: /*56789*/
clv = (clv << 4) + (ch - 0x30);
break;
case 0x41: case 0x42: case 0x43: /* ABC */
case 0x44: case 0x45: case 0x46: /* DEF */
case 0x41:
case 0x42:
case 0x43: /* ABC */
case 0x44:
case 0x45:
case 0x46: /* DEF */
clv = (clv << 4) + (ch - 0x41 + 10);
break;
case 0x61: case 0x62: case 0x63: /* abc */
case 0x64: case 0x65: case 0x66: /* def */
case 0x61:
case 0x62:
case 0x63: /* abc */
case 0x64:
case 0x65:
case 0x66: /* def */
clv = (clv << 4) + (ch - 0x61 + 10);
break;
default:
@@ -884,7 +907,10 @@ static ssize_t OCTET_STRING__convert_binary(void *sptr, const void *chunk_buf, s
for(; p < pend; p++) {
int ch = *(const unsigned char *)p;
switch(ch) {
case 0x09: case 0x0a: case 0x0c: case 0x0d:
case 0x09:
case 0x0a:
case 0x0c:
case 0x0d:
case 0x20:
/* Ignore whitespace */
break;
@@ -932,16 +958,32 @@ OS__strtoent(int base, const char *buf, const char *end, int32_t *ret_value) {
return -1;
switch(ch) {
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/
case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34: /*01234*/
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39: /*56789*/
val = val * base + (ch - 0x30);
break;
case 0x41: case 0x42: case 0x43: /* ABC */
case 0x44: case 0x45: case 0x46: /* DEF */
case 0x41:
case 0x42:
case 0x43: /* ABC */
case 0x44:
case 0x45:
case 0x46: /* DEF */
val = val * base + (ch - 0x41 + 10);
break;
case 0x61: case 0x62: case 0x63: /* abc */
case 0x64: case 0x65: case 0x66: /* def */
case 0x61:
case 0x62:
case 0x63: /* abc */
case 0x64:
case 0x65:
case 0x66: /* def */
val = val * base + (ch - 0x61 + 10);
break;
case 0x3b: /* ';' */
@@ -1221,10 +1263,19 @@ OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf,
return 1; /* FATAL */
}
switch(bpc) {
case 1: *buf = value; break;
case 2: buf[0] = value >> 8; buf[1] = value; break;
case 4: buf[0] = value >> 24; buf[1] = value >> 16;
buf[2] = value >> 8; buf[3] = value; break;
case 1:
*buf = value;
break;
case 2:
buf[0] = value >> 8;
buf[1] = value;
break;
case 4:
buf[0] = value >> 24;
buf[1] = value >> 16;
buf[2] = value >> 8;
buf[3] = value;
break;
}
}
return 0;
@@ -1245,10 +1296,19 @@ OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf,
return 1; /* FATAL */
}
switch(bpc) {
case 1: *buf = ch; break;
case 2: buf[0] = ch >> 8; buf[1] = ch; break;
case 4: buf[0] = ch >> 24; buf[1] = ch >> 16;
buf[2] = ch >> 8; buf[3] = ch; break;
case 1:
*buf = ch;
break;
case 2:
buf[0] = ch >> 8;
buf[1] = ch;
break;
case 4:
buf[0] = ch >> 24;
buf[1] = ch >> 16;
buf[2] = ch >> 8;
buf[3] = ch;
break;
}
}
@@ -1273,11 +1333,18 @@ OCTET_STRING_per_put_characters(asn_per_outp_t *po, const uint8_t *buf,
int code;
uint32_t value;
switch(bpc) {
case 1: value = *(const uint8_t *)buf; break;
case 2: value = (buf[0] << 8) | buf[1]; break;
case 4: value = (buf[0] << 24) | (buf[1] << 16)
| (buf[2] << 8) | buf[3]; break;
default: return -1;
case 1:
value = *(const uint8_t *)buf;
break;
case 2:
value = (buf[0] << 8) | buf[1];
break;
case 4:
value = (buf[0] << 24) | (buf[1] << 16)
| (buf[2] << 8) | buf[3];
break;
default:
return -1;
}
code = pc->value2code(value);
if(code < 0) {
@@ -1300,11 +1367,18 @@ OCTET_STRING_per_put_characters(asn_per_outp_t *po, const uint8_t *buf,
int ch;
uint32_t value;
switch(bpc) {
case 1: value = *(const uint8_t *)buf; break;
case 2: value = (buf[0] << 8) | buf[1]; break;
case 4: value = (buf[0] << 24) | (buf[1] << 16)
| (buf[2] << 8) | buf[3]; break;
default: return -1;
case 1:
value = *(const uint8_t *)buf;
break;
case 2:
value = (buf[0] << 8) | buf[1];
break;
case 4:
value = (buf[0] << 24) | (buf[1] << 16)
| (buf[2] << 8) | buf[3];
break;
default:
return -1;
}
ch = value - lb;
if(ch < 0 || ch > ub) {
@@ -1414,7 +1488,10 @@ OCTET_STRING_decode_uper(asn_codec_ctx_t *opt_codec_ctx,
st->size = (csiz->upper_bound + 7) >> 3;
}
st->buf = (uint8_t *)MALLOC(st->size + 1);
if(!st->buf) { st->size = 0; RETURN(RC_FAIL); }
if(!st->buf) {
st->size = 0;
RETURN(RC_FAIL);
}
}
/* X.691, #16.5: zero-length encoding */
+2 -2
View File
@@ -31,8 +31,8 @@ static ber_tlv_tag_t asn_DEF_PlainCards_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_PlainCards_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* plainCard1 at 442 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* plainCard2 at 444 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* plainCard1 at 465 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* plainCard2 at 467 */
};
static asn_SEQUENCE_specifics_t asn_SPC_PlainCards_specs_1 = {
sizeof(struct PlainCards),

Some files were not shown because too many files have changed in this diff Show More