From eb1b1e4b9c020e5151d606b7a0120ff69a406c27 Mon Sep 17 00:00:00 2001 From: lotodore Date: Sat, 18 Jul 2009 12:13:05 +0000 Subject: [PATCH] Adding code which was generated by asn1c from pokerth.asn1 using the call asn1c -fnative-types. Note the license file (COPYING_asn1c). --- src/third_party/asn1/AllInShowCardsMessage.c | 141 ++++ src/third_party/asn1/AllInShowCardsMessage.h | 54 ++ src/third_party/asn1/AnonymousLogin.c | 70 ++ src/third_party/asn1/AnonymousLogin.h | 42 ++ src/third_party/asn1/AuthenticatedLogin.c | 70 ++ src/third_party/asn1/AuthenticatedLogin.h | 42 ++ src/third_party/asn1/AvatarData.c | 86 +++ src/third_party/asn1/AvatarData.h | 40 ++ src/third_party/asn1/AvatarEnd.c | 45 ++ src/third_party/asn1/AvatarEnd.h | 38 ++ src/third_party/asn1/AvatarHash.c | 127 ++++ src/third_party/asn1/AvatarHash.h | 37 ++ src/third_party/asn1/AvatarHeader.c | 95 +++ src/third_party/asn1/AvatarHeader.h | 42 ++ src/third_party/asn1/AvatarReplyMessage.c | 151 +++++ src/third_party/asn1/AvatarReplyMessage.h | 72 ++ src/third_party/asn1/AvatarRequestMessage.c | 71 ++ src/third_party/asn1/AvatarRequestMessage.h | 42 ++ src/third_party/asn1/AvatarType.c | 128 ++++ src/third_party/asn1/AvatarType.h | 44 ++ src/third_party/asn1/BIT_STRING.c | 1 + src/third_party/asn1/BIT_STRING.h | 1 + src/third_party/asn1/BOOLEAN.c | 1 + src/third_party/asn1/BOOLEAN.h | 1 + src/third_party/asn1/COPYING_asn1c | 29 + src/third_party/asn1/Card.c | 126 ++++ src/third_party/asn1/Card.h | 37 ++ src/third_party/asn1/ChatMessage.c | 81 +++ src/third_party/asn1/ChatMessage.h | 43 ++ src/third_party/asn1/ChatRequestMessage.c | 71 ++ src/third_party/asn1/ChatRequestMessage.h | 42 ++ src/third_party/asn1/DealFlopCardsMessage.c | 141 ++++ src/third_party/asn1/DealFlopCardsMessage.h | 49 ++ src/third_party/asn1/DealRiverCardMessage.c | 71 ++ src/third_party/asn1/DealRiverCardMessage.h | 42 ++ src/third_party/asn1/DealTurnCardMessage.c | 71 ++ src/third_party/asn1/DealTurnCardMessage.h | 42 ++ src/third_party/asn1/DialogMessage.c | 61 ++ src/third_party/asn1/DialogMessage.h | 40 ++ src/third_party/asn1/EndOfGameMessage.c | 71 ++ src/third_party/asn1/EndOfGameMessage.h | 41 ++ src/third_party/asn1/EndOfHandHideCards.c | 130 ++++ src/third_party/asn1/EndOfHandHideCards.h | 43 ++ src/third_party/asn1/EndOfHandMessage.c | 129 ++++ src/third_party/asn1/EndOfHandMessage.h | 66 ++ src/third_party/asn1/EndOfHandShowCards.c | 130 ++++ src/third_party/asn1/EndOfHandShowCards.h | 52 ++ src/third_party/asn1/ErrorMessage.c | 202 ++++++ src/third_party/asn1/ErrorMessage.h | 59 ++ src/third_party/asn1/GameAdminChanged.c | 60 ++ src/third_party/asn1/GameAdminChanged.h | 40 ++ src/third_party/asn1/GameInfo.c | 622 ++++++++++++++++++ src/third_party/asn1/GameInfo.h | 87 +++ src/third_party/asn1/GameListAdminChanged.c | 60 ++ src/third_party/asn1/GameListAdminChanged.h | 40 ++ src/third_party/asn1/GameListMessage.c | 162 +++++ src/third_party/asn1/GameListMessage.h | 75 +++ src/third_party/asn1/GameListNew.c | 170 +++++ src/third_party/asn1/GameListNew.h | 54 ++ src/third_party/asn1/GameListPlayerJoined.c | 60 ++ src/third_party/asn1/GameListPlayerJoined.h | 40 ++ src/third_party/asn1/GameListPlayerLeft.c | 60 ++ src/third_party/asn1/GameListPlayerLeft.h | 40 ++ src/third_party/asn1/GameListUpdate.c | 60 ++ src/third_party/asn1/GameListUpdate.h | 40 ++ src/third_party/asn1/GameMode.c | 128 ++++ src/third_party/asn1/GameMode.h | 44 ++ src/third_party/asn1/GamePlayerJoined.c | 60 ++ src/third_party/asn1/GamePlayerJoined.h | 40 ++ src/third_party/asn1/GamePlayerLeft.c | 60 ++ src/third_party/asn1/GamePlayerLeft.h | 40 ++ src/third_party/asn1/GamePlayerMessage.c | 151 +++++ src/third_party/asn1/GamePlayerMessage.h | 72 ++ src/third_party/asn1/GameStartMessage.c | 151 +++++ src/third_party/asn1/GameStartMessage.h | 49 ++ src/third_party/asn1/GameState.c | 134 ++++ src/third_party/asn1/GameState.h | 47 ++ src/third_party/asn1/Guid.c | 131 ++++ src/third_party/asn1/Guid.h | 37 ++ src/third_party/asn1/HandStartMessage.c | 176 +++++ src/third_party/asn1/HandStartMessage.h | 51 ++ src/third_party/asn1/INTEGER.c | 1 + src/third_party/asn1/INTEGER.h | 1 + src/third_party/asn1/Id.c | 124 ++++ src/third_party/asn1/Id.h | 37 ++ src/third_party/asn1/InitAckMessage.c | 116 ++++ src/third_party/asn1/InitAckMessage.h | 46 ++ src/third_party/asn1/InitMessage.c | 140 ++++ src/third_party/asn1/InitMessage.h | 69 ++ src/third_party/asn1/JoinExistingGame.c | 60 ++ src/third_party/asn1/JoinExistingGame.h | 40 ++ src/third_party/asn1/JoinGameAck.c | 70 ++ src/third_party/asn1/JoinGameAck.h | 42 ++ src/third_party/asn1/JoinGameFailed.c | 181 +++++ src/third_party/asn1/JoinGameFailed.h | 49 ++ src/third_party/asn1/JoinGameReplyMessage.c | 129 ++++ src/third_party/asn1/JoinGameReplyMessage.h | 66 ++ src/third_party/asn1/JoinGameRequestMessage.c | 129 ++++ src/third_party/asn1/JoinGameRequestMessage.h | 66 ++ src/third_party/asn1/JoinNewGame.c | 60 ++ src/third_party/asn1/JoinNewGame.h | 40 ++ .../asn1/KickPlayerRequestMessage.c | 71 ++ .../asn1/KickPlayerRequestMessage.h | 41 ++ .../asn1/LeaveGameRequestMessage.c | 61 ++ .../asn1/LeaveGameRequestMessage.h | 40 ++ src/third_party/asn1/Makefile | 236 +++++++ src/third_party/asn1/MyActionRequestMessage.c | 116 ++++ src/third_party/asn1/MyActionRequestMessage.h | 46 ++ src/third_party/asn1/NativeEnumerated.c | 1 + src/third_party/asn1/NativeEnumerated.h | 1 + src/third_party/asn1/NativeInteger.c | 1 + src/third_party/asn1/NativeInteger.h | 1 + src/third_party/asn1/NonZeroId.c | 131 ++++ src/third_party/asn1/NonZeroId.h | 37 ++ src/third_party/asn1/OCTET_STRING.c | 1 + src/third_party/asn1/OCTET_STRING.h | 1 + src/third_party/asn1/PlayerAction.c | 136 ++++ src/third_party/asn1/PlayerAction.h | 48 ++ src/third_party/asn1/PlayerAllIn.c | 140 ++++ src/third_party/asn1/PlayerAllIn.h | 49 ++ src/third_party/asn1/PlayerInfoData.c | 141 ++++ src/third_party/asn1/PlayerInfoData.h | 55 ++ src/third_party/asn1/PlayerInfoReplyMessage.c | 129 ++++ src/third_party/asn1/PlayerInfoReplyMessage.h | 66 ++ .../asn1/PlayerInfoRequestMessage.c | 61 ++ .../asn1/PlayerInfoRequestMessage.h | 40 ++ src/third_party/asn1/PlayerResult.c | 300 +++++++++ src/third_party/asn1/PlayerResult.h | 59 ++ .../asn1/PlayersActionDoneMessage.c | 231 +++++++ .../asn1/PlayersActionDoneMessage.h | 50 ++ src/third_party/asn1/PlayersTurnMessage.c | 81 +++ src/third_party/asn1/PlayersTurnMessage.h | 43 ++ src/third_party/asn1/PokerTHMessage.c | 366 +++++++++++ src/third_party/asn1/PokerTHMessage.h | 144 ++++ src/third_party/asn1/RemovedFromGame.c | 183 ++++++ src/third_party/asn1/RemovedFromGame.h | 50 ++ src/third_party/asn1/StartEventAckMessage.c | 61 ++ src/third_party/asn1/StartEventAckMessage.h | 40 ++ src/third_party/asn1/StartEventMessage.c | 71 ++ src/third_party/asn1/StartEventMessage.h | 42 ++ src/third_party/asn1/StatisticsData.c | 185 ++++++ src/third_party/asn1/StatisticsData.h | 48 ++ src/third_party/asn1/StatisticsLogin.c | 45 ++ src/third_party/asn1/StatisticsLogin.h | 38 ++ src/third_party/asn1/StatisticsMessage.c | 131 ++++ src/third_party/asn1/StatisticsMessage.h | 52 ++ .../asn1/SubscriptionRequestMessage.c | 178 +++++ .../asn1/SubscriptionRequestMessage.h | 47 ++ src/third_party/asn1/UTF8String.c | 1 + src/third_party/asn1/UTF8String.h | 1 + src/third_party/asn1/UnknownAvatar.c | 45 ++ src/third_party/asn1/UnknownAvatar.h | 38 ++ src/third_party/asn1/UnknownPlayerInfo.c | 45 ++ src/third_party/asn1/UnknownPlayerInfo.h | 38 ++ src/third_party/asn1/Version.c | 120 ++++ src/third_party/asn1/Version.h | 41 ++ .../asn1/YourActionRejectedMessage.c | 245 +++++++ .../asn1/YourActionRejectedMessage.h | 56 ++ src/third_party/asn1/asn_SEQUENCE_OF.c | 1 + src/third_party/asn1/asn_SEQUENCE_OF.h | 1 + src/third_party/asn1/asn_SET_OF.c | 1 + src/third_party/asn1/asn_SET_OF.h | 1 + src/third_party/asn1/asn_application.h | 1 + src/third_party/asn1/asn_codecs.h | 1 + src/third_party/asn1/asn_codecs_prim.c | 1 + src/third_party/asn1/asn_codecs_prim.h | 1 + src/third_party/asn1/asn_internal.h | 1 + src/third_party/asn1/asn_system.h | 1 + src/third_party/asn1/asntest.c | 60 ++ src/third_party/asn1/ber_decoder.c | 1 + src/third_party/asn1/ber_decoder.h | 1 + src/third_party/asn1/ber_tlv_length.c | 1 + src/third_party/asn1/ber_tlv_length.h | 1 + src/third_party/asn1/ber_tlv_tag.c | 1 + src/third_party/asn1/ber_tlv_tag.h | 1 + src/third_party/asn1/constr_CHOICE.c | 1 + src/third_party/asn1/constr_CHOICE.h | 1 + src/third_party/asn1/constr_SEQUENCE.c | 1 + src/third_party/asn1/constr_SEQUENCE.h | 1 + src/third_party/asn1/constr_SEQUENCE_OF.c | 1 + src/third_party/asn1/constr_SEQUENCE_OF.h | 1 + src/third_party/asn1/constr_SET_OF.c | 1 + src/third_party/asn1/constr_SET_OF.h | 1 + src/third_party/asn1/constr_TYPE.c | 1 + src/third_party/asn1/constr_TYPE.h | 1 + src/third_party/asn1/constraints.c | 1 + src/third_party/asn1/constraints.h | 1 + src/third_party/asn1/converter-sample.c | 1 + src/third_party/asn1/der_encoder.c | 1 + src/third_party/asn1/der_encoder.h | 1 + src/third_party/asn1/per_decoder.c | 1 + src/third_party/asn1/per_decoder.h | 1 + src/third_party/asn1/per_encoder.c | 1 + src/third_party/asn1/per_encoder.h | 1 + src/third_party/asn1/per_opentype.c | 1 + src/third_party/asn1/per_opentype.h | 1 + src/third_party/asn1/per_support.c | 1 + src/third_party/asn1/per_support.h | 1 + src/third_party/asn1/xer_decoder.c | 1 + src/third_party/asn1/xer_decoder.h | 1 + src/third_party/asn1/xer_encoder.c | 1 + src/third_party/asn1/xer_encoder.h | 1 + src/third_party/asn1/xer_support.c | 1 + src/third_party/asn1/xer_support.h | 1 + 204 files changed, 12647 insertions(+) create mode 100644 src/third_party/asn1/AllInShowCardsMessage.c create mode 100644 src/third_party/asn1/AllInShowCardsMessage.h create mode 100644 src/third_party/asn1/AnonymousLogin.c create mode 100644 src/third_party/asn1/AnonymousLogin.h create mode 100644 src/third_party/asn1/AuthenticatedLogin.c create mode 100644 src/third_party/asn1/AuthenticatedLogin.h create mode 100644 src/third_party/asn1/AvatarData.c create mode 100644 src/third_party/asn1/AvatarData.h create mode 100644 src/third_party/asn1/AvatarEnd.c create mode 100644 src/third_party/asn1/AvatarEnd.h create mode 100644 src/third_party/asn1/AvatarHash.c create mode 100644 src/third_party/asn1/AvatarHash.h create mode 100644 src/third_party/asn1/AvatarHeader.c create mode 100644 src/third_party/asn1/AvatarHeader.h create mode 100644 src/third_party/asn1/AvatarReplyMessage.c create mode 100644 src/third_party/asn1/AvatarReplyMessage.h create mode 100644 src/third_party/asn1/AvatarRequestMessage.c create mode 100644 src/third_party/asn1/AvatarRequestMessage.h create mode 100644 src/third_party/asn1/AvatarType.c create mode 100644 src/third_party/asn1/AvatarType.h create mode 120000 src/third_party/asn1/BIT_STRING.c create mode 120000 src/third_party/asn1/BIT_STRING.h create mode 120000 src/third_party/asn1/BOOLEAN.c create mode 120000 src/third_party/asn1/BOOLEAN.h create mode 100644 src/third_party/asn1/COPYING_asn1c create mode 100644 src/third_party/asn1/Card.c create mode 100644 src/third_party/asn1/Card.h create mode 100644 src/third_party/asn1/ChatMessage.c create mode 100644 src/third_party/asn1/ChatMessage.h create mode 100644 src/third_party/asn1/ChatRequestMessage.c create mode 100644 src/third_party/asn1/ChatRequestMessage.h create mode 100644 src/third_party/asn1/DealFlopCardsMessage.c create mode 100644 src/third_party/asn1/DealFlopCardsMessage.h create mode 100644 src/third_party/asn1/DealRiverCardMessage.c create mode 100644 src/third_party/asn1/DealRiverCardMessage.h create mode 100644 src/third_party/asn1/DealTurnCardMessage.c create mode 100644 src/third_party/asn1/DealTurnCardMessage.h create mode 100644 src/third_party/asn1/DialogMessage.c create mode 100644 src/third_party/asn1/DialogMessage.h create mode 100644 src/third_party/asn1/EndOfGameMessage.c create mode 100644 src/third_party/asn1/EndOfGameMessage.h create mode 100644 src/third_party/asn1/EndOfHandHideCards.c create mode 100644 src/third_party/asn1/EndOfHandHideCards.h create mode 100644 src/third_party/asn1/EndOfHandMessage.c create mode 100644 src/third_party/asn1/EndOfHandMessage.h create mode 100644 src/third_party/asn1/EndOfHandShowCards.c create mode 100644 src/third_party/asn1/EndOfHandShowCards.h create mode 100644 src/third_party/asn1/ErrorMessage.c create mode 100644 src/third_party/asn1/ErrorMessage.h create mode 100644 src/third_party/asn1/GameAdminChanged.c create mode 100644 src/third_party/asn1/GameAdminChanged.h create mode 100644 src/third_party/asn1/GameInfo.c create mode 100644 src/third_party/asn1/GameInfo.h create mode 100644 src/third_party/asn1/GameListAdminChanged.c create mode 100644 src/third_party/asn1/GameListAdminChanged.h create mode 100644 src/third_party/asn1/GameListMessage.c create mode 100644 src/third_party/asn1/GameListMessage.h create mode 100644 src/third_party/asn1/GameListNew.c create mode 100644 src/third_party/asn1/GameListNew.h create mode 100644 src/third_party/asn1/GameListPlayerJoined.c create mode 100644 src/third_party/asn1/GameListPlayerJoined.h create mode 100644 src/third_party/asn1/GameListPlayerLeft.c create mode 100644 src/third_party/asn1/GameListPlayerLeft.h create mode 100644 src/third_party/asn1/GameListUpdate.c create mode 100644 src/third_party/asn1/GameListUpdate.h create mode 100644 src/third_party/asn1/GameMode.c create mode 100644 src/third_party/asn1/GameMode.h create mode 100644 src/third_party/asn1/GamePlayerJoined.c create mode 100644 src/third_party/asn1/GamePlayerJoined.h create mode 100644 src/third_party/asn1/GamePlayerLeft.c create mode 100644 src/third_party/asn1/GamePlayerLeft.h create mode 100644 src/third_party/asn1/GamePlayerMessage.c create mode 100644 src/third_party/asn1/GamePlayerMessage.h create mode 100644 src/third_party/asn1/GameStartMessage.c create mode 100644 src/third_party/asn1/GameStartMessage.h create mode 100644 src/third_party/asn1/GameState.c create mode 100644 src/third_party/asn1/GameState.h create mode 100644 src/third_party/asn1/Guid.c create mode 100644 src/third_party/asn1/Guid.h create mode 100644 src/third_party/asn1/HandStartMessage.c create mode 100644 src/third_party/asn1/HandStartMessage.h create mode 120000 src/third_party/asn1/INTEGER.c create mode 120000 src/third_party/asn1/INTEGER.h create mode 100644 src/third_party/asn1/Id.c create mode 100644 src/third_party/asn1/Id.h create mode 100644 src/third_party/asn1/InitAckMessage.c create mode 100644 src/third_party/asn1/InitAckMessage.h create mode 100644 src/third_party/asn1/InitMessage.c create mode 100644 src/third_party/asn1/InitMessage.h create mode 100644 src/third_party/asn1/JoinExistingGame.c create mode 100644 src/third_party/asn1/JoinExistingGame.h create mode 100644 src/third_party/asn1/JoinGameAck.c create mode 100644 src/third_party/asn1/JoinGameAck.h create mode 100644 src/third_party/asn1/JoinGameFailed.c create mode 100644 src/third_party/asn1/JoinGameFailed.h create mode 100644 src/third_party/asn1/JoinGameReplyMessage.c create mode 100644 src/third_party/asn1/JoinGameReplyMessage.h create mode 100644 src/third_party/asn1/JoinGameRequestMessage.c create mode 100644 src/third_party/asn1/JoinGameRequestMessage.h create mode 100644 src/third_party/asn1/JoinNewGame.c create mode 100644 src/third_party/asn1/JoinNewGame.h create mode 100644 src/third_party/asn1/KickPlayerRequestMessage.c create mode 100644 src/third_party/asn1/KickPlayerRequestMessage.h create mode 100644 src/third_party/asn1/LeaveGameRequestMessage.c create mode 100644 src/third_party/asn1/LeaveGameRequestMessage.h create mode 100644 src/third_party/asn1/Makefile create mode 100644 src/third_party/asn1/MyActionRequestMessage.c create mode 100644 src/third_party/asn1/MyActionRequestMessage.h create mode 120000 src/third_party/asn1/NativeEnumerated.c create mode 120000 src/third_party/asn1/NativeEnumerated.h create mode 120000 src/third_party/asn1/NativeInteger.c create mode 120000 src/third_party/asn1/NativeInteger.h create mode 100644 src/third_party/asn1/NonZeroId.c create mode 100644 src/third_party/asn1/NonZeroId.h create mode 120000 src/third_party/asn1/OCTET_STRING.c create mode 120000 src/third_party/asn1/OCTET_STRING.h create mode 100644 src/third_party/asn1/PlayerAction.c create mode 100644 src/third_party/asn1/PlayerAction.h create mode 100644 src/third_party/asn1/PlayerAllIn.c create mode 100644 src/third_party/asn1/PlayerAllIn.h create mode 100644 src/third_party/asn1/PlayerInfoData.c create mode 100644 src/third_party/asn1/PlayerInfoData.h create mode 100644 src/third_party/asn1/PlayerInfoReplyMessage.c create mode 100644 src/third_party/asn1/PlayerInfoReplyMessage.h create mode 100644 src/third_party/asn1/PlayerInfoRequestMessage.c create mode 100644 src/third_party/asn1/PlayerInfoRequestMessage.h create mode 100644 src/third_party/asn1/PlayerResult.c create mode 100644 src/third_party/asn1/PlayerResult.h create mode 100644 src/third_party/asn1/PlayersActionDoneMessage.c create mode 100644 src/third_party/asn1/PlayersActionDoneMessage.h create mode 100644 src/third_party/asn1/PlayersTurnMessage.c create mode 100644 src/third_party/asn1/PlayersTurnMessage.h create mode 100644 src/third_party/asn1/PokerTHMessage.c create mode 100644 src/third_party/asn1/PokerTHMessage.h create mode 100644 src/third_party/asn1/RemovedFromGame.c create mode 100644 src/third_party/asn1/RemovedFromGame.h create mode 100644 src/third_party/asn1/StartEventAckMessage.c create mode 100644 src/third_party/asn1/StartEventAckMessage.h create mode 100644 src/third_party/asn1/StartEventMessage.c create mode 100644 src/third_party/asn1/StartEventMessage.h create mode 100644 src/third_party/asn1/StatisticsData.c create mode 100644 src/third_party/asn1/StatisticsData.h create mode 100644 src/third_party/asn1/StatisticsLogin.c create mode 100644 src/third_party/asn1/StatisticsLogin.h create mode 100644 src/third_party/asn1/StatisticsMessage.c create mode 100644 src/third_party/asn1/StatisticsMessage.h create mode 100644 src/third_party/asn1/SubscriptionRequestMessage.c create mode 100644 src/third_party/asn1/SubscriptionRequestMessage.h create mode 120000 src/third_party/asn1/UTF8String.c create mode 120000 src/third_party/asn1/UTF8String.h create mode 100644 src/third_party/asn1/UnknownAvatar.c create mode 100644 src/third_party/asn1/UnknownAvatar.h create mode 100644 src/third_party/asn1/UnknownPlayerInfo.c create mode 100644 src/third_party/asn1/UnknownPlayerInfo.h create mode 100644 src/third_party/asn1/Version.c create mode 100644 src/third_party/asn1/Version.h create mode 100644 src/third_party/asn1/YourActionRejectedMessage.c create mode 100644 src/third_party/asn1/YourActionRejectedMessage.h create mode 120000 src/third_party/asn1/asn_SEQUENCE_OF.c create mode 120000 src/third_party/asn1/asn_SEQUENCE_OF.h create mode 120000 src/third_party/asn1/asn_SET_OF.c create mode 120000 src/third_party/asn1/asn_SET_OF.h create mode 120000 src/third_party/asn1/asn_application.h create mode 120000 src/third_party/asn1/asn_codecs.h create mode 120000 src/third_party/asn1/asn_codecs_prim.c create mode 120000 src/third_party/asn1/asn_codecs_prim.h create mode 120000 src/third_party/asn1/asn_internal.h create mode 120000 src/third_party/asn1/asn_system.h create mode 100755 src/third_party/asn1/asntest.c create mode 120000 src/third_party/asn1/ber_decoder.c create mode 120000 src/third_party/asn1/ber_decoder.h create mode 120000 src/third_party/asn1/ber_tlv_length.c create mode 120000 src/third_party/asn1/ber_tlv_length.h create mode 120000 src/third_party/asn1/ber_tlv_tag.c create mode 120000 src/third_party/asn1/ber_tlv_tag.h create mode 120000 src/third_party/asn1/constr_CHOICE.c create mode 120000 src/third_party/asn1/constr_CHOICE.h create mode 120000 src/third_party/asn1/constr_SEQUENCE.c create mode 120000 src/third_party/asn1/constr_SEQUENCE.h create mode 120000 src/third_party/asn1/constr_SEQUENCE_OF.c create mode 120000 src/third_party/asn1/constr_SEQUENCE_OF.h create mode 120000 src/third_party/asn1/constr_SET_OF.c create mode 120000 src/third_party/asn1/constr_SET_OF.h create mode 120000 src/third_party/asn1/constr_TYPE.c create mode 120000 src/third_party/asn1/constr_TYPE.h create mode 120000 src/third_party/asn1/constraints.c create mode 120000 src/third_party/asn1/constraints.h create mode 120000 src/third_party/asn1/converter-sample.c create mode 120000 src/third_party/asn1/der_encoder.c create mode 120000 src/third_party/asn1/der_encoder.h create mode 120000 src/third_party/asn1/per_decoder.c create mode 120000 src/third_party/asn1/per_decoder.h create mode 120000 src/third_party/asn1/per_encoder.c create mode 120000 src/third_party/asn1/per_encoder.h create mode 120000 src/third_party/asn1/per_opentype.c create mode 120000 src/third_party/asn1/per_opentype.h create mode 120000 src/third_party/asn1/per_support.c create mode 120000 src/third_party/asn1/per_support.h create mode 120000 src/third_party/asn1/xer_decoder.c create mode 120000 src/third_party/asn1/xer_decoder.h create mode 120000 src/third_party/asn1/xer_encoder.c create mode 120000 src/third_party/asn1/xer_encoder.h create mode 120000 src/third_party/asn1/xer_support.c create mode 120000 src/third_party/asn1/xer_support.h diff --git a/src/third_party/asn1/AllInShowCardsMessage.c b/src/third_party/asn1/AllInShowCardsMessage.c new file mode 100644 index 00000000..9be5935c --- /dev/null +++ b/src/third_party/asn1/AllInShowCardsMessage.c @@ -0,0 +1,141 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AllInShowCardsMessage.h" + +static int +memb_playersAllIn_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 >= 1 && 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_playersAllIn_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_PlayerAllIn, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_playersAllIn_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_playersAllIn_specs_3 = { + sizeof(struct playersAllIn), + offsetof(struct playersAllIn, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_playersAllIn_3 = { + "playersAllIn", + "playersAllIn", + 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_playersAllIn_tags_3, + sizeof(asn_DEF_playersAllIn_tags_3) + /sizeof(asn_DEF_playersAllIn_tags_3[0]), /* 1 */ + asn_DEF_playersAllIn_tags_3, /* Same as above */ + sizeof(asn_DEF_playersAllIn_tags_3) + /sizeof(asn_DEF_playersAllIn_tags_3[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_playersAllIn_3, + 1, /* Single element */ + &asn_SPC_playersAllIn_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_AllInShowCardsMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct AllInShowCardsMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct AllInShowCardsMessage, playersAllIn), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_playersAllIn_3, + memb_playersAllIn_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playersAllIn" + }, +}; +static ber_tlv_tag_t asn_DEF_AllInShowCardsMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (24 << 2)), + (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 381 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* playersAllIn at 383 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AllInShowCardsMessage_specs_1 = { + sizeof(struct AllInShowCardsMessage), + offsetof(struct AllInShowCardsMessage, _asn_ctx), + asn_MAP_AllInShowCardsMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AllInShowCardsMessage = { + "AllInShowCardsMessage", + "AllInShowCardsMessage", + 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_AllInShowCardsMessage_tags_1, + sizeof(asn_DEF_AllInShowCardsMessage_tags_1) + /sizeof(asn_DEF_AllInShowCardsMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_AllInShowCardsMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_AllInShowCardsMessage_tags_1) + /sizeof(asn_DEF_AllInShowCardsMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_AllInShowCardsMessage_1, + 2, /* Elements count */ + &asn_SPC_AllInShowCardsMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AllInShowCardsMessage.h b/src/third_party/asn1/AllInShowCardsMessage.h new file mode 100644 index 00000000..cc3b7ac8 --- /dev/null +++ b/src/third_party/asn1/AllInShowCardsMessage.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AllInShowCardsMessage_H_ +#define _AllInShowCardsMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct PlayerAllIn; + +/* AllInShowCardsMessage */ +typedef struct AllInShowCardsMessage { + NonZeroId_t gameId; + struct playersAllIn { + A_SEQUENCE_OF(struct PlayerAllIn) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } playersAllIn; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AllInShowCardsMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AllInShowCardsMessage; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "PlayerAllIn.h" + +#endif /* _AllInShowCardsMessage_H_ */ diff --git a/src/third_party/asn1/AnonymousLogin.c b/src/third_party/asn1/AnonymousLogin.c new file mode 100644 index 00000000..e5e2efb1 --- /dev/null +++ b/src/third_party/asn1/AnonymousLogin.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AnonymousLogin.h" + +static asn_TYPE_member_t asn_MBR_AnonymousLogin_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct AnonymousLogin, playerName), + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), + 0, + &asn_DEF_UTF8String, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerName" + }, + { ATF_POINTER, 1, offsetof(struct AnonymousLogin, avatar), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_AvatarHash, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatar" + }, +}; +static ber_tlv_tag_t asn_DEF_AnonymousLogin_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_AnonymousLogin_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* avatar at 77 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* playerName at 76 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AnonymousLogin_specs_1 = { + sizeof(struct AnonymousLogin), + offsetof(struct AnonymousLogin, _asn_ctx), + asn_MAP_AnonymousLogin_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AnonymousLogin = { + "AnonymousLogin", + "AnonymousLogin", + 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_AnonymousLogin_tags_1, + sizeof(asn_DEF_AnonymousLogin_tags_1) + /sizeof(asn_DEF_AnonymousLogin_tags_1[0]), /* 1 */ + asn_DEF_AnonymousLogin_tags_1, /* Same as above */ + sizeof(asn_DEF_AnonymousLogin_tags_1) + /sizeof(asn_DEF_AnonymousLogin_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_AnonymousLogin_1, + 2, /* Elements count */ + &asn_SPC_AnonymousLogin_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AnonymousLogin.h b/src/third_party/asn1/AnonymousLogin.h new file mode 100644 index 00000000..7f66e1b2 --- /dev/null +++ b/src/third_party/asn1/AnonymousLogin.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AnonymousLogin_H_ +#define _AnonymousLogin_H_ + + +#include + +/* Including external dependencies */ +#include +#include "AvatarHash.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AnonymousLogin */ +typedef struct AnonymousLogin { + UTF8String_t playerName; + AvatarHash_t *avatar /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AnonymousLogin_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AnonymousLogin; + +#ifdef __cplusplus +} +#endif + +#endif /* _AnonymousLogin_H_ */ diff --git a/src/third_party/asn1/AuthenticatedLogin.c b/src/third_party/asn1/AuthenticatedLogin.c new file mode 100644 index 00000000..8c6d2665 --- /dev/null +++ b/src/third_party/asn1/AuthenticatedLogin.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AuthenticatedLogin.h" + +static asn_TYPE_member_t asn_MBR_AuthenticatedLogin_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct AuthenticatedLogin, playerName), + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), + 0, + &asn_DEF_UTF8String, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerName" + }, + { ATF_POINTER, 1, offsetof(struct AuthenticatedLogin, avatar), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_AvatarHash, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatar" + }, +}; +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)), 1, 0, 0 }, /* avatar at 83 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* playerName at 82 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AuthenticatedLogin_specs_1 = { + sizeof(struct AuthenticatedLogin), + offsetof(struct AuthenticatedLogin, _asn_ctx), + asn_MAP_AuthenticatedLogin_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AuthenticatedLogin = { + "AuthenticatedLogin", + "AuthenticatedLogin", + 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_AuthenticatedLogin_tags_1, + sizeof(asn_DEF_AuthenticatedLogin_tags_1) + /sizeof(asn_DEF_AuthenticatedLogin_tags_1[0]), /* 1 */ + asn_DEF_AuthenticatedLogin_tags_1, /* Same as above */ + sizeof(asn_DEF_AuthenticatedLogin_tags_1) + /sizeof(asn_DEF_AuthenticatedLogin_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_AuthenticatedLogin_1, + 2, /* Elements count */ + &asn_SPC_AuthenticatedLogin_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AuthenticatedLogin.h b/src/third_party/asn1/AuthenticatedLogin.h new file mode 100644 index 00000000..d0e09471 --- /dev/null +++ b/src/third_party/asn1/AuthenticatedLogin.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AuthenticatedLogin_H_ +#define _AuthenticatedLogin_H_ + + +#include + +/* Including external dependencies */ +#include +#include "AvatarHash.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AuthenticatedLogin */ +typedef struct AuthenticatedLogin { + UTF8String_t playerName; + AvatarHash_t *avatar /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AuthenticatedLogin_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AuthenticatedLogin; + +#ifdef __cplusplus +} +#endif + +#endif /* _AuthenticatedLogin_H_ */ diff --git a/src/third_party/asn1/AvatarData.c b/src/third_party/asn1/AvatarData.c new file mode 100644 index 00000000..679d6238 --- /dev/null +++ b/src/third_party/asn1/AvatarData.c @@ -0,0 +1,86 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AvatarData.h" + +static int +memb_avatarBlock_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 256)) { + /* Constraint check succeeded */ + return 0; + } 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_AvatarData_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct AvatarData, avatarBlock), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_OCTET_STRING, + memb_avatarBlock_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarBlock" + }, +}; +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 117 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AvatarData_specs_1 = { + sizeof(struct AvatarData), + offsetof(struct AvatarData, _asn_ctx), + asn_MAP_AvatarData_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_AvatarData = { + "AvatarData", + "AvatarData", + 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_AvatarData_tags_1, + sizeof(asn_DEF_AvatarData_tags_1) + /sizeof(asn_DEF_AvatarData_tags_1[0]), /* 1 */ + asn_DEF_AvatarData_tags_1, /* Same as above */ + sizeof(asn_DEF_AvatarData_tags_1) + /sizeof(asn_DEF_AvatarData_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_AvatarData_1, + 1, /* Elements count */ + &asn_SPC_AvatarData_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AvatarData.h b/src/third_party/asn1/AvatarData.h new file mode 100644 index 00000000..5a8f66ca --- /dev/null +++ b/src/third_party/asn1/AvatarData.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AvatarData_H_ +#define _AvatarData_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AvatarData */ +typedef struct AvatarData { + OCTET_STRING_t avatarBlock; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AvatarData_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AvatarData; + +#ifdef __cplusplus +} +#endif + +#endif /* _AvatarData_H_ */ diff --git a/src/third_party/asn1/AvatarEnd.c b/src/third_party/asn1/AvatarEnd.c new file mode 100644 index 00000000..b97f260b --- /dev/null +++ b/src/third_party/asn1/AvatarEnd.c @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AvatarEnd.h" + +static ber_tlv_tag_t asn_DEF_AvatarEnd_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SEQUENCE_specifics_t asn_SPC_AvatarEnd_specs_1 = { + sizeof(struct AvatarEnd), + offsetof(struct AvatarEnd, _asn_ctx), + 0, /* No top level tags */ + 0, /* No tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AvatarEnd = { + "AvatarEnd", + "AvatarEnd", + 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_AvatarEnd_tags_1, + sizeof(asn_DEF_AvatarEnd_tags_1) + /sizeof(asn_DEF_AvatarEnd_tags_1[0]), /* 1 */ + asn_DEF_AvatarEnd_tags_1, /* Same as above */ + sizeof(asn_DEF_AvatarEnd_tags_1) + /sizeof(asn_DEF_AvatarEnd_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + &asn_SPC_AvatarEnd_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AvatarEnd.h b/src/third_party/asn1/AvatarEnd.h new file mode 100644 index 00000000..3c1e13f6 --- /dev/null +++ b/src/third_party/asn1/AvatarEnd.h @@ -0,0 +1,38 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AvatarEnd_H_ +#define _AvatarEnd_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AvatarEnd */ +typedef struct AvatarEnd { + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AvatarEnd_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AvatarEnd; + +#ifdef __cplusplus +} +#endif + +#endif /* _AvatarEnd_H_ */ diff --git a/src/third_party/asn1/AvatarHash.c b/src/third_party/asn1/AvatarHash.c new file mode 100644 index 00000000..29f1c884 --- /dev/null +++ b/src/third_party/asn1/AvatarHash.c @@ -0,0 +1,127 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AvatarHash.h" + +int +AvatarHash_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static void +AvatarHash_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_OCTET_STRING.free_struct; + td->print_struct = asn_DEF_OCTET_STRING.print_struct; + td->ber_decoder = asn_DEF_OCTET_STRING.ber_decoder; + td->der_encoder = asn_DEF_OCTET_STRING.der_encoder; + td->xer_decoder = asn_DEF_OCTET_STRING.xer_decoder; + td->xer_encoder = asn_DEF_OCTET_STRING.xer_encoder; + td->uper_decoder = asn_DEF_OCTET_STRING.uper_decoder; + td->uper_encoder = asn_DEF_OCTET_STRING.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_OCTET_STRING.per_constraints; + td->elements = asn_DEF_OCTET_STRING.elements; + td->elements_count = asn_DEF_OCTET_STRING.elements_count; + td->specifics = asn_DEF_OCTET_STRING.specifics; +} + +void +AvatarHash_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + AvatarHash_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +AvatarHash_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + AvatarHash_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +AvatarHash_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + AvatarHash_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +AvatarHash_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + AvatarHash_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +AvatarHash_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + AvatarHash_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +AvatarHash_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + AvatarHash_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static ber_tlv_tag_t asn_DEF_AvatarHash_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AvatarHash = { + "AvatarHash", + "AvatarHash", + AvatarHash_free, + AvatarHash_print, + AvatarHash_constraint, + AvatarHash_decode_ber, + AvatarHash_encode_der, + AvatarHash_decode_xer, + AvatarHash_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_AvatarHash_tags_1, + sizeof(asn_DEF_AvatarHash_tags_1) + /sizeof(asn_DEF_AvatarHash_tags_1[0]), /* 1 */ + asn_DEF_AvatarHash_tags_1, /* Same as above */ + sizeof(asn_DEF_AvatarHash_tags_1) + /sizeof(asn_DEF_AvatarHash_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/src/third_party/asn1/AvatarHash.h b/src/third_party/asn1/AvatarHash.h new file mode 100644 index 00000000..2da15d74 --- /dev/null +++ b/src/third_party/asn1/AvatarHash.h @@ -0,0 +1,37 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AvatarHash_H_ +#define _AvatarHash_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AvatarHash */ +typedef OCTET_STRING_t AvatarHash_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AvatarHash; +asn_struct_free_f AvatarHash_free; +asn_struct_print_f AvatarHash_print; +asn_constr_check_f AvatarHash_constraint; +ber_type_decoder_f AvatarHash_decode_ber; +der_type_encoder_f AvatarHash_encode_der; +xer_type_decoder_f AvatarHash_decode_xer; +xer_type_encoder_f AvatarHash_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _AvatarHash_H_ */ diff --git a/src/third_party/asn1/AvatarHeader.c b/src/third_party/asn1/AvatarHeader.c new file mode 100644 index 00000000..6c43230f --- /dev/null +++ b/src/third_party/asn1/AvatarHeader.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AvatarHeader.h" + +static int +memb_avatarSize_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 32 && value <= 30720)) { + /* Constraint check succeeded */ + return 0; + } 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_AvatarHeader_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct AvatarHeader, avatarType), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_AvatarType, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarType" + }, + { ATF_NOFLAGS, 0, offsetof(struct AvatarHeader, avatarSize), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_avatarSize_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarSize" + }, +}; +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 113 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* avatarType at 112 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AvatarHeader_specs_1 = { + sizeof(struct AvatarHeader), + offsetof(struct AvatarHeader, _asn_ctx), + asn_MAP_AvatarHeader_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AvatarHeader = { + "AvatarHeader", + "AvatarHeader", + 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_AvatarHeader_tags_1, + sizeof(asn_DEF_AvatarHeader_tags_1) + /sizeof(asn_DEF_AvatarHeader_tags_1[0]), /* 1 */ + asn_DEF_AvatarHeader_tags_1, /* Same as above */ + sizeof(asn_DEF_AvatarHeader_tags_1) + /sizeof(asn_DEF_AvatarHeader_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_AvatarHeader_1, + 2, /* Elements count */ + &asn_SPC_AvatarHeader_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AvatarHeader.h b/src/third_party/asn1/AvatarHeader.h new file mode 100644 index 00000000..1d364e14 --- /dev/null +++ b/src/third_party/asn1/AvatarHeader.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AvatarHeader_H_ +#define _AvatarHeader_H_ + + +#include + +/* Including external dependencies */ +#include "AvatarType.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AvatarHeader */ +typedef struct AvatarHeader { + AvatarType_t avatarType; + long avatarSize; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AvatarHeader_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AvatarHeader; + +#ifdef __cplusplus +} +#endif + +#endif /* _AvatarHeader_H_ */ diff --git a/src/third_party/asn1/AvatarReplyMessage.c b/src/third_party/asn1/AvatarReplyMessage.c new file mode 100644 index 00000000..2c3a50c4 --- /dev/null +++ b/src/third_party/asn1/AvatarReplyMessage.c @@ -0,0 +1,151 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AvatarReplyMessage.h" + +static asn_TYPE_member_t asn_MBR_avatarResult_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct avatarResult, choice.avatarHeader), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AvatarHeader, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarHeader" + }, + { ATF_NOFLAGS, 0, offsetof(struct avatarResult, choice.avatarData), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AvatarData, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarData" + }, + { ATF_NOFLAGS, 0, offsetof(struct avatarResult, choice.avatarEnd), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AvatarEnd, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarEnd" + }, + { ATF_NOFLAGS, 0, offsetof(struct avatarResult, choice.unknownAvatar), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UnknownAvatar, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "unknownAvatar" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_avatarResult_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* avatarHeader at 104 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* avatarData at 105 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* avatarEnd at 106 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* unknownAvatar at 108 */ +}; +static asn_CHOICE_specifics_t asn_SPC_avatarResult_specs_3 = { + sizeof(struct avatarResult), + offsetof(struct avatarResult, _asn_ctx), + offsetof(struct avatarResult, present), + sizeof(((struct avatarResult *)0)->present), + asn_MAP_avatarResult_tag2el_3, + 4, /* Count of tags in the map */ + 0, + 4 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_avatarResult_3 = { + "avatarResult", + "avatarResult", + 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 */ + 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_avatarResult_3, + 4, /* Elements count */ + &asn_SPC_avatarResult_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_AvatarReplyMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct AvatarReplyMessage, requestId), + (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, + "requestId" + }, + { ATF_NOFLAGS, 0, offsetof(struct AvatarReplyMessage, avatarResult), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_avatarResult_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarResult" + }, +}; +static ber_tlv_tag_t asn_DEF_AvatarReplyMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (3 << 2)), + (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 102 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* avatarHeader at 104 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* avatarData at 105 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* avatarEnd at 106 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* unknownAvatar at 108 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AvatarReplyMessage_specs_1 = { + sizeof(struct AvatarReplyMessage), + offsetof(struct AvatarReplyMessage, _asn_ctx), + asn_MAP_AvatarReplyMessage_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AvatarReplyMessage = { + "AvatarReplyMessage", + "AvatarReplyMessage", + 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_AvatarReplyMessage_tags_1, + sizeof(asn_DEF_AvatarReplyMessage_tags_1) + /sizeof(asn_DEF_AvatarReplyMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_AvatarReplyMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_AvatarReplyMessage_tags_1) + /sizeof(asn_DEF_AvatarReplyMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_AvatarReplyMessage_1, + 2, /* Elements count */ + &asn_SPC_AvatarReplyMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AvatarReplyMessage.h b/src/third_party/asn1/AvatarReplyMessage.h new file mode 100644 index 00000000..d775bbbd --- /dev/null +++ b/src/third_party/asn1/AvatarReplyMessage.h @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AvatarReplyMessage_H_ +#define _AvatarReplyMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "AvatarHeader.h" +#include "AvatarData.h" +#include "AvatarEnd.h" +#include "UnknownAvatar.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum avatarResult_PR { + avatarResult_PR_NOTHING, /* No components present */ + avatarResult_PR_avatarHeader, + avatarResult_PR_avatarData, + avatarResult_PR_avatarEnd, + avatarResult_PR_unknownAvatar, + /* Extensions may appear below */ + +} avatarResult_PR; + +/* AvatarReplyMessage */ +typedef struct AvatarReplyMessage { + NonZeroId_t requestId; + struct avatarResult { + avatarResult_PR present; + union AvatarReplyMessage__avatarResult_u { + AvatarHeader_t avatarHeader; + AvatarData_t avatarData; + AvatarEnd_t avatarEnd; + UnknownAvatar_t unknownAvatar; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } avatarResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AvatarReplyMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AvatarReplyMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _AvatarReplyMessage_H_ */ diff --git a/src/third_party/asn1/AvatarRequestMessage.c b/src/third_party/asn1/AvatarRequestMessage.c new file mode 100644 index 00000000..27f11f52 --- /dev/null +++ b/src/third_party/asn1/AvatarRequestMessage.c @@ -0,0 +1,71 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AvatarRequestMessage.h" + +static asn_TYPE_member_t asn_MBR_AvatarRequestMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct AvatarRequestMessage, requestId), + (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, + "requestId" + }, + { ATF_NOFLAGS, 0, offsetof(struct AvatarRequestMessage, avatar), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_AvatarHash, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatar" + }, +}; +static ber_tlv_tag_t asn_DEF_AvatarRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (2 << 2)), + (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 97 */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 } /* avatar at 99 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AvatarRequestMessage_specs_1 = { + sizeof(struct AvatarRequestMessage), + offsetof(struct AvatarRequestMessage, _asn_ctx), + asn_MAP_AvatarRequestMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AvatarRequestMessage = { + "AvatarRequestMessage", + "AvatarRequestMessage", + 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_AvatarRequestMessage_tags_1, + sizeof(asn_DEF_AvatarRequestMessage_tags_1) + /sizeof(asn_DEF_AvatarRequestMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_AvatarRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_AvatarRequestMessage_tags_1) + /sizeof(asn_DEF_AvatarRequestMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_AvatarRequestMessage_1, + 2, /* Elements count */ + &asn_SPC_AvatarRequestMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AvatarRequestMessage.h b/src/third_party/asn1/AvatarRequestMessage.h new file mode 100644 index 00000000..0b131751 --- /dev/null +++ b/src/third_party/asn1/AvatarRequestMessage.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AvatarRequestMessage_H_ +#define _AvatarRequestMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "AvatarHash.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AvatarRequestMessage */ +typedef struct AvatarRequestMessage { + NonZeroId_t requestId; + AvatarHash_t avatar; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AvatarRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AvatarRequestMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _AvatarRequestMessage_H_ */ diff --git a/src/third_party/asn1/AvatarType.c b/src/third_party/asn1/AvatarType.c new file mode 100644 index 00000000..4dc72c62 --- /dev/null +++ b/src/third_party/asn1/AvatarType.c @@ -0,0 +1,128 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "AvatarType.h" + +int +AvatarType_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +AvatarType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +void +AvatarType_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + AvatarType_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +AvatarType_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + AvatarType_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +AvatarType_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + AvatarType_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +AvatarType_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + AvatarType_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +AvatarType_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + AvatarType_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +AvatarType_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + AvatarType_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_AvatarType_value2enum_1[] = { + { 1, 8, "imagePng" }, + { 2, 8, "imageJpg" }, + { 3, 8, "imageGif" } +}; +static unsigned int asn_MAP_AvatarType_enum2value_1[] = { + 2, /* imageGif(3) */ + 1, /* imageJpg(2) */ + 0 /* imagePng(1) */ +}; +static asn_INTEGER_specifics_t asn_SPC_AvatarType_specs_1 = { + asn_MAP_AvatarType_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_AvatarType_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_AvatarType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AvatarType = { + "AvatarType", + "AvatarType", + AvatarType_free, + AvatarType_print, + AvatarType_constraint, + AvatarType_decode_ber, + AvatarType_encode_der, + AvatarType_decode_xer, + AvatarType_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_AvatarType_tags_1, + sizeof(asn_DEF_AvatarType_tags_1) + /sizeof(asn_DEF_AvatarType_tags_1[0]), /* 1 */ + asn_DEF_AvatarType_tags_1, /* Same as above */ + sizeof(asn_DEF_AvatarType_tags_1) + /sizeof(asn_DEF_AvatarType_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_AvatarType_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/AvatarType.h b/src/third_party/asn1/AvatarType.h new file mode 100644 index 00000000..6f9a1cf0 --- /dev/null +++ b/src/third_party/asn1/AvatarType.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _AvatarType_H_ +#define _AvatarType_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum AvatarType { + AvatarType_imagePng = 1, + AvatarType_imageJpg = 2, + AvatarType_imageGif = 3 +} e_AvatarType; + +/* AvatarType */ +typedef long AvatarType_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AvatarType; +asn_struct_free_f AvatarType_free; +asn_struct_print_f AvatarType_print; +asn_constr_check_f AvatarType_constraint; +ber_type_decoder_f AvatarType_decode_ber; +der_type_encoder_f AvatarType_encode_der; +xer_type_decoder_f AvatarType_decode_xer; +xer_type_encoder_f AvatarType_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _AvatarType_H_ */ diff --git a/src/third_party/asn1/BIT_STRING.c b/src/third_party/asn1/BIT_STRING.c new file mode 120000 index 00000000..10acbabe --- /dev/null +++ b/src/third_party/asn1/BIT_STRING.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/BIT_STRING.c \ No newline at end of file diff --git a/src/third_party/asn1/BIT_STRING.h b/src/third_party/asn1/BIT_STRING.h new file mode 120000 index 00000000..2283cb69 --- /dev/null +++ b/src/third_party/asn1/BIT_STRING.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/BIT_STRING.h \ No newline at end of file diff --git a/src/third_party/asn1/BOOLEAN.c b/src/third_party/asn1/BOOLEAN.c new file mode 120000 index 00000000..d325f5c1 --- /dev/null +++ b/src/third_party/asn1/BOOLEAN.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/BOOLEAN.c \ No newline at end of file diff --git a/src/third_party/asn1/BOOLEAN.h b/src/third_party/asn1/BOOLEAN.h new file mode 120000 index 00000000..5529933d --- /dev/null +++ b/src/third_party/asn1/BOOLEAN.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/BOOLEAN.h \ No newline at end of file diff --git a/src/third_party/asn1/COPYING_asn1c b/src/third_party/asn1/COPYING_asn1c new file mode 100644 index 00000000..f67b1f80 --- /dev/null +++ b/src/third_party/asn1/COPYING_asn1c @@ -0,0 +1,29 @@ +These files are generated using asn1c. +http://lionet.info/asn1c/ +/*- + * Copyright (c) 2003, 2004, 2005, 2006, 2007 Lev Walkin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: COPYING 1293 2007-06-23 18:33:31Z vlm $ + */ diff --git a/src/third_party/asn1/Card.c b/src/third_party/asn1/Card.c new file mode 100644 index 00000000..7887f7fc --- /dev/null +++ b/src/third_party/asn1/Card.c @@ -0,0 +1,126 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "Card.h" + +int +Card_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 51)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static void +Card_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeInteger.free_struct; + td->print_struct = asn_DEF_NativeInteger.print_struct; + td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; + td->der_encoder = asn_DEF_NativeInteger.der_encoder; + td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; + td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; + td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; + td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeInteger.per_constraints; + td->elements = asn_DEF_NativeInteger.elements; + td->elements_count = asn_DEF_NativeInteger.elements_count; + td->specifics = asn_DEF_NativeInteger.specifics; +} + +void +Card_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + Card_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +Card_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + Card_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +Card_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + Card_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +Card_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + Card_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +Card_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + Card_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +Card_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + Card_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static ber_tlv_tag_t asn_DEF_Card_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Card = { + "Card", + "Card", + Card_free, + Card_print, + Card_constraint, + Card_decode_ber, + Card_encode_der, + Card_decode_xer, + Card_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_Card_tags_1, + sizeof(asn_DEF_Card_tags_1) + /sizeof(asn_DEF_Card_tags_1[0]), /* 1 */ + asn_DEF_Card_tags_1, /* Same as above */ + sizeof(asn_DEF_Card_tags_1) + /sizeof(asn_DEF_Card_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/src/third_party/asn1/Card.h b/src/third_party/asn1/Card.h new file mode 100644 index 00000000..40d23bf3 --- /dev/null +++ b/src/third_party/asn1/Card.h @@ -0,0 +1,37 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _Card_H_ +#define _Card_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Card */ +typedef long Card_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Card; +asn_struct_free_f Card_free; +asn_struct_print_f Card_print; +asn_constr_check_f Card_constraint; +ber_type_decoder_f Card_decode_ber; +der_type_encoder_f Card_encode_der; +xer_type_decoder_f Card_decode_xer; +xer_type_encoder_f Card_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _Card_H_ */ diff --git a/src/third_party/asn1/ChatMessage.c b/src/third_party/asn1/ChatMessage.c new file mode 100644 index 00000000..e203b92c --- /dev/null +++ b/src/third_party/asn1/ChatMessage.c @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "ChatMessage.h" + +static asn_TYPE_member_t asn_MBR_ChatMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ChatMessage, playerId), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Id, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct ChatMessage, gameId), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Id, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct ChatMessage, chatText), + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), + 0, + &asn_DEF_UTF8String, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "chatText" + }, +}; +static ber_tlv_tag_t asn_DEF_ChatMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (130 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_ChatMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* playerId at 439 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* gameId at 440 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 2, 0, 0 } /* chatText at 441 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ChatMessage_specs_1 = { + sizeof(struct ChatMessage), + offsetof(struct ChatMessage, _asn_ctx), + asn_MAP_ChatMessage_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* Start extensions */ + 4 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_ChatMessage = { + "ChatMessage", + "ChatMessage", + 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_ChatMessage_tags_1, + sizeof(asn_DEF_ChatMessage_tags_1) + /sizeof(asn_DEF_ChatMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_ChatMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_ChatMessage_tags_1) + /sizeof(asn_DEF_ChatMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_ChatMessage_1, + 3, /* Elements count */ + &asn_SPC_ChatMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/ChatMessage.h b/src/third_party/asn1/ChatMessage.h new file mode 100644 index 00000000..35b98ed9 --- /dev/null +++ b/src/third_party/asn1/ChatMessage.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _ChatMessage_H_ +#define _ChatMessage_H_ + + +#include + +/* Including external dependencies */ +#include "Id.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ChatMessage */ +typedef struct ChatMessage { + Id_t playerId; + Id_t gameId; + UTF8String_t chatText; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ChatMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ChatMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _ChatMessage_H_ */ diff --git a/src/third_party/asn1/ChatRequestMessage.c b/src/third_party/asn1/ChatRequestMessage.c new file mode 100644 index 00000000..ce3674d5 --- /dev/null +++ b/src/third_party/asn1/ChatRequestMessage.c @@ -0,0 +1,71 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "ChatRequestMessage.h" + +static asn_TYPE_member_t asn_MBR_ChatRequestMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ChatRequestMessage, gameId), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Id, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct ChatRequestMessage, chatText), + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), + 0, + &asn_DEF_UTF8String, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "chatText" + }, +}; +static ber_tlv_tag_t asn_DEF_ChatRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (129 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_ChatRequestMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 434 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 } /* chatText at 435 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ChatRequestMessage_specs_1 = { + sizeof(struct ChatRequestMessage), + offsetof(struct ChatRequestMessage, _asn_ctx), + asn_MAP_ChatRequestMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_ChatRequestMessage = { + "ChatRequestMessage", + "ChatRequestMessage", + 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_ChatRequestMessage_tags_1, + sizeof(asn_DEF_ChatRequestMessage_tags_1) + /sizeof(asn_DEF_ChatRequestMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_ChatRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_ChatRequestMessage_tags_1) + /sizeof(asn_DEF_ChatRequestMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_ChatRequestMessage_1, + 2, /* Elements count */ + &asn_SPC_ChatRequestMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/ChatRequestMessage.h b/src/third_party/asn1/ChatRequestMessage.h new file mode 100644 index 00000000..7f2826f2 --- /dev/null +++ b/src/third_party/asn1/ChatRequestMessage.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _ChatRequestMessage_H_ +#define _ChatRequestMessage_H_ + + +#include + +/* Including external dependencies */ +#include "Id.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ChatRequestMessage */ +typedef struct ChatRequestMessage { + Id_t gameId; + UTF8String_t chatText; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ChatRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ChatRequestMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _ChatRequestMessage_H_ */ diff --git a/src/third_party/asn1/DealFlopCardsMessage.c b/src/third_party/asn1/DealFlopCardsMessage.c new file mode 100644 index 00000000..8cb16f60 --- /dev/null +++ b/src/third_party/asn1/DealFlopCardsMessage.c @@ -0,0 +1,141 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "DealFlopCardsMessage.h" + +static int +memb_flopCards_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 == 3)) { + /* 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_flopCards_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Card, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_flopCards_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_flopCards_specs_3 = { + sizeof(struct flopCards), + offsetof(struct flopCards, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_flopCards_3 = { + "flopCards", + "flopCards", + 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_flopCards_tags_3, + sizeof(asn_DEF_flopCards_tags_3) + /sizeof(asn_DEF_flopCards_tags_3[0]), /* 1 */ + asn_DEF_flopCards_tags_3, /* Same as above */ + sizeof(asn_DEF_flopCards_tags_3) + /sizeof(asn_DEF_flopCards_tags_3[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_flopCards_3, + 1, /* Single element */ + &asn_SPC_flopCards_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_DealFlopCardsMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DealFlopCardsMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct DealFlopCardsMessage, flopCards), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_flopCards_3, + memb_flopCards_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "flopCards" + }, +}; +static ber_tlv_tag_t asn_DEF_DealFlopCardsMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (21 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_DealFlopCardsMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 366 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* flopCards at 368 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_DealFlopCardsMessage_specs_1 = { + sizeof(struct DealFlopCardsMessage), + offsetof(struct DealFlopCardsMessage, _asn_ctx), + asn_MAP_DealFlopCardsMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_DealFlopCardsMessage = { + "DealFlopCardsMessage", + "DealFlopCardsMessage", + 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_DealFlopCardsMessage_tags_1, + sizeof(asn_DEF_DealFlopCardsMessage_tags_1) + /sizeof(asn_DEF_DealFlopCardsMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_DealFlopCardsMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_DealFlopCardsMessage_tags_1) + /sizeof(asn_DEF_DealFlopCardsMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_DealFlopCardsMessage_1, + 2, /* Elements count */ + &asn_SPC_DealFlopCardsMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/DealFlopCardsMessage.h b/src/third_party/asn1/DealFlopCardsMessage.h new file mode 100644 index 00000000..c06ed8a5 --- /dev/null +++ b/src/third_party/asn1/DealFlopCardsMessage.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _DealFlopCardsMessage_H_ +#define _DealFlopCardsMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "Card.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* DealFlopCardsMessage */ +typedef struct DealFlopCardsMessage { + NonZeroId_t gameId; + struct flopCards { + A_SEQUENCE_OF(Card_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } flopCards; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DealFlopCardsMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DealFlopCardsMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _DealFlopCardsMessage_H_ */ diff --git a/src/third_party/asn1/DealRiverCardMessage.c b/src/third_party/asn1/DealRiverCardMessage.c new file mode 100644 index 00000000..5a93b740 --- /dev/null +++ b/src/third_party/asn1/DealRiverCardMessage.c @@ -0,0 +1,71 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "DealRiverCardMessage.h" + +static asn_TYPE_member_t asn_MBR_DealRiverCardMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DealRiverCardMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct DealRiverCardMessage, riverCard), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Card, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "riverCard" + }, +}; +static ber_tlv_tag_t asn_DEF_DealRiverCardMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (23 << 2)), + (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 376 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* riverCard at 378 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_DealRiverCardMessage_specs_1 = { + sizeof(struct DealRiverCardMessage), + offsetof(struct DealRiverCardMessage, _asn_ctx), + asn_MAP_DealRiverCardMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_DealRiverCardMessage = { + "DealRiverCardMessage", + "DealRiverCardMessage", + 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_DealRiverCardMessage_tags_1, + sizeof(asn_DEF_DealRiverCardMessage_tags_1) + /sizeof(asn_DEF_DealRiverCardMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_DealRiverCardMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_DealRiverCardMessage_tags_1) + /sizeof(asn_DEF_DealRiverCardMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_DealRiverCardMessage_1, + 2, /* Elements count */ + &asn_SPC_DealRiverCardMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/DealRiverCardMessage.h b/src/third_party/asn1/DealRiverCardMessage.h new file mode 100644 index 00000000..91330795 --- /dev/null +++ b/src/third_party/asn1/DealRiverCardMessage.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _DealRiverCardMessage_H_ +#define _DealRiverCardMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "Card.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* DealRiverCardMessage */ +typedef struct DealRiverCardMessage { + NonZeroId_t gameId; + Card_t riverCard; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DealRiverCardMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DealRiverCardMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _DealRiverCardMessage_H_ */ diff --git a/src/third_party/asn1/DealTurnCardMessage.c b/src/third_party/asn1/DealTurnCardMessage.c new file mode 100644 index 00000000..636e2363 --- /dev/null +++ b/src/third_party/asn1/DealTurnCardMessage.c @@ -0,0 +1,71 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "DealTurnCardMessage.h" + +static asn_TYPE_member_t asn_MBR_DealTurnCardMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DealTurnCardMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct DealTurnCardMessage, turnCard), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Card, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "turnCard" + }, +}; +static ber_tlv_tag_t asn_DEF_DealTurnCardMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (22 << 2)), + (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 371 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* turnCard at 373 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_DealTurnCardMessage_specs_1 = { + sizeof(struct DealTurnCardMessage), + offsetof(struct DealTurnCardMessage, _asn_ctx), + asn_MAP_DealTurnCardMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_DealTurnCardMessage = { + "DealTurnCardMessage", + "DealTurnCardMessage", + 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_DealTurnCardMessage_tags_1, + sizeof(asn_DEF_DealTurnCardMessage_tags_1) + /sizeof(asn_DEF_DealTurnCardMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_DealTurnCardMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_DealTurnCardMessage_tags_1) + /sizeof(asn_DEF_DealTurnCardMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_DealTurnCardMessage_1, + 2, /* Elements count */ + &asn_SPC_DealTurnCardMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/DealTurnCardMessage.h b/src/third_party/asn1/DealTurnCardMessage.h new file mode 100644 index 00000000..9b857401 --- /dev/null +++ b/src/third_party/asn1/DealTurnCardMessage.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _DealTurnCardMessage_H_ +#define _DealTurnCardMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "Card.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* DealTurnCardMessage */ +typedef struct DealTurnCardMessage { + NonZeroId_t gameId; + Card_t turnCard; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DealTurnCardMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DealTurnCardMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _DealTurnCardMessage_H_ */ diff --git a/src/third_party/asn1/DialogMessage.c b/src/third_party/asn1/DialogMessage.c new file mode 100644 index 00000000..a9e105bb --- /dev/null +++ b/src/third_party/asn1/DialogMessage.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "DialogMessage.h" + +static asn_TYPE_member_t asn_MBR_DialogMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DialogMessage, notificationText), + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), + 0, + &asn_DEF_UTF8String, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "notificationText" + }, +}; +static ber_tlv_tag_t asn_DEF_DialogMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (131 << 2)), + (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 445 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_DialogMessage_specs_1 = { + sizeof(struct DialogMessage), + offsetof(struct DialogMessage, _asn_ctx), + asn_MAP_DialogMessage_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_DialogMessage = { + "DialogMessage", + "DialogMessage", + 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_DialogMessage_tags_1, + sizeof(asn_DEF_DialogMessage_tags_1) + /sizeof(asn_DEF_DialogMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_DialogMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_DialogMessage_tags_1) + /sizeof(asn_DEF_DialogMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_DialogMessage_1, + 1, /* Elements count */ + &asn_SPC_DialogMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/DialogMessage.h b/src/third_party/asn1/DialogMessage.h new file mode 100644 index 00000000..e4c97f0b --- /dev/null +++ b/src/third_party/asn1/DialogMessage.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _DialogMessage_H_ +#define _DialogMessage_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* DialogMessage */ +typedef struct DialogMessage { + UTF8String_t notificationText; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DialogMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DialogMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _DialogMessage_H_ */ diff --git a/src/third_party/asn1/EndOfGameMessage.c b/src/third_party/asn1/EndOfGameMessage.c new file mode 100644 index 00000000..219825bc --- /dev/null +++ b/src/third_party/asn1/EndOfGameMessage.c @@ -0,0 +1,71 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "EndOfGameMessage.h" + +static asn_TYPE_member_t asn_MBR_EndOfGameMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EndOfGameMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct EndOfGameMessage, winnerPlayerId), + (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, + "winnerPlayerId" + }, +}; +static ber_tlv_tag_t asn_DEF_EndOfGameMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (26 << 2)), + (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 418 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* winnerPlayerId at 420 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_EndOfGameMessage_specs_1 = { + sizeof(struct EndOfGameMessage), + offsetof(struct EndOfGameMessage, _asn_ctx), + asn_MAP_EndOfGameMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_EndOfGameMessage = { + "EndOfGameMessage", + "EndOfGameMessage", + 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_EndOfGameMessage_tags_1, + sizeof(asn_DEF_EndOfGameMessage_tags_1) + /sizeof(asn_DEF_EndOfGameMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_EndOfGameMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_EndOfGameMessage_tags_1) + /sizeof(asn_DEF_EndOfGameMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_EndOfGameMessage_1, + 2, /* Elements count */ + &asn_SPC_EndOfGameMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/EndOfGameMessage.h b/src/third_party/asn1/EndOfGameMessage.h new file mode 100644 index 00000000..d7994801 --- /dev/null +++ b/src/third_party/asn1/EndOfGameMessage.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _EndOfGameMessage_H_ +#define _EndOfGameMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EndOfGameMessage */ +typedef struct EndOfGameMessage { + NonZeroId_t gameId; + NonZeroId_t winnerPlayerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EndOfGameMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EndOfGameMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _EndOfGameMessage_H_ */ diff --git a/src/third_party/asn1/EndOfHandHideCards.c b/src/third_party/asn1/EndOfHandHideCards.c new file mode 100644 index 00000000..f91ed446 --- /dev/null +++ b/src/third_party/asn1/EndOfHandHideCards.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "EndOfHandHideCards.h" + +static int +memb_moneyWon_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_playerMoney_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } 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_EndOfHandHideCards_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EndOfHandHideCards, playerId), + (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, + "playerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct EndOfHandHideCards, moneyWon), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_moneyWon_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "moneyWon" + }, + { ATF_NOFLAGS, 0, offsetof(struct EndOfHandHideCards, playerMoney), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_playerMoney_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerMoney" + }, +}; +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 412 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* moneyWon at 413 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 0 } /* playerMoney at 414 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandHideCards_specs_1 = { + sizeof(struct EndOfHandHideCards), + offsetof(struct EndOfHandHideCards, _asn_ctx), + asn_MAP_EndOfHandHideCards_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* Start extensions */ + 4 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_EndOfHandHideCards = { + "EndOfHandHideCards", + "EndOfHandHideCards", + 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_EndOfHandHideCards_tags_1, + sizeof(asn_DEF_EndOfHandHideCards_tags_1) + /sizeof(asn_DEF_EndOfHandHideCards_tags_1[0]), /* 1 */ + asn_DEF_EndOfHandHideCards_tags_1, /* Same as above */ + sizeof(asn_DEF_EndOfHandHideCards_tags_1) + /sizeof(asn_DEF_EndOfHandHideCards_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_EndOfHandHideCards_1, + 3, /* Elements count */ + &asn_SPC_EndOfHandHideCards_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/EndOfHandHideCards.h b/src/third_party/asn1/EndOfHandHideCards.h new file mode 100644 index 00000000..741b5323 --- /dev/null +++ b/src/third_party/asn1/EndOfHandHideCards.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _EndOfHandHideCards_H_ +#define _EndOfHandHideCards_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EndOfHandHideCards */ +typedef struct EndOfHandHideCards { + NonZeroId_t playerId; + long moneyWon; + long playerMoney; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EndOfHandHideCards_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EndOfHandHideCards; + +#ifdef __cplusplus +} +#endif + +#endif /* _EndOfHandHideCards_H_ */ diff --git a/src/third_party/asn1/EndOfHandMessage.c b/src/third_party/asn1/EndOfHandMessage.c new file mode 100644 index 00000000..be8b4b4f --- /dev/null +++ b/src/third_party/asn1/EndOfHandMessage.c @@ -0,0 +1,129 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "EndOfHandMessage.h" + +static asn_TYPE_member_t asn_MBR_endOfHandType_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct endOfHandType, choice.endOfHandShowCards), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EndOfHandShowCards, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "endOfHandShowCards" + }, + { ATF_NOFLAGS, 0, offsetof(struct endOfHandType, choice.endOfHandHideCards), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EndOfHandHideCards, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "endOfHandHideCards" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_endOfHandType_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* endOfHandShowCards at 393 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* endOfHandHideCards at 395 */ +}; +static asn_CHOICE_specifics_t asn_SPC_endOfHandType_specs_3 = { + sizeof(struct endOfHandType), + offsetof(struct endOfHandType, _asn_ctx), + offsetof(struct endOfHandType, present), + sizeof(((struct endOfHandType *)0)->present), + asn_MAP_endOfHandType_tag2el_3, + 2, /* Count of tags in the map */ + 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_endOfHandType_3 = { + "endOfHandType", + "endOfHandType", + 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 */ + 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_endOfHandType_3, + 2, /* Elements count */ + &asn_SPC_endOfHandType_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_EndOfHandMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EndOfHandMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct EndOfHandMessage, endOfHandType), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_endOfHandType_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "endOfHandType" + }, +}; +static ber_tlv_tag_t asn_DEF_EndOfHandMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (25 << 2)), + (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 391 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* endOfHandShowCards at 393 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* endOfHandHideCards at 395 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandMessage_specs_1 = { + sizeof(struct EndOfHandMessage), + offsetof(struct EndOfHandMessage, _asn_ctx), + asn_MAP_EndOfHandMessage_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_EndOfHandMessage = { + "EndOfHandMessage", + "EndOfHandMessage", + 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_EndOfHandMessage_tags_1, + sizeof(asn_DEF_EndOfHandMessage_tags_1) + /sizeof(asn_DEF_EndOfHandMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_EndOfHandMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_EndOfHandMessage_tags_1) + /sizeof(asn_DEF_EndOfHandMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_EndOfHandMessage_1, + 2, /* Elements count */ + &asn_SPC_EndOfHandMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/EndOfHandMessage.h b/src/third_party/asn1/EndOfHandMessage.h new file mode 100644 index 00000000..2365644f --- /dev/null +++ b/src/third_party/asn1/EndOfHandMessage.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _EndOfHandMessage_H_ +#define _EndOfHandMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "EndOfHandShowCards.h" +#include "EndOfHandHideCards.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum endOfHandType_PR { + endOfHandType_PR_NOTHING, /* No components present */ + endOfHandType_PR_endOfHandShowCards, + endOfHandType_PR_endOfHandHideCards, + /* Extensions may appear below */ + +} endOfHandType_PR; + +/* EndOfHandMessage */ +typedef struct EndOfHandMessage { + NonZeroId_t gameId; + struct endOfHandType { + endOfHandType_PR present; + union EndOfHandMessage__endOfHandType_u { + EndOfHandShowCards_t endOfHandShowCards; + EndOfHandHideCards_t endOfHandHideCards; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } endOfHandType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EndOfHandMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EndOfHandMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _EndOfHandMessage_H_ */ diff --git a/src/third_party/asn1/EndOfHandShowCards.c b/src/third_party/asn1/EndOfHandShowCards.c new file mode 100644 index 00000000..580dbc08 --- /dev/null +++ b/src/third_party/asn1/EndOfHandShowCards.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "EndOfHandShowCards.h" + +static int +memb_playerResults_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 >= 1 && 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_playerResults_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_PlayerResult, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_playerResults_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_playerResults_specs_2 = { + sizeof(struct playerResults), + offsetof(struct playerResults, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_playerResults_2 = { + "playerResults", + "playerResults", + 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_playerResults_tags_2, + sizeof(asn_DEF_playerResults_tags_2) + /sizeof(asn_DEF_playerResults_tags_2[0]), /* 1 */ + asn_DEF_playerResults_tags_2, /* Same as above */ + sizeof(asn_DEF_playerResults_tags_2) + /sizeof(asn_DEF_playerResults_tags_2[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_playerResults_2, + 1, /* Single element */ + &asn_SPC_playerResults_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_EndOfHandShowCards_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EndOfHandShowCards, playerResults), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_playerResults_2, + memb_playerResults_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerResults" + }, +}; +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 400 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandShowCards_specs_1 = { + sizeof(struct EndOfHandShowCards), + offsetof(struct EndOfHandShowCards, _asn_ctx), + asn_MAP_EndOfHandShowCards_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_EndOfHandShowCards = { + "EndOfHandShowCards", + "EndOfHandShowCards", + 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_EndOfHandShowCards_tags_1, + sizeof(asn_DEF_EndOfHandShowCards_tags_1) + /sizeof(asn_DEF_EndOfHandShowCards_tags_1[0]), /* 1 */ + asn_DEF_EndOfHandShowCards_tags_1, /* Same as above */ + sizeof(asn_DEF_EndOfHandShowCards_tags_1) + /sizeof(asn_DEF_EndOfHandShowCards_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_EndOfHandShowCards_1, + 1, /* Elements count */ + &asn_SPC_EndOfHandShowCards_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/EndOfHandShowCards.h b/src/third_party/asn1/EndOfHandShowCards.h new file mode 100644 index 00000000..a7a86f34 --- /dev/null +++ b/src/third_party/asn1/EndOfHandShowCards.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _EndOfHandShowCards_H_ +#define _EndOfHandShowCards_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct PlayerResult; + +/* EndOfHandShowCards */ +typedef struct EndOfHandShowCards { + struct playerResults { + A_SEQUENCE_OF(struct PlayerResult) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } playerResults; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EndOfHandShowCards_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EndOfHandShowCards; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "PlayerResult.h" + +#endif /* _EndOfHandShowCards_H_ */ diff --git a/src/third_party/asn1/ErrorMessage.c b/src/third_party/asn1/ErrorMessage.c new file mode 100644 index 00000000..b89c71ec --- /dev/null +++ b/src/third_party/asn1/ErrorMessage.c @@ -0,0 +1,202 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "ErrorMessage.h" + +static int +errorReason_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +errorReason_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +static void +errorReason_2_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + errorReason_2_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +static int +errorReason_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + errorReason_2_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +static asn_dec_rval_t +errorReason_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + errorReason_2_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +static asn_enc_rval_t +errorReason_2_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + errorReason_2_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +static asn_dec_rval_t +errorReason_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + errorReason_2_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +static asn_enc_rval_t +errorReason_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + errorReason_2_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_errorReason_value2enum_2[] = { + { 0, 13, "errorReserved" }, + { 1, 28, "errorInitVersionNotSupported" }, + { 2, 19, "errorInitServerFull" }, + { 3, 20, "errorInitAuthFailure" }, + { 4, 24, "errorInitPlayerNameInUse" }, + { 5, 26, "errorInitInvalidPlayerName" }, + { 6, 26, "errorInitServerMaintenance" }, + { 7, 19, "errorAvatarTooLarge" }, + { 8, 24, "errorAvatarUploadBlocked" }, + { 256, 18, "errorInvalidPacket" }, + { 257, 17, "errorInvalidState" }, + { 258, 21, "errorKickedFromServer" }, + { 259, 21, "errorBannedFromServer" }, + { 260, 19, "errorSessionTimeout" } +}; +static unsigned int asn_MAP_errorReason_enum2value_2[] = { + 7, /* errorAvatarTooLarge(7) */ + 8, /* errorAvatarUploadBlocked(8) */ + 12, /* errorBannedFromServer(259) */ + 3, /* errorInitAuthFailure(3) */ + 5, /* errorInitInvalidPlayerName(5) */ + 4, /* errorInitPlayerNameInUse(4) */ + 2, /* errorInitServerFull(2) */ + 6, /* errorInitServerMaintenance(6) */ + 1, /* errorInitVersionNotSupported(1) */ + 9, /* errorInvalidPacket(256) */ + 10, /* errorInvalidState(257) */ + 11, /* errorKickedFromServer(258) */ + 0, /* errorReserved(0) */ + 13 /* errorSessionTimeout(260) */ +}; +static asn_INTEGER_specifics_t asn_SPC_errorReason_specs_2 = { + asn_MAP_errorReason_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_errorReason_enum2value_2, /* N => "tag"; sorted by N */ + 14, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_errorReason_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_errorReason_2 = { + "errorReason", + "errorReason", + errorReason_2_free, + errorReason_2_print, + errorReason_2_constraint, + errorReason_2_decode_ber, + errorReason_2_encode_der, + errorReason_2_decode_xer, + errorReason_2_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_errorReason_tags_2, + sizeof(asn_DEF_errorReason_tags_2) + /sizeof(asn_DEF_errorReason_tags_2[0]), /* 1 */ + asn_DEF_errorReason_tags_2, /* Same as above */ + sizeof(asn_DEF_errorReason_tags_2) + /sizeof(asn_DEF_errorReason_tags_2[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_errorReason_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ErrorMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ErrorMessage, errorReason), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_errorReason_2, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "errorReason" + }, +}; +static ber_tlv_tag_t asn_DEF_ErrorMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (255 << 2)), + (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 450 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ErrorMessage_specs_1 = { + sizeof(struct ErrorMessage), + offsetof(struct ErrorMessage, _asn_ctx), + asn_MAP_ErrorMessage_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_ErrorMessage = { + "ErrorMessage", + "ErrorMessage", + 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_ErrorMessage_tags_1, + sizeof(asn_DEF_ErrorMessage_tags_1) + /sizeof(asn_DEF_ErrorMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_ErrorMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_ErrorMessage_tags_1) + /sizeof(asn_DEF_ErrorMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_ErrorMessage_1, + 1, /* Elements count */ + &asn_SPC_ErrorMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/ErrorMessage.h b/src/third_party/asn1/ErrorMessage.h new file mode 100644 index 00000000..1d5d2d10 --- /dev/null +++ b/src/third_party/asn1/ErrorMessage.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _ErrorMessage_H_ +#define _ErrorMessage_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum errorReason { + errorReason_errorReserved = 0, + errorReason_errorInitVersionNotSupported = 1, + errorReason_errorInitServerFull = 2, + errorReason_errorInitAuthFailure = 3, + errorReason_errorInitPlayerNameInUse = 4, + errorReason_errorInitInvalidPlayerName = 5, + errorReason_errorInitServerMaintenance = 6, + errorReason_errorAvatarTooLarge = 7, + errorReason_errorAvatarUploadBlocked = 8, + errorReason_errorInvalidPacket = 256, + errorReason_errorInvalidState = 257, + errorReason_errorKickedFromServer = 258, + errorReason_errorBannedFromServer = 259, + errorReason_errorSessionTimeout = 260 +} e_errorReason; + +/* ErrorMessage */ +typedef struct ErrorMessage { + long errorReason; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ErrorMessage_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_errorReason_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_ErrorMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _ErrorMessage_H_ */ diff --git a/src/third_party/asn1/GameAdminChanged.c b/src/third_party/asn1/GameAdminChanged.c new file mode 100644 index 00000000..e15b07b3 --- /dev/null +++ b/src/third_party/asn1/GameAdminChanged.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameAdminChanged.h" + +static asn_TYPE_member_t asn_MBR_GameAdminChanged_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameAdminChanged, newAdminPlayerId), + (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, + "newAdminPlayerId" + }, +}; +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 287 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GameAdminChanged_specs_1 = { + sizeof(struct GameAdminChanged), + offsetof(struct GameAdminChanged, _asn_ctx), + asn_MAP_GameAdminChanged_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_GameAdminChanged = { + "GameAdminChanged", + "GameAdminChanged", + 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_GameAdminChanged_tags_1, + sizeof(asn_DEF_GameAdminChanged_tags_1) + /sizeof(asn_DEF_GameAdminChanged_tags_1[0]), /* 1 */ + asn_DEF_GameAdminChanged_tags_1, /* Same as above */ + sizeof(asn_DEF_GameAdminChanged_tags_1) + /sizeof(asn_DEF_GameAdminChanged_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GameAdminChanged_1, + 1, /* Elements count */ + &asn_SPC_GameAdminChanged_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameAdminChanged.h b/src/third_party/asn1/GameAdminChanged.h new file mode 100644 index 00000000..e0bbc874 --- /dev/null +++ b/src/third_party/asn1/GameAdminChanged.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameAdminChanged_H_ +#define _GameAdminChanged_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GameAdminChanged */ +typedef struct GameAdminChanged { + NonZeroId_t newAdminPlayerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GameAdminChanged_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameAdminChanged; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameAdminChanged_H_ */ diff --git a/src/third_party/asn1/GameInfo.c b/src/third_party/asn1/GameInfo.c new file mode 100644 index 00000000..2214f7b3 --- /dev/null +++ b/src/third_party/asn1/GameInfo.c @@ -0,0 +1,622 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameInfo.h" + +static int +memb_raiseEveryHands_constraint_4(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_raiseEveryMinutes_constraint_4(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +endRaiseMode_8_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +endRaiseMode_8_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +static void +endRaiseMode_8_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + endRaiseMode_8_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +static int +endRaiseMode_8_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + endRaiseMode_8_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +static asn_dec_rval_t +endRaiseMode_8_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + endRaiseMode_8_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +static asn_enc_rval_t +endRaiseMode_8_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + endRaiseMode_8_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +static asn_dec_rval_t +endRaiseMode_8_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + endRaiseMode_8_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +static asn_enc_rval_t +endRaiseMode_8_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + endRaiseMode_8_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static int +memb_NativeInteger_constraint_17(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 20001)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_maxNumPlayers_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 2 && value <= 10)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_proposedGuiSpeed_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 11)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_playerActionTimeout_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 5 && value <= 60)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_firstSmallBlind_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 20000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_endRaiseSmallBlindValue_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 20000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_startMoney_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1000000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_manualBlinds_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 <= 30)) { + /* 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_raiseIntervalMode_4[] = { + { ATF_NOFLAGS, 0, offsetof(struct raiseIntervalMode, choice.raiseEveryHands), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + memb_raiseEveryHands_constraint_4, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "raiseEveryHands" + }, + { ATF_NOFLAGS, 0, offsetof(struct raiseIntervalMode, choice.raiseEveryMinutes), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + memb_raiseEveryMinutes_constraint_4, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "raiseEveryMinutes" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_raiseIntervalMode_tag2el_4[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* raiseEveryHands at 251 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* raiseEveryMinutes at 252 */ +}; +static asn_CHOICE_specifics_t asn_SPC_raiseIntervalMode_specs_4 = { + sizeof(struct raiseIntervalMode), + offsetof(struct raiseIntervalMode, _asn_ctx), + offsetof(struct raiseIntervalMode, present), + sizeof(((struct raiseIntervalMode *)0)->present), + asn_MAP_raiseIntervalMode_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_raiseIntervalMode_4 = { + "raiseIntervalMode", + "raiseIntervalMode", + 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 */ + 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_raiseIntervalMode_4, + 2, /* Elements count */ + &asn_SPC_raiseIntervalMode_specs_4 /* Additional specs */ +}; + +static asn_INTEGER_enum_map_t asn_MAP_endRaiseMode_value2enum_8[] = { + { 1, 12, "doubleBlinds" }, + { 2, 15, "raiseByEndValue" }, + { 3, 13, "keepLastBlind" } +}; +static unsigned int asn_MAP_endRaiseMode_enum2value_8[] = { + 0, /* doubleBlinds(1) */ + 2, /* keepLastBlind(3) */ + 1 /* raiseByEndValue(2) */ +}; +static asn_INTEGER_specifics_t asn_SPC_endRaiseMode_specs_8 = { + asn_MAP_endRaiseMode_value2enum_8, /* "tag" => N; sorted by tag */ + asn_MAP_endRaiseMode_enum2value_8, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_endRaiseMode_tags_8[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_endRaiseMode_8 = { + "endRaiseMode", + "endRaiseMode", + endRaiseMode_8_free, + endRaiseMode_8_print, + endRaiseMode_8_constraint, + endRaiseMode_8_decode_ber, + endRaiseMode_8_encode_der, + endRaiseMode_8_decode_xer, + endRaiseMode_8_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_endRaiseMode_tags_8, + sizeof(asn_DEF_endRaiseMode_tags_8) + /sizeof(asn_DEF_endRaiseMode_tags_8[0]), /* 1 */ + asn_DEF_endRaiseMode_tags_8, /* Same as above */ + sizeof(asn_DEF_endRaiseMode_tags_8) + /sizeof(asn_DEF_endRaiseMode_tags_8[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_endRaiseMode_specs_8 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_manualBlinds_17[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_NativeInteger_constraint_17, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_manualBlinds_tags_17[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_manualBlinds_specs_17 = { + sizeof(struct manualBlinds), + offsetof(struct manualBlinds, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_manualBlinds_17 = { + "manualBlinds", + "manualBlinds", + 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_manualBlinds_tags_17, + sizeof(asn_DEF_manualBlinds_tags_17) + /sizeof(asn_DEF_manualBlinds_tags_17[0]), /* 1 */ + asn_DEF_manualBlinds_tags_17, /* Same as above */ + sizeof(asn_DEF_manualBlinds_tags_17) + /sizeof(asn_DEF_manualBlinds_tags_17[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_manualBlinds_17, + 1, /* Single element */ + &asn_SPC_manualBlinds_specs_17 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, gameName), + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), + 0, + &asn_DEF_UTF8String, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameName" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, maxNumPlayers), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_maxNumPlayers_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "maxNumPlayers" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, raiseIntervalMode), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_raiseIntervalMode_4, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "raiseIntervalMode" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, endRaiseMode), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_endRaiseMode_8, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "endRaiseMode" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, proposedGuiSpeed), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_proposedGuiSpeed_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "proposedGuiSpeed" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, playerActionTimeout), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_playerActionTimeout_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerActionTimeout" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, firstSmallBlind), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_firstSmallBlind_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "firstSmallBlind" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, endRaiseSmallBlindValue), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_endRaiseSmallBlindValue_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "endRaiseSmallBlindValue" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, startMoney), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_startMoney_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "startMoney" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameInfo, manualBlinds), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_manualBlinds_17, + memb_manualBlinds_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "manualBlinds" + }, +}; +static ber_tlv_tag_t asn_DEF_GameInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_GameInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 5 }, /* maxNumPlayers at 249 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -1, 4 }, /* proposedGuiSpeed at 259 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 5, -2, 3 }, /* playerActionTimeout at 260 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -3, 2 }, /* firstSmallBlind at 261 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 7, -4, 1 }, /* endRaiseSmallBlindValue at 262 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 8, -5, 0 }, /* startMoney at 263 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* endRaiseMode at 255 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* gameName at 248 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, 0, 0 }, /* manualBlinds at 264 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* raiseEveryHands at 251 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* raiseEveryMinutes at 252 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GameInfo_specs_1 = { + sizeof(struct GameInfo), + offsetof(struct GameInfo, _asn_ctx), + asn_MAP_GameInfo_tag2el_1, + 11, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 9, /* Start extensions */ + 11 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_GameInfo = { + "GameInfo", + "GameInfo", + 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_GameInfo_tags_1, + sizeof(asn_DEF_GameInfo_tags_1) + /sizeof(asn_DEF_GameInfo_tags_1[0]), /* 1 */ + asn_DEF_GameInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_GameInfo_tags_1) + /sizeof(asn_DEF_GameInfo_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GameInfo_1, + 10, /* Elements count */ + &asn_SPC_GameInfo_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameInfo.h b/src/third_party/asn1/GameInfo.h new file mode 100644 index 00000000..4546a9dd --- /dev/null +++ b/src/third_party/asn1/GameInfo.h @@ -0,0 +1,87 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameInfo_H_ +#define _GameInfo_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum raiseIntervalMode_PR { + raiseIntervalMode_PR_NOTHING, /* No components present */ + raiseIntervalMode_PR_raiseEveryHands, + raiseIntervalMode_PR_raiseEveryMinutes, + /* Extensions may appear below */ + +} raiseIntervalMode_PR; +typedef enum endRaiseMode { + endRaiseMode_doubleBlinds = 1, + endRaiseMode_raiseByEndValue = 2, + endRaiseMode_keepLastBlind = 3 +} e_endRaiseMode; + +/* GameInfo */ +typedef struct GameInfo { + UTF8String_t gameName; + long maxNumPlayers; + struct raiseIntervalMode { + raiseIntervalMode_PR present; + union GameInfo__raiseIntervalMode_u { + long raiseEveryHands; + long raiseEveryMinutes; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } raiseIntervalMode; + long endRaiseMode; + long proposedGuiSpeed; + long playerActionTimeout; + long firstSmallBlind; + long endRaiseSmallBlindValue; + long startMoney; + struct manualBlinds { + A_SEQUENCE_OF(long) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } manualBlinds; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GameInfo_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_endRaiseMode_8; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_GameInfo; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameInfo_H_ */ diff --git a/src/third_party/asn1/GameListAdminChanged.c b/src/third_party/asn1/GameListAdminChanged.c new file mode 100644 index 00000000..7dca8fa3 --- /dev/null +++ b/src/third_party/asn1/GameListAdminChanged.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameListAdminChanged.h" + +static asn_TYPE_member_t asn_MBR_GameListAdminChanged_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameListAdminChanged, newAdminPlayerId), + (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, + "newAdminPlayerId" + }, +}; +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 167 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GameListAdminChanged_specs_1 = { + sizeof(struct GameListAdminChanged), + offsetof(struct GameListAdminChanged, _asn_ctx), + asn_MAP_GameListAdminChanged_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_GameListAdminChanged = { + "GameListAdminChanged", + "GameListAdminChanged", + 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_GameListAdminChanged_tags_1, + sizeof(asn_DEF_GameListAdminChanged_tags_1) + /sizeof(asn_DEF_GameListAdminChanged_tags_1[0]), /* 1 */ + asn_DEF_GameListAdminChanged_tags_1, /* Same as above */ + sizeof(asn_DEF_GameListAdminChanged_tags_1) + /sizeof(asn_DEF_GameListAdminChanged_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GameListAdminChanged_1, + 1, /* Elements count */ + &asn_SPC_GameListAdminChanged_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameListAdminChanged.h b/src/third_party/asn1/GameListAdminChanged.h new file mode 100644 index 00000000..701bcecb --- /dev/null +++ b/src/third_party/asn1/GameListAdminChanged.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameListAdminChanged_H_ +#define _GameListAdminChanged_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GameListAdminChanged */ +typedef struct GameListAdminChanged { + NonZeroId_t newAdminPlayerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GameListAdminChanged_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameListAdminChanged; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameListAdminChanged_H_ */ diff --git a/src/third_party/asn1/GameListMessage.c b/src/third_party/asn1/GameListMessage.c new file mode 100644 index 00000000..87634b8a --- /dev/null +++ b/src/third_party/asn1/GameListMessage.c @@ -0,0 +1,162 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameListMessage.h" + +static asn_TYPE_member_t asn_MBR_gameListNotification_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListNew), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GameListNew, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameListNew" + }, + { ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListUpdate), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GameListUpdate, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameListUpdate" + }, + { ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListPlayerJoined), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GameListPlayerJoined, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameListPlayerJoined" + }, + { ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListPlayerLeft), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GameListPlayerLeft, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameListPlayerLeft" + }, + { ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListAdminChanged), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GameListAdminChanged, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameListAdminChanged" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_gameListNotification_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gameListNew at 137 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gameListUpdate at 138 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gameListPlayerJoined at 139 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gameListPlayerLeft at 140 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* gameListAdminChanged at 142 */ +}; +static asn_CHOICE_specifics_t asn_SPC_gameListNotification_specs_3 = { + sizeof(struct gameListNotification), + offsetof(struct gameListNotification, _asn_ctx), + offsetof(struct gameListNotification, present), + sizeof(((struct gameListNotification *)0)->present), + asn_MAP_gameListNotification_tag2el_3, + 5, /* Count of tags in the map */ + 0, + 5 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_gameListNotification_3 = { + "gameListNotification", + "gameListNotification", + 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 */ + 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_gameListNotification_3, + 5, /* Elements count */ + &asn_SPC_gameListNotification_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_GameListMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameListMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameListMessage, gameListNotification), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_gameListNotification_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameListNotification" + }, +}; +static ber_tlv_tag_t asn_DEF_GameListMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (4 << 2)), + (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 135 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gameListNew at 137 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gameListUpdate at 138 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* gameListPlayerJoined at 139 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* gameListPlayerLeft at 140 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 } /* gameListAdminChanged at 142 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GameListMessage_specs_1 = { + sizeof(struct GameListMessage), + offsetof(struct GameListMessage, _asn_ctx), + asn_MAP_GameListMessage_tag2el_1, + 6, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_GameListMessage = { + "GameListMessage", + "GameListMessage", + 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_GameListMessage_tags_1, + sizeof(asn_DEF_GameListMessage_tags_1) + /sizeof(asn_DEF_GameListMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_GameListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_GameListMessage_tags_1) + /sizeof(asn_DEF_GameListMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_GameListMessage_1, + 2, /* Elements count */ + &asn_SPC_GameListMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameListMessage.h b/src/third_party/asn1/GameListMessage.h new file mode 100644 index 00000000..94fa7dbd --- /dev/null +++ b/src/third_party/asn1/GameListMessage.h @@ -0,0 +1,75 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameListMessage_H_ +#define _GameListMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "GameListNew.h" +#include "GameListUpdate.h" +#include "GameListPlayerJoined.h" +#include "GameListPlayerLeft.h" +#include "GameListAdminChanged.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum gameListNotification_PR { + gameListNotification_PR_NOTHING, /* No components present */ + gameListNotification_PR_gameListNew, + gameListNotification_PR_gameListUpdate, + gameListNotification_PR_gameListPlayerJoined, + gameListNotification_PR_gameListPlayerLeft, + gameListNotification_PR_gameListAdminChanged, + /* Extensions may appear below */ + +} gameListNotification_PR; + +/* GameListMessage */ +typedef struct GameListMessage { + NonZeroId_t gameId; + struct gameListNotification { + gameListNotification_PR present; + union GameListMessage__gameListNotification_u { + GameListNew_t gameListNew; + GameListUpdate_t gameListUpdate; + GameListPlayerJoined_t gameListPlayerJoined; + GameListPlayerLeft_t gameListPlayerLeft; + GameListAdminChanged_t gameListAdminChanged; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } gameListNotification; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GameListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameListMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameListMessage_H_ */ diff --git a/src/third_party/asn1/GameListNew.c b/src/third_party/asn1/GameListNew.c new file mode 100644 index 00000000..b1dd0af8 --- /dev/null +++ b/src/third_party/asn1/GameListNew.c @@ -0,0 +1,170 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameListNew.h" + +static int +memb_playerIds_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 >= 1 && 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_playerIds_4[] = { + { 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_playerIds_tags_4[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_playerIds_specs_4 = { + sizeof(struct playerIds), + offsetof(struct playerIds, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_playerIds_4 = { + "playerIds", + "playerIds", + 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_playerIds_tags_4, + sizeof(asn_DEF_playerIds_tags_4) + /sizeof(asn_DEF_playerIds_tags_4[0]), /* 1 */ + asn_DEF_playerIds_tags_4, /* Same as above */ + sizeof(asn_DEF_playerIds_tags_4) + /sizeof(asn_DEF_playerIds_tags_4[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_playerIds_4, + 1, /* Single element */ + &asn_SPC_playerIds_specs_4 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_GameListNew_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameMode), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_GameMode, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameMode" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameListNew, isPrivate), + (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), + 0, + &asn_DEF_BOOLEAN, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "isPrivate" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameListNew, playerIds), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_playerIds_4, + memb_playerIds_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerIds" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameListNew, adminPlayerId), + (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, + "adminPlayerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameInfo), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_GameInfo, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameInfo" + }, +}; +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 147 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* adminPlayerId at 149 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* gameMode at 146 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* playerIds at 148 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 0 } /* gameInfo at 151 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GameListNew_specs_1 = { + sizeof(struct GameListNew), + offsetof(struct GameListNew, _asn_ctx), + asn_MAP_GameListNew_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* Start extensions */ + 6 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_GameListNew = { + "GameListNew", + "GameListNew", + 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_GameListNew_tags_1, + sizeof(asn_DEF_GameListNew_tags_1) + /sizeof(asn_DEF_GameListNew_tags_1[0]), /* 1 */ + asn_DEF_GameListNew_tags_1, /* Same as above */ + sizeof(asn_DEF_GameListNew_tags_1) + /sizeof(asn_DEF_GameListNew_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GameListNew_1, + 5, /* Elements count */ + &asn_SPC_GameListNew_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameListNew.h b/src/third_party/asn1/GameListNew.h new file mode 100644 index 00000000..ce3aae48 --- /dev/null +++ b/src/third_party/asn1/GameListNew.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameListNew_H_ +#define _GameListNew_H_ + + +#include + +/* Including external dependencies */ +#include "GameMode.h" +#include +#include "NonZeroId.h" +#include "GameInfo.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GameListNew */ +typedef struct GameListNew { + GameMode_t gameMode; + BOOLEAN_t isPrivate; + struct playerIds { + A_SEQUENCE_OF(NonZeroId_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } playerIds; + NonZeroId_t adminPlayerId; + GameInfo_t gameInfo; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GameListNew_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameListNew; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameListNew_H_ */ diff --git a/src/third_party/asn1/GameListPlayerJoined.c b/src/third_party/asn1/GameListPlayerJoined.c new file mode 100644 index 00000000..7d5f57a2 --- /dev/null +++ b/src/third_party/asn1/GameListPlayerJoined.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameListPlayerJoined.h" + +static asn_TYPE_member_t asn_MBR_GameListPlayerJoined_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameListPlayerJoined, playerId), + (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, + "playerId" + }, +}; +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 159 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GameListPlayerJoined_specs_1 = { + sizeof(struct GameListPlayerJoined), + offsetof(struct GameListPlayerJoined, _asn_ctx), + asn_MAP_GameListPlayerJoined_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_GameListPlayerJoined = { + "GameListPlayerJoined", + "GameListPlayerJoined", + 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_GameListPlayerJoined_tags_1, + sizeof(asn_DEF_GameListPlayerJoined_tags_1) + /sizeof(asn_DEF_GameListPlayerJoined_tags_1[0]), /* 1 */ + asn_DEF_GameListPlayerJoined_tags_1, /* Same as above */ + sizeof(asn_DEF_GameListPlayerJoined_tags_1) + /sizeof(asn_DEF_GameListPlayerJoined_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GameListPlayerJoined_1, + 1, /* Elements count */ + &asn_SPC_GameListPlayerJoined_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameListPlayerJoined.h b/src/third_party/asn1/GameListPlayerJoined.h new file mode 100644 index 00000000..9cbd33cc --- /dev/null +++ b/src/third_party/asn1/GameListPlayerJoined.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameListPlayerJoined_H_ +#define _GameListPlayerJoined_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GameListPlayerJoined */ +typedef struct GameListPlayerJoined { + NonZeroId_t playerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GameListPlayerJoined_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameListPlayerJoined; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameListPlayerJoined_H_ */ diff --git a/src/third_party/asn1/GameListPlayerLeft.c b/src/third_party/asn1/GameListPlayerLeft.c new file mode 100644 index 00000000..e8a3be77 --- /dev/null +++ b/src/third_party/asn1/GameListPlayerLeft.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameListPlayerLeft.h" + +static asn_TYPE_member_t asn_MBR_GameListPlayerLeft_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameListPlayerLeft, playerId), + (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, + "playerId" + }, +}; +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 163 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GameListPlayerLeft_specs_1 = { + sizeof(struct GameListPlayerLeft), + offsetof(struct GameListPlayerLeft, _asn_ctx), + asn_MAP_GameListPlayerLeft_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_GameListPlayerLeft = { + "GameListPlayerLeft", + "GameListPlayerLeft", + 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_GameListPlayerLeft_tags_1, + sizeof(asn_DEF_GameListPlayerLeft_tags_1) + /sizeof(asn_DEF_GameListPlayerLeft_tags_1[0]), /* 1 */ + asn_DEF_GameListPlayerLeft_tags_1, /* Same as above */ + sizeof(asn_DEF_GameListPlayerLeft_tags_1) + /sizeof(asn_DEF_GameListPlayerLeft_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GameListPlayerLeft_1, + 1, /* Elements count */ + &asn_SPC_GameListPlayerLeft_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameListPlayerLeft.h b/src/third_party/asn1/GameListPlayerLeft.h new file mode 100644 index 00000000..e712e674 --- /dev/null +++ b/src/third_party/asn1/GameListPlayerLeft.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameListPlayerLeft_H_ +#define _GameListPlayerLeft_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GameListPlayerLeft */ +typedef struct GameListPlayerLeft { + NonZeroId_t playerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GameListPlayerLeft_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameListPlayerLeft; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameListPlayerLeft_H_ */ diff --git a/src/third_party/asn1/GameListUpdate.c b/src/third_party/asn1/GameListUpdate.c new file mode 100644 index 00000000..35f59958 --- /dev/null +++ b/src/third_party/asn1/GameListUpdate.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameListUpdate.h" + +static asn_TYPE_member_t asn_MBR_GameListUpdate_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameListUpdate, gameMode), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_GameMode, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameMode" + }, +}; +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 155 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GameListUpdate_specs_1 = { + sizeof(struct GameListUpdate), + offsetof(struct GameListUpdate, _asn_ctx), + asn_MAP_GameListUpdate_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_GameListUpdate = { + "GameListUpdate", + "GameListUpdate", + 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_GameListUpdate_tags_1, + sizeof(asn_DEF_GameListUpdate_tags_1) + /sizeof(asn_DEF_GameListUpdate_tags_1[0]), /* 1 */ + asn_DEF_GameListUpdate_tags_1, /* Same as above */ + sizeof(asn_DEF_GameListUpdate_tags_1) + /sizeof(asn_DEF_GameListUpdate_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GameListUpdate_1, + 1, /* Elements count */ + &asn_SPC_GameListUpdate_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameListUpdate.h b/src/third_party/asn1/GameListUpdate.h new file mode 100644 index 00000000..9dccdd4c --- /dev/null +++ b/src/third_party/asn1/GameListUpdate.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameListUpdate_H_ +#define _GameListUpdate_H_ + + +#include + +/* Including external dependencies */ +#include "GameMode.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GameListUpdate */ +typedef struct GameListUpdate { + GameMode_t gameMode; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GameListUpdate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameListUpdate; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameListUpdate_H_ */ diff --git a/src/third_party/asn1/GameMode.c b/src/third_party/asn1/GameMode.c new file mode 100644 index 00000000..020fea28 --- /dev/null +++ b/src/third_party/asn1/GameMode.c @@ -0,0 +1,128 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameMode.h" + +int +GameMode_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +GameMode_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +void +GameMode_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + GameMode_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +GameMode_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + GameMode_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +GameMode_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + GameMode_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +GameMode_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + GameMode_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +GameMode_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + GameMode_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +GameMode_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + GameMode_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_GameMode_value2enum_1[] = { + { 1, 11, "gameCreated" }, + { 2, 11, "gameStarted" }, + { 3, 10, "gameClosed" } +}; +static unsigned int asn_MAP_GameMode_enum2value_1[] = { + 2, /* gameClosed(3) */ + 0, /* gameCreated(1) */ + 1 /* gameStarted(2) */ +}; +static asn_INTEGER_specifics_t asn_SPC_GameMode_specs_1 = { + asn_MAP_GameMode_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_GameMode_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_GameMode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GameMode = { + "GameMode", + "GameMode", + GameMode_free, + GameMode_print, + GameMode_constraint, + GameMode_decode_ber, + GameMode_encode_der, + GameMode_decode_xer, + GameMode_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_GameMode_tags_1, + sizeof(asn_DEF_GameMode_tags_1) + /sizeof(asn_DEF_GameMode_tags_1[0]), /* 1 */ + asn_DEF_GameMode_tags_1, /* Same as above */ + sizeof(asn_DEF_GameMode_tags_1) + /sizeof(asn_DEF_GameMode_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_GameMode_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameMode.h b/src/third_party/asn1/GameMode.h new file mode 100644 index 00000000..cf083900 --- /dev/null +++ b/src/third_party/asn1/GameMode.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameMode_H_ +#define _GameMode_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GameMode { + GameMode_gameCreated = 1, + GameMode_gameStarted = 2, + GameMode_gameClosed = 3 +} e_GameMode; + +/* GameMode */ +typedef long GameMode_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameMode; +asn_struct_free_f GameMode_free; +asn_struct_print_f GameMode_print; +asn_constr_check_f GameMode_constraint; +ber_type_decoder_f GameMode_decode_ber; +der_type_encoder_f GameMode_encode_der; +xer_type_decoder_f GameMode_decode_xer; +xer_type_encoder_f GameMode_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameMode_H_ */ diff --git a/src/third_party/asn1/GamePlayerJoined.c b/src/third_party/asn1/GamePlayerJoined.c new file mode 100644 index 00000000..b388fd78 --- /dev/null +++ b/src/third_party/asn1/GamePlayerJoined.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GamePlayerJoined.h" + +static asn_TYPE_member_t asn_MBR_GamePlayerJoined_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GamePlayerJoined, playerId), + (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, + "playerId" + }, +}; +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 | (2 << 2)), 0, 0, 0 } /* playerId at 279 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerJoined_specs_1 = { + sizeof(struct GamePlayerJoined), + offsetof(struct GamePlayerJoined, _asn_ctx), + asn_MAP_GamePlayerJoined_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_GamePlayerJoined = { + "GamePlayerJoined", + "GamePlayerJoined", + 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_GamePlayerJoined_tags_1, + sizeof(asn_DEF_GamePlayerJoined_tags_1) + /sizeof(asn_DEF_GamePlayerJoined_tags_1[0]), /* 1 */ + asn_DEF_GamePlayerJoined_tags_1, /* Same as above */ + sizeof(asn_DEF_GamePlayerJoined_tags_1) + /sizeof(asn_DEF_GamePlayerJoined_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GamePlayerJoined_1, + 1, /* Elements count */ + &asn_SPC_GamePlayerJoined_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GamePlayerJoined.h b/src/third_party/asn1/GamePlayerJoined.h new file mode 100644 index 00000000..6a707494 --- /dev/null +++ b/src/third_party/asn1/GamePlayerJoined.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GamePlayerJoined_H_ +#define _GamePlayerJoined_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GamePlayerJoined */ +typedef struct GamePlayerJoined { + NonZeroId_t playerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GamePlayerJoined_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GamePlayerJoined; + +#ifdef __cplusplus +} +#endif + +#endif /* _GamePlayerJoined_H_ */ diff --git a/src/third_party/asn1/GamePlayerLeft.c b/src/third_party/asn1/GamePlayerLeft.c new file mode 100644 index 00000000..9b33f388 --- /dev/null +++ b/src/third_party/asn1/GamePlayerLeft.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GamePlayerLeft.h" + +static asn_TYPE_member_t asn_MBR_GamePlayerLeft_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GamePlayerLeft, playerId), + (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, + "playerId" + }, +}; +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 283 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerLeft_specs_1 = { + sizeof(struct GamePlayerLeft), + offsetof(struct GamePlayerLeft, _asn_ctx), + asn_MAP_GamePlayerLeft_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_GamePlayerLeft = { + "GamePlayerLeft", + "GamePlayerLeft", + 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_GamePlayerLeft_tags_1, + sizeof(asn_DEF_GamePlayerLeft_tags_1) + /sizeof(asn_DEF_GamePlayerLeft_tags_1[0]), /* 1 */ + asn_DEF_GamePlayerLeft_tags_1, /* Same as above */ + sizeof(asn_DEF_GamePlayerLeft_tags_1) + /sizeof(asn_DEF_GamePlayerLeft_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_GamePlayerLeft_1, + 1, /* Elements count */ + &asn_SPC_GamePlayerLeft_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GamePlayerLeft.h b/src/third_party/asn1/GamePlayerLeft.h new file mode 100644 index 00000000..14848601 --- /dev/null +++ b/src/third_party/asn1/GamePlayerLeft.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GamePlayerLeft_H_ +#define _GamePlayerLeft_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GamePlayerLeft */ +typedef struct GamePlayerLeft { + NonZeroId_t playerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GamePlayerLeft_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GamePlayerLeft; + +#ifdef __cplusplus +} +#endif + +#endif /* _GamePlayerLeft_H_ */ diff --git a/src/third_party/asn1/GamePlayerMessage.c b/src/third_party/asn1/GamePlayerMessage.c new file mode 100644 index 00000000..b53219f6 --- /dev/null +++ b/src/third_party/asn1/GamePlayerMessage.c @@ -0,0 +1,151 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GamePlayerMessage.h" + +static asn_TYPE_member_t asn_MBR_gamePlayerNotification_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct gamePlayerNotification, choice.gamePlayerJoined), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GamePlayerJoined, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gamePlayerJoined" + }, + { ATF_NOFLAGS, 0, offsetof(struct gamePlayerNotification, choice.gamePlayerLeft), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GamePlayerLeft, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gamePlayerLeft" + }, + { ATF_NOFLAGS, 0, offsetof(struct gamePlayerNotification, choice.gameAdminChanged), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GameAdminChanged, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameAdminChanged" + }, + { ATF_NOFLAGS, 0, offsetof(struct gamePlayerNotification, choice.removedFromGame), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RemovedFromGame, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "removedFromGame" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_gamePlayerNotification_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gamePlayerJoined at 270 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gamePlayerLeft at 271 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gameAdminChanged at 272 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* removedFromGame at 274 */ +}; +static asn_CHOICE_specifics_t asn_SPC_gamePlayerNotification_specs_3 = { + sizeof(struct gamePlayerNotification), + offsetof(struct gamePlayerNotification, _asn_ctx), + offsetof(struct gamePlayerNotification, present), + sizeof(((struct gamePlayerNotification *)0)->present), + asn_MAP_gamePlayerNotification_tag2el_3, + 4, /* Count of tags in the map */ + 0, + 4 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_gamePlayerNotification_3 = { + "gamePlayerNotification", + "gamePlayerNotification", + 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 */ + 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_gamePlayerNotification_3, + 4, /* Elements count */ + &asn_SPC_gamePlayerNotification_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_GamePlayerMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GamePlayerMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct GamePlayerMessage, gamePlayerNotification), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_gamePlayerNotification_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gamePlayerNotification" + }, +}; +static ber_tlv_tag_t asn_DEF_GamePlayerMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (10 << 2)), + (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 268 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gamePlayerJoined at 270 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gamePlayerLeft at 271 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* gameAdminChanged at 272 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* removedFromGame at 274 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerMessage_specs_1 = { + sizeof(struct GamePlayerMessage), + offsetof(struct GamePlayerMessage, _asn_ctx), + asn_MAP_GamePlayerMessage_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_GamePlayerMessage = { + "GamePlayerMessage", + "GamePlayerMessage", + 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_GamePlayerMessage_tags_1, + sizeof(asn_DEF_GamePlayerMessage_tags_1) + /sizeof(asn_DEF_GamePlayerMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_GamePlayerMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_GamePlayerMessage_tags_1) + /sizeof(asn_DEF_GamePlayerMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_GamePlayerMessage_1, + 2, /* Elements count */ + &asn_SPC_GamePlayerMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GamePlayerMessage.h b/src/third_party/asn1/GamePlayerMessage.h new file mode 100644 index 00000000..6ad10f5c --- /dev/null +++ b/src/third_party/asn1/GamePlayerMessage.h @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GamePlayerMessage_H_ +#define _GamePlayerMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "GamePlayerJoined.h" +#include "GamePlayerLeft.h" +#include "GameAdminChanged.h" +#include "RemovedFromGame.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum gamePlayerNotification_PR { + gamePlayerNotification_PR_NOTHING, /* No components present */ + gamePlayerNotification_PR_gamePlayerJoined, + gamePlayerNotification_PR_gamePlayerLeft, + gamePlayerNotification_PR_gameAdminChanged, + gamePlayerNotification_PR_removedFromGame, + /* Extensions may appear below */ + +} gamePlayerNotification_PR; + +/* GamePlayerMessage */ +typedef struct GamePlayerMessage { + NonZeroId_t gameId; + struct gamePlayerNotification { + gamePlayerNotification_PR present; + union GamePlayerMessage__gamePlayerNotification_u { + GamePlayerJoined_t gamePlayerJoined; + GamePlayerLeft_t gamePlayerLeft; + GameAdminChanged_t gameAdminChanged; + RemovedFromGame_t removedFromGame; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } gamePlayerNotification; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GamePlayerMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GamePlayerMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _GamePlayerMessage_H_ */ diff --git a/src/third_party/asn1/GameStartMessage.c b/src/third_party/asn1/GameStartMessage.c new file mode 100644 index 00000000..23c64ec3 --- /dev/null +++ b/src/third_party/asn1/GameStartMessage.c @@ -0,0 +1,151 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#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, + 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_4[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +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 /* 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, + 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 */ + 0, /* No PER visible constraints */ + asn_MBR_playerSeats_4, + 1, /* Single element */ + &asn_SPC_playerSeats_specs_4 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_GameStartMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GameStartMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameStartMessage, startDealerPlayerId), + (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, + "startDealerPlayerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct GameStartMessage, playerSeats), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_playerSeats_4, + memb_playerSeats_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerSeats" + }, +}; +static ber_tlv_tag_t asn_DEF_GameStartMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (15 << 2)), + (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 318 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* startDealerPlayerId at 319 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* playerSeats at 321 */ +}; +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 */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* Start extensions */ + 4 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_GameStartMessage = { + "GameStartMessage", + "GameStartMessage", + 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_GameStartMessage_tags_1, + sizeof(asn_DEF_GameStartMessage_tags_1) + /sizeof(asn_DEF_GameStartMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_GameStartMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_GameStartMessage_tags_1) + /sizeof(asn_DEF_GameStartMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_GameStartMessage_1, + 3, /* Elements count */ + &asn_SPC_GameStartMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameStartMessage.h b/src/third_party/asn1/GameStartMessage.h new file mode 100644 index 00000000..19ab9cbc --- /dev/null +++ b/src/third_party/asn1/GameStartMessage.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameStartMessage_H_ +#define _GameStartMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GameStartMessage */ +typedef struct GameStartMessage { + NonZeroId_t gameId; + NonZeroId_t startDealerPlayerId; + 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; +} GameStartMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameStartMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameStartMessage_H_ */ diff --git a/src/third_party/asn1/GameState.c b/src/third_party/asn1/GameState.c new file mode 100644 index 00000000..59fc0c09 --- /dev/null +++ b/src/third_party/asn1/GameState.c @@ -0,0 +1,134 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "GameState.h" + +int +GameState_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +GameState_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +void +GameState_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + GameState_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +GameState_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + GameState_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +GameState_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + GameState_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +GameState_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + GameState_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +GameState_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + GameState_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +GameState_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + GameState_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_GameState_value2enum_1[] = { + { 0, 12, "statePreflop" }, + { 1, 9, "stateFlop" }, + { 2, 9, "stateTurn" }, + { 3, 10, "stateRiver" }, + { 4, 22, "statePreflopSmallBlind" }, + { 5, 20, "statePreflopBigBlind" } +}; +static unsigned int asn_MAP_GameState_enum2value_1[] = { + 1, /* stateFlop(1) */ + 0, /* statePreflop(0) */ + 5, /* statePreflopBigBlind(5) */ + 4, /* statePreflopSmallBlind(4) */ + 3, /* stateRiver(3) */ + 2 /* stateTurn(2) */ +}; +static asn_INTEGER_specifics_t asn_SPC_GameState_specs_1 = { + asn_MAP_GameState_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_GameState_enum2value_1, /* N => "tag"; sorted by N */ + 6, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_GameState_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GameState = { + "GameState", + "GameState", + GameState_free, + GameState_print, + GameState_constraint, + GameState_decode_ber, + GameState_encode_der, + GameState_decode_xer, + GameState_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_GameState_tags_1, + sizeof(asn_DEF_GameState_tags_1) + /sizeof(asn_DEF_GameState_tags_1[0]), /* 1 */ + asn_DEF_GameState_tags_1, /* Same as above */ + sizeof(asn_DEF_GameState_tags_1) + /sizeof(asn_DEF_GameState_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_GameState_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/GameState.h b/src/third_party/asn1/GameState.h new file mode 100644 index 00000000..b3b5d361 --- /dev/null +++ b/src/third_party/asn1/GameState.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _GameState_H_ +#define _GameState_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GameState { + GameState_statePreflop = 0, + GameState_stateFlop = 1, + GameState_stateTurn = 2, + GameState_stateRiver = 3, + GameState_statePreflopSmallBlind = 4, + GameState_statePreflopBigBlind = 5 +} e_GameState; + +/* GameState */ +typedef long GameState_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GameState; +asn_struct_free_f GameState_free; +asn_struct_print_f GameState_print; +asn_constr_check_f GameState_constraint; +ber_type_decoder_f GameState_decode_ber; +der_type_encoder_f GameState_encode_der; +xer_type_decoder_f GameState_decode_xer; +xer_type_encoder_f GameState_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _GameState_H_ */ diff --git a/src/third_party/asn1/Guid.c b/src/third_party/asn1/Guid.c new file mode 100644 index 00000000..da24d74d --- /dev/null +++ b/src/third_party/asn1/Guid.c @@ -0,0 +1,131 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "Guid.h" + +int +Guid_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value >= 1 && value <= 4294967295)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static void +Guid_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeInteger.free_struct; + td->print_struct = asn_DEF_NativeInteger.print_struct; + td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; + td->der_encoder = asn_DEF_NativeInteger.der_encoder; + td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; + td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; + td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; + td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeInteger.per_constraints; + td->elements = asn_DEF_NativeInteger.elements; + td->elements_count = asn_DEF_NativeInteger.elements_count; + /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ +} + +void +Guid_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + Guid_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +Guid_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + Guid_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +Guid_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + Guid_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +Guid_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + Guid_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +Guid_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + Guid_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +Guid_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + Guid_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_specifics_t asn_SPC_Guid_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static ber_tlv_tag_t asn_DEF_Guid_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Guid = { + "Guid", + "Guid", + Guid_free, + Guid_print, + Guid_constraint, + Guid_decode_ber, + Guid_encode_der, + Guid_decode_xer, + Guid_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_Guid_tags_1, + sizeof(asn_DEF_Guid_tags_1) + /sizeof(asn_DEF_Guid_tags_1[0]), /* 1 */ + asn_DEF_Guid_tags_1, /* Same as above */ + sizeof(asn_DEF_Guid_tags_1) + /sizeof(asn_DEF_Guid_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + &asn_SPC_Guid_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/Guid.h b/src/third_party/asn1/Guid.h new file mode 100644 index 00000000..ea5c4814 --- /dev/null +++ b/src/third_party/asn1/Guid.h @@ -0,0 +1,37 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _Guid_H_ +#define _Guid_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Guid */ +typedef unsigned long Guid_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Guid; +asn_struct_free_f Guid_free; +asn_struct_print_f Guid_print; +asn_constr_check_f Guid_constraint; +ber_type_decoder_f Guid_decode_ber; +der_type_encoder_f Guid_encode_der; +xer_type_decoder_f Guid_decode_xer; +xer_type_encoder_f Guid_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _Guid_H_ */ diff --git a/src/third_party/asn1/HandStartMessage.c b/src/third_party/asn1/HandStartMessage.c new file mode 100644 index 00000000..de3a9d26 --- /dev/null +++ b/src/third_party/asn1/HandStartMessage.c @@ -0,0 +1,176 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "HandStartMessage.h" + +static int +memb_yourCards_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)) { + /* 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 int +memb_smallBlind_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 20001)) { + /* Constraint check succeeded */ + return 0; + } 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_yourCards_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Card, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_yourCards_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_yourCards_specs_3 = { + sizeof(struct yourCards), + offsetof(struct yourCards, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_yourCards_3 = { + "yourCards", + "yourCards", + 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_yourCards_tags_3, + sizeof(asn_DEF_yourCards_tags_3) + /sizeof(asn_DEF_yourCards_tags_3[0]), /* 1 */ + asn_DEF_yourCards_tags_3, /* Same as above */ + sizeof(asn_DEF_yourCards_tags_3) + /sizeof(asn_DEF_yourCards_tags_3[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_yourCards_3, + 1, /* Single element */ + &asn_SPC_yourCards_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_HandStartMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct HandStartMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct HandStartMessage, yourCards), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_yourCards_3, + memb_yourCards_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "yourCards" + }, + { ATF_NOFLAGS, 0, offsetof(struct HandStartMessage, smallBlind), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_smallBlind_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "smallBlind" + }, +}; +static ber_tlv_tag_t asn_DEF_HandStartMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (16 << 2)), + (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 324 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 0 }, /* smallBlind at 326 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* yourCards at 325 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_HandStartMessage_specs_1 = { + sizeof(struct HandStartMessage), + offsetof(struct HandStartMessage, _asn_ctx), + asn_MAP_HandStartMessage_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* Start extensions */ + 4 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_HandStartMessage = { + "HandStartMessage", + "HandStartMessage", + 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_HandStartMessage_tags_1, + sizeof(asn_DEF_HandStartMessage_tags_1) + /sizeof(asn_DEF_HandStartMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_HandStartMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_HandStartMessage_tags_1) + /sizeof(asn_DEF_HandStartMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_HandStartMessage_1, + 3, /* Elements count */ + &asn_SPC_HandStartMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/HandStartMessage.h b/src/third_party/asn1/HandStartMessage.h new file mode 100644 index 00000000..d8e1d435 --- /dev/null +++ b/src/third_party/asn1/HandStartMessage.h @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _HandStartMessage_H_ +#define _HandStartMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include +#include "Card.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* HandStartMessage */ +typedef struct HandStartMessage { + NonZeroId_t gameId; + struct yourCards { + A_SEQUENCE_OF(Card_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } yourCards; + long smallBlind; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} HandStartMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_HandStartMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _HandStartMessage_H_ */ diff --git a/src/third_party/asn1/INTEGER.c b/src/third_party/asn1/INTEGER.c new file mode 120000 index 00000000..15ffdf8d --- /dev/null +++ b/src/third_party/asn1/INTEGER.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/INTEGER.c \ No newline at end of file diff --git a/src/third_party/asn1/INTEGER.h b/src/third_party/asn1/INTEGER.h new file mode 120000 index 00000000..4b3324d3 --- /dev/null +++ b/src/third_party/asn1/INTEGER.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/INTEGER.h \ No newline at end of file diff --git a/src/third_party/asn1/Id.c b/src/third_party/asn1/Id.c new file mode 100644 index 00000000..74bb9834 --- /dev/null +++ b/src/third_party/asn1/Id.c @@ -0,0 +1,124 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "Id.h" + +int +Id_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static void +Id_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeInteger.free_struct; + td->print_struct = asn_DEF_NativeInteger.print_struct; + td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; + td->der_encoder = asn_DEF_NativeInteger.der_encoder; + td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; + td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; + td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; + td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeInteger.per_constraints; + td->elements = asn_DEF_NativeInteger.elements; + td->elements_count = asn_DEF_NativeInteger.elements_count; + /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ +} + +void +Id_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + Id_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +Id_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + Id_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +Id_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + Id_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +Id_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + Id_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +Id_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + Id_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +Id_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + Id_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_specifics_t asn_SPC_Id_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static ber_tlv_tag_t asn_DEF_Id_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Id = { + "Id", + "Id", + Id_free, + Id_print, + Id_constraint, + Id_decode_ber, + Id_encode_der, + Id_decode_xer, + Id_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_Id_tags_1, + sizeof(asn_DEF_Id_tags_1) + /sizeof(asn_DEF_Id_tags_1[0]), /* 1 */ + asn_DEF_Id_tags_1, /* Same as above */ + sizeof(asn_DEF_Id_tags_1) + /sizeof(asn_DEF_Id_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + &asn_SPC_Id_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/Id.h b/src/third_party/asn1/Id.h new file mode 100644 index 00000000..5c540122 --- /dev/null +++ b/src/third_party/asn1/Id.h @@ -0,0 +1,37 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _Id_H_ +#define _Id_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Id */ +typedef unsigned long Id_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Id; +asn_struct_free_f Id_free; +asn_struct_print_f Id_print; +asn_constr_check_f Id_constraint; +ber_type_decoder_f Id_decode_ber; +der_type_encoder_f Id_encode_der; +xer_type_decoder_f Id_decode_xer; +xer_type_encoder_f Id_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _Id_H_ */ diff --git a/src/third_party/asn1/InitAckMessage.c b/src/third_party/asn1/InitAckMessage.c new file mode 100644 index 00000000..e829440e --- /dev/null +++ b/src/third_party/asn1/InitAckMessage.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "InitAckMessage.h" + +static int +memb_latestBetaRevision_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } 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_InitAckMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InitAckMessage, latestGameVersion), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Version, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "latestGameVersion" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitAckMessage, latestBetaRevision), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_latestBetaRevision_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "latestBetaRevision" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitAckMessage, yourSessionId), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Guid, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "yourSessionId" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitAckMessage, yourPlayerId), + (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, + "yourPlayerId" + }, +}; +static ber_tlv_tag_t asn_DEF_InitAckMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (1 << 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, 2 }, /* latestBetaRevision at 91 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* yourSessionId at 92 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -2, 0 }, /* yourPlayerId at 94 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* latestGameVersion at 90 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_InitAckMessage_specs_1 = { + sizeof(struct InitAckMessage), + offsetof(struct InitAckMessage, _asn_ctx), + asn_MAP_InitAckMessage_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* Start extensions */ + 5 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_InitAckMessage = { + "InitAckMessage", + "InitAckMessage", + 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_InitAckMessage_tags_1, + sizeof(asn_DEF_InitAckMessage_tags_1) + /sizeof(asn_DEF_InitAckMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_InitAckMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_InitAckMessage_tags_1) + /sizeof(asn_DEF_InitAckMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_InitAckMessage_1, + 4, /* Elements count */ + &asn_SPC_InitAckMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/InitAckMessage.h b/src/third_party/asn1/InitAckMessage.h new file mode 100644 index 00000000..a32044b0 --- /dev/null +++ b/src/third_party/asn1/InitAckMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _InitAckMessage_H_ +#define _InitAckMessage_H_ + + +#include + +/* Including external dependencies */ +#include "Version.h" +#include +#include "Guid.h" +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* InitAckMessage */ +typedef struct InitAckMessage { + Version_t latestGameVersion; + long latestBetaRevision; + Guid_t yourSessionId; + NonZeroId_t yourPlayerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InitAckMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InitAckMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _InitAckMessage_H_ */ diff --git a/src/third_party/asn1/InitMessage.c b/src/third_party/asn1/InitMessage.c new file mode 100644 index 00000000..0ef9de3e --- /dev/null +++ b/src/third_party/asn1/InitMessage.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "InitMessage.h" + +static asn_TYPE_member_t asn_MBR_login_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct login, choice.anonymousLogin), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AnonymousLogin, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "anonymousLogin" + }, + { ATF_NOFLAGS, 0, offsetof(struct login, choice.authenticatedLogin), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AuthenticatedLogin, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "authenticatedLogin" + }, + { ATF_NOFLAGS, 0, offsetof(struct login, choice.statisticsLogin), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_StatisticsLogin, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "statisticsLogin" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_login_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* anonymousLogin at 64 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* authenticatedLogin at 65 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* statisticsLogin at 67 */ +}; +static asn_CHOICE_specifics_t asn_SPC_login_specs_3 = { + sizeof(struct login), + offsetof(struct login, _asn_ctx), + offsetof(struct login, present), + sizeof(((struct login *)0)->present), + asn_MAP_login_tag2el_3, + 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_3 = { + "login", + "login", + 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 */ + 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_login_3, + 3, /* Elements count */ + &asn_SPC_login_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_InitMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InitMessage, requestedVersion), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Version, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "requestedVersion" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitMessage, login), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_login_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "login" + }, +}; +static ber_tlv_tag_t asn_DEF_InitMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_InitMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* requestedVersion at 62 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* anonymousLogin at 64 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* authenticatedLogin at 65 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* statisticsLogin at 67 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_InitMessage_specs_1 = { + sizeof(struct InitMessage), + offsetof(struct InitMessage, _asn_ctx), + asn_MAP_InitMessage_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_InitMessage = { + "InitMessage", + "InitMessage", + 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_InitMessage_tags_1, + sizeof(asn_DEF_InitMessage_tags_1) + /sizeof(asn_DEF_InitMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_InitMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_InitMessage_tags_1) + /sizeof(asn_DEF_InitMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_InitMessage_1, + 2, /* Elements count */ + &asn_SPC_InitMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/InitMessage.h b/src/third_party/asn1/InitMessage.h new file mode 100644 index 00000000..c5026a4e --- /dev/null +++ b/src/third_party/asn1/InitMessage.h @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _InitMessage_H_ +#define _InitMessage_H_ + + +#include + +/* Including external dependencies */ +#include "Version.h" +#include "AnonymousLogin.h" +#include "AuthenticatedLogin.h" +#include "StatisticsLogin.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum login_PR { + login_PR_NOTHING, /* No components present */ + login_PR_anonymousLogin, + login_PR_authenticatedLogin, + login_PR_statisticsLogin, + /* Extensions may appear below */ + +} login_PR; + +/* InitMessage */ +typedef struct InitMessage { + Version_t requestedVersion; + struct login { + login_PR present; + union InitMessage__login_u { + AnonymousLogin_t anonymousLogin; + AuthenticatedLogin_t authenticatedLogin; + StatisticsLogin_t statisticsLogin; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } login; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InitMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InitMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _InitMessage_H_ */ diff --git a/src/third_party/asn1/JoinExistingGame.c b/src/third_party/asn1/JoinExistingGame.c new file mode 100644 index 00000000..d1be25ed --- /dev/null +++ b/src/third_party/asn1/JoinExistingGame.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "JoinExistingGame.h" + +static asn_TYPE_member_t asn_MBR_JoinExistingGame_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct JoinExistingGame, gameId), + (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, + "gameId" + }, +}; +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 219 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_JoinExistingGame_specs_1 = { + sizeof(struct JoinExistingGame), + offsetof(struct JoinExistingGame, _asn_ctx), + asn_MAP_JoinExistingGame_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_JoinExistingGame = { + "JoinExistingGame", + "JoinExistingGame", + 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_JoinExistingGame_tags_1, + sizeof(asn_DEF_JoinExistingGame_tags_1) + /sizeof(asn_DEF_JoinExistingGame_tags_1[0]), /* 1 */ + asn_DEF_JoinExistingGame_tags_1, /* Same as above */ + sizeof(asn_DEF_JoinExistingGame_tags_1) + /sizeof(asn_DEF_JoinExistingGame_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_JoinExistingGame_1, + 1, /* Elements count */ + &asn_SPC_JoinExistingGame_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/JoinExistingGame.h b/src/third_party/asn1/JoinExistingGame.h new file mode 100644 index 00000000..15e9efaf --- /dev/null +++ b/src/third_party/asn1/JoinExistingGame.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _JoinExistingGame_H_ +#define _JoinExistingGame_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* JoinExistingGame */ +typedef struct JoinExistingGame { + NonZeroId_t gameId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} JoinExistingGame_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_JoinExistingGame; + +#ifdef __cplusplus +} +#endif + +#endif /* _JoinExistingGame_H_ */ diff --git a/src/third_party/asn1/JoinGameAck.c b/src/third_party/asn1/JoinGameAck.c new file mode 100644 index 00000000..cfe3a598 --- /dev/null +++ b/src/third_party/asn1/JoinGameAck.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "JoinGameAck.h" + +static asn_TYPE_member_t asn_MBR_JoinGameAck_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct JoinGameAck, areYouAdmin), + (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), + 0, + &asn_DEF_BOOLEAN, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "areYouAdmin" + }, + { ATF_NOFLAGS, 0, offsetof(struct JoinGameAck, gameInfo), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_GameInfo, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameInfo" + }, +}; +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 }, /* areYouAdmin at 234 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* gameInfo at 236 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_JoinGameAck_specs_1 = { + sizeof(struct JoinGameAck), + offsetof(struct JoinGameAck, _asn_ctx), + asn_MAP_JoinGameAck_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_JoinGameAck = { + "JoinGameAck", + "JoinGameAck", + 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_JoinGameAck_tags_1, + sizeof(asn_DEF_JoinGameAck_tags_1) + /sizeof(asn_DEF_JoinGameAck_tags_1[0]), /* 1 */ + asn_DEF_JoinGameAck_tags_1, /* Same as above */ + sizeof(asn_DEF_JoinGameAck_tags_1) + /sizeof(asn_DEF_JoinGameAck_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_JoinGameAck_1, + 2, /* Elements count */ + &asn_SPC_JoinGameAck_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/JoinGameAck.h b/src/third_party/asn1/JoinGameAck.h new file mode 100644 index 00000000..a27b7426 --- /dev/null +++ b/src/third_party/asn1/JoinGameAck.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _JoinGameAck_H_ +#define _JoinGameAck_H_ + + +#include + +/* Including external dependencies */ +#include +#include "GameInfo.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* JoinGameAck */ +typedef struct JoinGameAck { + BOOLEAN_t areYouAdmin; + GameInfo_t gameInfo; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} JoinGameAck_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_JoinGameAck; + +#ifdef __cplusplus +} +#endif + +#endif /* _JoinGameAck_H_ */ diff --git a/src/third_party/asn1/JoinGameFailed.c b/src/third_party/asn1/JoinGameFailed.c new file mode 100644 index 00000000..d6f5f40b --- /dev/null +++ b/src/third_party/asn1/JoinGameFailed.c @@ -0,0 +1,181 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "JoinGameFailed.h" + +static int +joinGameFailureReason_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +joinGameFailureReason_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +static void +joinGameFailureReason_2_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + joinGameFailureReason_2_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +static int +joinGameFailureReason_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + joinGameFailureReason_2_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +static asn_dec_rval_t +joinGameFailureReason_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + joinGameFailureReason_2_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +static asn_enc_rval_t +joinGameFailureReason_2_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + joinGameFailureReason_2_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +static asn_dec_rval_t +joinGameFailureReason_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + joinGameFailureReason_2_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +static asn_enc_rval_t +joinGameFailureReason_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + joinGameFailureReason_2_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_joinGameFailureReason_value2enum_2[] = { + { 1, 11, "invalidGame" }, + { 2, 10, "gameIsFull" }, + { 3, 13, "gameIsRunning" }, + { 4, 15, "invalidPassword" } +}; +static unsigned int asn_MAP_joinGameFailureReason_enum2value_2[] = { + 1, /* gameIsFull(2) */ + 2, /* gameIsRunning(3) */ + 0, /* invalidGame(1) */ + 3 /* invalidPassword(4) */ +}; +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 */ + 4, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_joinGameFailureReason_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_joinGameFailureReason_2 = { + "joinGameFailureReason", + "joinGameFailureReason", + joinGameFailureReason_2_free, + joinGameFailureReason_2_print, + joinGameFailureReason_2_constraint, + joinGameFailureReason_2_decode_ber, + joinGameFailureReason_2_encode_der, + joinGameFailureReason_2_decode_xer, + joinGameFailureReason_2_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_joinGameFailureReason_tags_2, + sizeof(asn_DEF_joinGameFailureReason_tags_2) + /sizeof(asn_DEF_joinGameFailureReason_tags_2[0]), /* 1 */ + asn_DEF_joinGameFailureReason_tags_2, /* Same as above */ + sizeof(asn_DEF_joinGameFailureReason_tags_2) + /sizeof(asn_DEF_joinGameFailureReason_tags_2[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_joinGameFailureReason_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_JoinGameFailed_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct JoinGameFailed, joinGameFailureReason), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_joinGameFailureReason_2, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinGameFailureReason" + }, +}; +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 240 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_JoinGameFailed_specs_1 = { + sizeof(struct JoinGameFailed), + offsetof(struct JoinGameFailed, _asn_ctx), + asn_MAP_JoinGameFailed_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_JoinGameFailed = { + "JoinGameFailed", + "JoinGameFailed", + 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_JoinGameFailed_tags_1, + sizeof(asn_DEF_JoinGameFailed_tags_1) + /sizeof(asn_DEF_JoinGameFailed_tags_1[0]), /* 1 */ + asn_DEF_JoinGameFailed_tags_1, /* Same as above */ + sizeof(asn_DEF_JoinGameFailed_tags_1) + /sizeof(asn_DEF_JoinGameFailed_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_JoinGameFailed_1, + 1, /* Elements count */ + &asn_SPC_JoinGameFailed_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/JoinGameFailed.h b/src/third_party/asn1/JoinGameFailed.h new file mode 100644 index 00000000..42bf043f --- /dev/null +++ b/src/third_party/asn1/JoinGameFailed.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _JoinGameFailed_H_ +#define _JoinGameFailed_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum joinGameFailureReason { + joinGameFailureReason_invalidGame = 1, + joinGameFailureReason_gameIsFull = 2, + joinGameFailureReason_gameIsRunning = 3, + joinGameFailureReason_invalidPassword = 4 +} e_joinGameFailureReason; + +/* JoinGameFailed */ +typedef struct JoinGameFailed { + long joinGameFailureReason; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} JoinGameFailed_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_joinGameFailureReason_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_JoinGameFailed; + +#ifdef __cplusplus +} +#endif + +#endif /* _JoinGameFailed_H_ */ diff --git a/src/third_party/asn1/JoinGameReplyMessage.c b/src/third_party/asn1/JoinGameReplyMessage.c new file mode 100644 index 00000000..a2a52b3d --- /dev/null +++ b/src/third_party/asn1/JoinGameReplyMessage.c @@ -0,0 +1,129 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "JoinGameReplyMessage.h" + +static asn_TYPE_member_t asn_MBR_joinGameResult_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct joinGameResult, choice.joinGameAck), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_JoinGameAck, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinGameAck" + }, + { ATF_NOFLAGS, 0, offsetof(struct joinGameResult, choice.joinGameFailed), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_JoinGameFailed, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinGameFailed" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_joinGameResult_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinGameAck at 228 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinGameFailed at 230 */ +}; +static asn_CHOICE_specifics_t asn_SPC_joinGameResult_specs_3 = { + sizeof(struct joinGameResult), + offsetof(struct joinGameResult, _asn_ctx), + offsetof(struct joinGameResult, present), + sizeof(((struct joinGameResult *)0)->present), + asn_MAP_joinGameResult_tag2el_3, + 2, /* Count of tags in the map */ + 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_joinGameResult_3 = { + "joinGameResult", + "joinGameResult", + 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 */ + 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_joinGameResult_3, + 2, /* Elements count */ + &asn_SPC_joinGameResult_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_JoinGameReplyMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct JoinGameReplyMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct JoinGameReplyMessage, joinGameResult), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_joinGameResult_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinGameResult" + }, +}; +static ber_tlv_tag_t asn_DEF_JoinGameReplyMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (9 << 2)), + (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 226 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* joinGameAck at 228 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinGameFailed at 230 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_JoinGameReplyMessage_specs_1 = { + sizeof(struct JoinGameReplyMessage), + offsetof(struct JoinGameReplyMessage, _asn_ctx), + asn_MAP_JoinGameReplyMessage_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_JoinGameReplyMessage = { + "JoinGameReplyMessage", + "JoinGameReplyMessage", + 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_JoinGameReplyMessage_tags_1, + sizeof(asn_DEF_JoinGameReplyMessage_tags_1) + /sizeof(asn_DEF_JoinGameReplyMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_JoinGameReplyMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_JoinGameReplyMessage_tags_1) + /sizeof(asn_DEF_JoinGameReplyMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_JoinGameReplyMessage_1, + 2, /* Elements count */ + &asn_SPC_JoinGameReplyMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/JoinGameReplyMessage.h b/src/third_party/asn1/JoinGameReplyMessage.h new file mode 100644 index 00000000..8083a825 --- /dev/null +++ b/src/third_party/asn1/JoinGameReplyMessage.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _JoinGameReplyMessage_H_ +#define _JoinGameReplyMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "JoinGameAck.h" +#include "JoinGameFailed.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum joinGameResult_PR { + joinGameResult_PR_NOTHING, /* No components present */ + joinGameResult_PR_joinGameAck, + joinGameResult_PR_joinGameFailed, + /* Extensions may appear below */ + +} joinGameResult_PR; + +/* JoinGameReplyMessage */ +typedef struct JoinGameReplyMessage { + NonZeroId_t gameId; + struct joinGameResult { + joinGameResult_PR present; + union JoinGameReplyMessage__joinGameResult_u { + JoinGameAck_t joinGameAck; + JoinGameFailed_t joinGameFailed; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } joinGameResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} JoinGameReplyMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_JoinGameReplyMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _JoinGameReplyMessage_H_ */ diff --git a/src/third_party/asn1/JoinGameRequestMessage.c b/src/third_party/asn1/JoinGameRequestMessage.c new file mode 100644 index 00000000..74ad9a0b --- /dev/null +++ b/src/third_party/asn1/JoinGameRequestMessage.c @@ -0,0 +1,129 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "JoinGameRequestMessage.h" + +static asn_TYPE_member_t asn_MBR_joinGameAction_2[] = { + { ATF_NOFLAGS, 0, offsetof(struct joinGameAction, choice.joinExistingGame), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_JoinExistingGame, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinExistingGame" + }, + { ATF_NOFLAGS, 0, offsetof(struct joinGameAction, choice.joinNewGame), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_JoinNewGame, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinNewGame" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_joinGameAction_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinExistingGame at 211 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinNewGame at 213 */ +}; +static asn_CHOICE_specifics_t asn_SPC_joinGameAction_specs_2 = { + sizeof(struct joinGameAction), + offsetof(struct joinGameAction, _asn_ctx), + offsetof(struct joinGameAction, present), + sizeof(((struct joinGameAction *)0)->present), + asn_MAP_joinGameAction_tag2el_2, + 2, /* Count of tags in the map */ + 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_joinGameAction_2 = { + "joinGameAction", + "joinGameAction", + 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 */ + 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_joinGameAction_2, + 2, /* Elements count */ + &asn_SPC_joinGameAction_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_JoinGameRequestMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct JoinGameRequestMessage, joinGameAction), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_joinGameAction_2, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinGameAction" + }, + { ATF_POINTER, 1, offsetof(struct JoinGameRequestMessage, password), + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), + 0, + &asn_DEF_UTF8String, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "password" + }, +}; +static ber_tlv_tag_t asn_DEF_JoinGameRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (8 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_JoinGameRequestMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* password at 214 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinExistingGame at 211 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 } /* joinNewGame at 213 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_JoinGameRequestMessage_specs_1 = { + sizeof(struct JoinGameRequestMessage), + offsetof(struct JoinGameRequestMessage, _asn_ctx), + asn_MAP_JoinGameRequestMessage_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_JoinGameRequestMessage = { + "JoinGameRequestMessage", + "JoinGameRequestMessage", + 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_JoinGameRequestMessage_tags_1, + sizeof(asn_DEF_JoinGameRequestMessage_tags_1) + /sizeof(asn_DEF_JoinGameRequestMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_JoinGameRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_JoinGameRequestMessage_tags_1) + /sizeof(asn_DEF_JoinGameRequestMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_JoinGameRequestMessage_1, + 2, /* Elements count */ + &asn_SPC_JoinGameRequestMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/JoinGameRequestMessage.h b/src/third_party/asn1/JoinGameRequestMessage.h new file mode 100644 index 00000000..eedc81f4 --- /dev/null +++ b/src/third_party/asn1/JoinGameRequestMessage.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _JoinGameRequestMessage_H_ +#define _JoinGameRequestMessage_H_ + + +#include + +/* Including external dependencies */ +#include +#include "JoinExistingGame.h" +#include "JoinNewGame.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum joinGameAction_PR { + joinGameAction_PR_NOTHING, /* No components present */ + joinGameAction_PR_joinExistingGame, + joinGameAction_PR_joinNewGame, + /* Extensions may appear below */ + +} joinGameAction_PR; + +/* JoinGameRequestMessage */ +typedef struct JoinGameRequestMessage { + struct joinGameAction { + joinGameAction_PR present; + union JoinGameRequestMessage__joinGameAction_u { + JoinExistingGame_t joinExistingGame; + JoinNewGame_t joinNewGame; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } joinGameAction; + UTF8String_t *password /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} JoinGameRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_JoinGameRequestMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _JoinGameRequestMessage_H_ */ diff --git a/src/third_party/asn1/JoinNewGame.c b/src/third_party/asn1/JoinNewGame.c new file mode 100644 index 00000000..456aaf9b --- /dev/null +++ b/src/third_party/asn1/JoinNewGame.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "JoinNewGame.h" + +static asn_TYPE_member_t asn_MBR_JoinNewGame_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct JoinNewGame, gameInfo), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_GameInfo, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameInfo" + }, +}; +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 223 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_JoinNewGame_specs_1 = { + sizeof(struct JoinNewGame), + offsetof(struct JoinNewGame, _asn_ctx), + asn_MAP_JoinNewGame_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_JoinNewGame = { + "JoinNewGame", + "JoinNewGame", + 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_JoinNewGame_tags_1, + sizeof(asn_DEF_JoinNewGame_tags_1) + /sizeof(asn_DEF_JoinNewGame_tags_1[0]), /* 1 */ + asn_DEF_JoinNewGame_tags_1, /* Same as above */ + sizeof(asn_DEF_JoinNewGame_tags_1) + /sizeof(asn_DEF_JoinNewGame_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_JoinNewGame_1, + 1, /* Elements count */ + &asn_SPC_JoinNewGame_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/JoinNewGame.h b/src/third_party/asn1/JoinNewGame.h new file mode 100644 index 00000000..c63acb79 --- /dev/null +++ b/src/third_party/asn1/JoinNewGame.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _JoinNewGame_H_ +#define _JoinNewGame_H_ + + +#include + +/* Including external dependencies */ +#include "GameInfo.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* JoinNewGame */ +typedef struct JoinNewGame { + GameInfo_t gameInfo; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} JoinNewGame_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_JoinNewGame; + +#ifdef __cplusplus +} +#endif + +#endif /* _JoinNewGame_H_ */ diff --git a/src/third_party/asn1/KickPlayerRequestMessage.c b/src/third_party/asn1/KickPlayerRequestMessage.c new file mode 100644 index 00000000..def484bc --- /dev/null +++ b/src/third_party/asn1/KickPlayerRequestMessage.c @@ -0,0 +1,71 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "KickPlayerRequestMessage.h" + +static asn_TYPE_member_t asn_MBR_KickPlayerRequestMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct KickPlayerRequestMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct KickPlayerRequestMessage, playerId), + (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, + "playerId" + }, +}; +static ber_tlv_tag_t asn_DEF_KickPlayerRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (11 << 2)), + (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 300 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 302 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_KickPlayerRequestMessage_specs_1 = { + sizeof(struct KickPlayerRequestMessage), + offsetof(struct KickPlayerRequestMessage, _asn_ctx), + asn_MAP_KickPlayerRequestMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_KickPlayerRequestMessage = { + "KickPlayerRequestMessage", + "KickPlayerRequestMessage", + 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_KickPlayerRequestMessage_tags_1, + sizeof(asn_DEF_KickPlayerRequestMessage_tags_1) + /sizeof(asn_DEF_KickPlayerRequestMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_KickPlayerRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_KickPlayerRequestMessage_tags_1) + /sizeof(asn_DEF_KickPlayerRequestMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_KickPlayerRequestMessage_1, + 2, /* Elements count */ + &asn_SPC_KickPlayerRequestMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/KickPlayerRequestMessage.h b/src/third_party/asn1/KickPlayerRequestMessage.h new file mode 100644 index 00000000..a8d7ac56 --- /dev/null +++ b/src/third_party/asn1/KickPlayerRequestMessage.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _KickPlayerRequestMessage_H_ +#define _KickPlayerRequestMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* KickPlayerRequestMessage */ +typedef struct KickPlayerRequestMessage { + NonZeroId_t gameId; + NonZeroId_t playerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} KickPlayerRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_KickPlayerRequestMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _KickPlayerRequestMessage_H_ */ diff --git a/src/third_party/asn1/LeaveGameRequestMessage.c b/src/third_party/asn1/LeaveGameRequestMessage.c new file mode 100644 index 00000000..661d5b6d --- /dev/null +++ b/src/third_party/asn1/LeaveGameRequestMessage.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "LeaveGameRequestMessage.h" + +static asn_TYPE_member_t asn_MBR_LeaveGameRequestMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct LeaveGameRequestMessage, gameId), + (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, + "gameId" + }, +}; +static ber_tlv_tag_t asn_DEF_LeaveGameRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (12 << 2)), + (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 306 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_LeaveGameRequestMessage_specs_1 = { + sizeof(struct LeaveGameRequestMessage), + offsetof(struct LeaveGameRequestMessage, _asn_ctx), + asn_MAP_LeaveGameRequestMessage_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_LeaveGameRequestMessage = { + "LeaveGameRequestMessage", + "LeaveGameRequestMessage", + 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_LeaveGameRequestMessage_tags_1, + sizeof(asn_DEF_LeaveGameRequestMessage_tags_1) + /sizeof(asn_DEF_LeaveGameRequestMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_LeaveGameRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_LeaveGameRequestMessage_tags_1) + /sizeof(asn_DEF_LeaveGameRequestMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_LeaveGameRequestMessage_1, + 1, /* Elements count */ + &asn_SPC_LeaveGameRequestMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/LeaveGameRequestMessage.h b/src/third_party/asn1/LeaveGameRequestMessage.h new file mode 100644 index 00000000..408f16f2 --- /dev/null +++ b/src/third_party/asn1/LeaveGameRequestMessage.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _LeaveGameRequestMessage_H_ +#define _LeaveGameRequestMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* LeaveGameRequestMessage */ +typedef struct LeaveGameRequestMessage { + NonZeroId_t gameId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} LeaveGameRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_LeaveGameRequestMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _LeaveGameRequestMessage_H_ */ diff --git a/src/third_party/asn1/Makefile b/src/third_party/asn1/Makefile new file mode 100644 index 00000000..34000a18 --- /dev/null +++ b/src/third_party/asn1/Makefile @@ -0,0 +1,236 @@ +ASN_MODULE_SOURCES= \ + PokerTHMessage.c \ + InitMessage.c \ + Version.c \ + AnonymousLogin.c \ + AuthenticatedLogin.c \ + StatisticsLogin.c \ + InitAckMessage.c \ + AvatarRequestMessage.c \ + AvatarReplyMessage.c \ + AvatarHeader.c \ + AvatarData.c \ + AvatarEnd.c \ + UnknownAvatar.c \ + AvatarHash.c \ + AvatarType.c \ + GameListMessage.c \ + GameListNew.c \ + GameListUpdate.c \ + GameListPlayerJoined.c \ + GameListPlayerLeft.c \ + GameListAdminChanged.c \ + GameMode.c \ + PlayerInfoRequestMessage.c \ + PlayerInfoReplyMessage.c \ + PlayerInfoData.c \ + UnknownPlayerInfo.c \ + SubscriptionRequestMessage.c \ + JoinGameRequestMessage.c \ + JoinExistingGame.c \ + JoinNewGame.c \ + JoinGameReplyMessage.c \ + JoinGameAck.c \ + JoinGameFailed.c \ + GameInfo.c \ + GamePlayerMessage.c \ + GamePlayerJoined.c \ + GamePlayerLeft.c \ + GameAdminChanged.c \ + RemovedFromGame.c \ + KickPlayerRequestMessage.c \ + LeaveGameRequestMessage.c \ + StartEventMessage.c \ + StartEventAckMessage.c \ + GameStartMessage.c \ + HandStartMessage.c \ + PlayersTurnMessage.c \ + MyActionRequestMessage.c \ + YourActionRejectedMessage.c \ + PlayersActionDoneMessage.c \ + DealFlopCardsMessage.c \ + DealTurnCardMessage.c \ + DealRiverCardMessage.c \ + AllInShowCardsMessage.c \ + PlayerAllIn.c \ + EndOfHandMessage.c \ + EndOfHandShowCards.c \ + PlayerResult.c \ + EndOfHandHideCards.c \ + EndOfGameMessage.c \ + StatisticsMessage.c \ + StatisticsData.c \ + ChatRequestMessage.c \ + ChatMessage.c \ + DialogMessage.c \ + ErrorMessage.c \ + GameState.c \ + PlayerAction.c \ + NonZeroId.c \ + Id.c \ + Guid.c \ + Card.c + +ASN_MODULE_HEADERS= \ + PokerTHMessage.h \ + InitMessage.h \ + Version.h \ + AnonymousLogin.h \ + AuthenticatedLogin.h \ + StatisticsLogin.h \ + InitAckMessage.h \ + AvatarRequestMessage.h \ + AvatarReplyMessage.h \ + AvatarHeader.h \ + AvatarData.h \ + AvatarEnd.h \ + UnknownAvatar.h \ + AvatarHash.h \ + AvatarType.h \ + GameListMessage.h \ + GameListNew.h \ + GameListUpdate.h \ + GameListPlayerJoined.h \ + GameListPlayerLeft.h \ + GameListAdminChanged.h \ + GameMode.h \ + PlayerInfoRequestMessage.h \ + PlayerInfoReplyMessage.h \ + PlayerInfoData.h \ + UnknownPlayerInfo.h \ + SubscriptionRequestMessage.h \ + JoinGameRequestMessage.h \ + JoinExistingGame.h \ + JoinNewGame.h \ + JoinGameReplyMessage.h \ + JoinGameAck.h \ + JoinGameFailed.h \ + GameInfo.h \ + GamePlayerMessage.h \ + GamePlayerJoined.h \ + GamePlayerLeft.h \ + GameAdminChanged.h \ + RemovedFromGame.h \ + KickPlayerRequestMessage.h \ + LeaveGameRequestMessage.h \ + StartEventMessage.h \ + StartEventAckMessage.h \ + GameStartMessage.h \ + HandStartMessage.h \ + PlayersTurnMessage.h \ + MyActionRequestMessage.h \ + YourActionRejectedMessage.h \ + PlayersActionDoneMessage.h \ + DealFlopCardsMessage.h \ + DealTurnCardMessage.h \ + DealRiverCardMessage.h \ + AllInShowCardsMessage.h \ + PlayerAllIn.h \ + EndOfHandMessage.h \ + EndOfHandShowCards.h \ + PlayerResult.h \ + EndOfHandHideCards.h \ + EndOfGameMessage.h \ + StatisticsMessage.h \ + StatisticsData.h \ + ChatRequestMessage.h \ + ChatMessage.h \ + DialogMessage.h \ + ErrorMessage.h \ + GameState.h \ + PlayerAction.h \ + NonZeroId.h \ + Id.h \ + Guid.h \ + Card.h + +ASN_MODULE_HEADERS+=UTF8String.h +ASN_MODULE_HEADERS+=BOOLEAN.h +ASN_MODULE_SOURCES+=BOOLEAN.c +ASN_MODULE_HEADERS+=INTEGER.h +ASN_MODULE_HEADERS+=NativeEnumerated.h +ASN_MODULE_SOURCES+=INTEGER.c +ASN_MODULE_SOURCES+=NativeEnumerated.c +ASN_MODULE_HEADERS+=NativeInteger.h +ASN_MODULE_SOURCES+=NativeInteger.c +ASN_MODULE_SOURCES+=UTF8String.c +ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h +ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c +ASN_MODULE_HEADERS+=asn_SET_OF.h +ASN_MODULE_SOURCES+=asn_SET_OF.c +ASN_MODULE_HEADERS+=constr_CHOICE.h +ASN_MODULE_SOURCES+=constr_CHOICE.c +ASN_MODULE_HEADERS+=constr_SEQUENCE.h +ASN_MODULE_SOURCES+=constr_SEQUENCE.c +ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h +ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c +ASN_MODULE_HEADERS+=constr_SET_OF.h +ASN_MODULE_SOURCES+=constr_SET_OF.c +ASN_MODULE_HEADERS+=asn_application.h +ASN_MODULE_HEADERS+=asn_system.h +ASN_MODULE_HEADERS+=asn_codecs.h +ASN_MODULE_HEADERS+=asn_internal.h +ASN_MODULE_HEADERS+=OCTET_STRING.h +ASN_MODULE_SOURCES+=OCTET_STRING.c +ASN_MODULE_HEADERS+=BIT_STRING.h +ASN_MODULE_SOURCES+=BIT_STRING.c +ASN_MODULE_SOURCES+=asn_codecs_prim.c +ASN_MODULE_HEADERS+=asn_codecs_prim.h +ASN_MODULE_HEADERS+=ber_tlv_length.h +ASN_MODULE_SOURCES+=ber_tlv_length.c +ASN_MODULE_HEADERS+=ber_tlv_tag.h +ASN_MODULE_SOURCES+=ber_tlv_tag.c +ASN_MODULE_HEADERS+=ber_decoder.h +ASN_MODULE_SOURCES+=ber_decoder.c +ASN_MODULE_HEADERS+=der_encoder.h +ASN_MODULE_SOURCES+=der_encoder.c +ASN_MODULE_HEADERS+=constr_TYPE.h +ASN_MODULE_SOURCES+=constr_TYPE.c +ASN_MODULE_HEADERS+=constraints.h +ASN_MODULE_SOURCES+=constraints.c +ASN_MODULE_HEADERS+=xer_support.h +ASN_MODULE_SOURCES+=xer_support.c +ASN_MODULE_HEADERS+=xer_decoder.h +ASN_MODULE_SOURCES+=xer_decoder.c +ASN_MODULE_HEADERS+=xer_encoder.h +ASN_MODULE_SOURCES+=xer_encoder.c +ASN_MODULE_HEADERS+=per_support.h +ASN_MODULE_SOURCES+=per_support.c +ASN_MODULE_HEADERS+=per_decoder.h +ASN_MODULE_SOURCES+=per_decoder.c +ASN_MODULE_HEADERS+=per_encoder.h +ASN_MODULE_SOURCES+=per_encoder.c +ASN_MODULE_HEADERS+=per_opentype.h +ASN_MODULE_SOURCES+=per_opentype.c +ASN_CONVERTER_SOURCES+=asntest.c + + +lib_LTLIBRARIES=libsomething.la +libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) + +# This file may be used as an input for make(3) +# Remove the lines below to convert it into a pure .am file +TARGET = progname +CFLAGS += -I. +OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} + +all: $(TARGET) + +$(TARGET): ${OBJS} + $(CC) $(CFLAGS) -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS) + +.SUFFIXES: +.SUFFIXES: .c .o + +.c.o: + $(CC) $(CFLAGS) -o $@ -c $< + +clean: + rm -f $(TARGET) + rm -f $(OBJS) + +regen: regenerate-from-asn1-source + +regenerate-from-asn1-source: + asn1c -fnative-types ../../../docs/pokerth.asn1 + diff --git a/src/third_party/asn1/MyActionRequestMessage.c b/src/third_party/asn1/MyActionRequestMessage.c new file mode 100644 index 00000000..6c6847f2 --- /dev/null +++ b/src/third_party/asn1/MyActionRequestMessage.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "MyActionRequestMessage.h" + +static int +memb_myRelativeBet_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } 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_MyActionRequestMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, gameState), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_GameState, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameState" + }, + { ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, myAction), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_PlayerAction, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "myAction" + }, + { ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, myRelativeBet), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_myRelativeBet_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "myRelativeBet" + }, +}; +static ber_tlv_tag_t asn_DEF_MyActionRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (18 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_MyActionRequestMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 336 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -1, 0 }, /* myRelativeBet at 339 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 1 }, /* gameState at 337 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, -1, 0 } /* myAction at 338 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_MyActionRequestMessage_specs_1 = { + sizeof(struct MyActionRequestMessage), + offsetof(struct MyActionRequestMessage, _asn_ctx), + asn_MAP_MyActionRequestMessage_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* Start extensions */ + 5 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_MyActionRequestMessage = { + "MyActionRequestMessage", + "MyActionRequestMessage", + 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_MyActionRequestMessage_tags_1, + sizeof(asn_DEF_MyActionRequestMessage_tags_1) + /sizeof(asn_DEF_MyActionRequestMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_MyActionRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_MyActionRequestMessage_tags_1) + /sizeof(asn_DEF_MyActionRequestMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_MyActionRequestMessage_1, + 4, /* Elements count */ + &asn_SPC_MyActionRequestMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/MyActionRequestMessage.h b/src/third_party/asn1/MyActionRequestMessage.h new file mode 100644 index 00000000..c42aa260 --- /dev/null +++ b/src/third_party/asn1/MyActionRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _MyActionRequestMessage_H_ +#define _MyActionRequestMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "GameState.h" +#include "PlayerAction.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* MyActionRequestMessage */ +typedef struct MyActionRequestMessage { + NonZeroId_t gameId; + GameState_t gameState; + PlayerAction_t myAction; + long myRelativeBet; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MyActionRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MyActionRequestMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _MyActionRequestMessage_H_ */ diff --git a/src/third_party/asn1/NativeEnumerated.c b/src/third_party/asn1/NativeEnumerated.c new file mode 120000 index 00000000..1c4daa4d --- /dev/null +++ b/src/third_party/asn1/NativeEnumerated.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/NativeEnumerated.c \ No newline at end of file diff --git a/src/third_party/asn1/NativeEnumerated.h b/src/third_party/asn1/NativeEnumerated.h new file mode 120000 index 00000000..4cdde224 --- /dev/null +++ b/src/third_party/asn1/NativeEnumerated.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/NativeEnumerated.h \ No newline at end of file diff --git a/src/third_party/asn1/NativeInteger.c b/src/third_party/asn1/NativeInteger.c new file mode 120000 index 00000000..e5253ada --- /dev/null +++ b/src/third_party/asn1/NativeInteger.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/NativeInteger.c \ No newline at end of file diff --git a/src/third_party/asn1/NativeInteger.h b/src/third_party/asn1/NativeInteger.h new file mode 120000 index 00000000..30789aa6 --- /dev/null +++ b/src/third_party/asn1/NativeInteger.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/NativeInteger.h \ No newline at end of file diff --git a/src/third_party/asn1/NonZeroId.c b/src/third_party/asn1/NonZeroId.c new file mode 100644 index 00000000..d3bef35b --- /dev/null +++ b/src/third_party/asn1/NonZeroId.c @@ -0,0 +1,131 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "NonZeroId.h" + +int +NonZeroId_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value >= 1 && value <= 4294967295)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static void +NonZeroId_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeInteger.free_struct; + td->print_struct = asn_DEF_NativeInteger.print_struct; + td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; + td->der_encoder = asn_DEF_NativeInteger.der_encoder; + td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; + td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; + td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; + td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeInteger.per_constraints; + td->elements = asn_DEF_NativeInteger.elements; + td->elements_count = asn_DEF_NativeInteger.elements_count; + /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ +} + +void +NonZeroId_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + NonZeroId_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +NonZeroId_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + NonZeroId_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +NonZeroId_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + NonZeroId_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +NonZeroId_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + NonZeroId_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +NonZeroId_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + NonZeroId_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +NonZeroId_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + NonZeroId_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_specifics_t asn_SPC_NonZeroId_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static ber_tlv_tag_t asn_DEF_NonZeroId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NonZeroId = { + "NonZeroId", + "NonZeroId", + NonZeroId_free, + NonZeroId_print, + NonZeroId_constraint, + NonZeroId_decode_ber, + NonZeroId_encode_der, + NonZeroId_decode_xer, + NonZeroId_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_NonZeroId_tags_1, + sizeof(asn_DEF_NonZeroId_tags_1) + /sizeof(asn_DEF_NonZeroId_tags_1[0]), /* 1 */ + asn_DEF_NonZeroId_tags_1, /* Same as above */ + sizeof(asn_DEF_NonZeroId_tags_1) + /sizeof(asn_DEF_NonZeroId_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + &asn_SPC_NonZeroId_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/NonZeroId.h b/src/third_party/asn1/NonZeroId.h new file mode 100644 index 00000000..edd5156a --- /dev/null +++ b/src/third_party/asn1/NonZeroId.h @@ -0,0 +1,37 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _NonZeroId_H_ +#define _NonZeroId_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NonZeroId */ +typedef unsigned long NonZeroId_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NonZeroId; +asn_struct_free_f NonZeroId_free; +asn_struct_print_f NonZeroId_print; +asn_constr_check_f NonZeroId_constraint; +ber_type_decoder_f NonZeroId_decode_ber; +der_type_encoder_f NonZeroId_encode_der; +xer_type_decoder_f NonZeroId_decode_xer; +xer_type_encoder_f NonZeroId_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _NonZeroId_H_ */ diff --git a/src/third_party/asn1/OCTET_STRING.c b/src/third_party/asn1/OCTET_STRING.c new file mode 120000 index 00000000..bb7efa5c --- /dev/null +++ b/src/third_party/asn1/OCTET_STRING.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/OCTET_STRING.c \ No newline at end of file diff --git a/src/third_party/asn1/OCTET_STRING.h b/src/third_party/asn1/OCTET_STRING.h new file mode 120000 index 00000000..b5278314 --- /dev/null +++ b/src/third_party/asn1/OCTET_STRING.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/OCTET_STRING.h \ No newline at end of file diff --git a/src/third_party/asn1/PlayerAction.c b/src/third_party/asn1/PlayerAction.c new file mode 100644 index 00000000..d7cabea6 --- /dev/null +++ b/src/third_party/asn1/PlayerAction.c @@ -0,0 +1,136 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PlayerAction.h" + +int +PlayerAction_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +PlayerAction_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +void +PlayerAction_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + PlayerAction_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +PlayerAction_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + PlayerAction_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +PlayerAction_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + PlayerAction_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +PlayerAction_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + PlayerAction_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +PlayerAction_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + PlayerAction_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +PlayerAction_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + PlayerAction_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_PlayerAction_value2enum_1[] = { + { 0, 10, "actionNone" }, + { 1, 10, "actionFold" }, + { 2, 11, "actionCheck" }, + { 3, 10, "actionCall" }, + { 4, 9, "actionBet" }, + { 5, 11, "actionRaise" }, + { 6, 11, "actionAllIn" } +}; +static unsigned int asn_MAP_PlayerAction_enum2value_1[] = { + 6, /* actionAllIn(6) */ + 4, /* actionBet(4) */ + 3, /* actionCall(3) */ + 2, /* actionCheck(2) */ + 1, /* actionFold(1) */ + 0, /* actionNone(0) */ + 5 /* actionRaise(5) */ +}; +static asn_INTEGER_specifics_t asn_SPC_PlayerAction_specs_1 = { + asn_MAP_PlayerAction_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_PlayerAction_enum2value_1, /* N => "tag"; sorted by N */ + 7, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_PlayerAction_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_PlayerAction = { + "PlayerAction", + "PlayerAction", + PlayerAction_free, + PlayerAction_print, + PlayerAction_constraint, + PlayerAction_decode_ber, + PlayerAction_encode_der, + PlayerAction_decode_xer, + PlayerAction_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_PlayerAction_tags_1, + sizeof(asn_DEF_PlayerAction_tags_1) + /sizeof(asn_DEF_PlayerAction_tags_1[0]), /* 1 */ + asn_DEF_PlayerAction_tags_1, /* Same as above */ + sizeof(asn_DEF_PlayerAction_tags_1) + /sizeof(asn_DEF_PlayerAction_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_PlayerAction_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PlayerAction.h b/src/third_party/asn1/PlayerAction.h new file mode 100644 index 00000000..27c5f6ad --- /dev/null +++ b/src/third_party/asn1/PlayerAction.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PlayerAction_H_ +#define _PlayerAction_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum PlayerAction { + PlayerAction_actionNone = 0, + PlayerAction_actionFold = 1, + PlayerAction_actionCheck = 2, + PlayerAction_actionCall = 3, + PlayerAction_actionBet = 4, + PlayerAction_actionRaise = 5, + PlayerAction_actionAllIn = 6 +} e_PlayerAction; + +/* PlayerAction */ +typedef long PlayerAction_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlayerAction; +asn_struct_free_f PlayerAction_free; +asn_struct_print_f PlayerAction_print; +asn_constr_check_f PlayerAction_constraint; +ber_type_decoder_f PlayerAction_decode_ber; +der_type_encoder_f PlayerAction_encode_der; +xer_type_decoder_f PlayerAction_decode_xer; +xer_type_encoder_f PlayerAction_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlayerAction_H_ */ diff --git a/src/third_party/asn1/PlayerAllIn.c b/src/third_party/asn1/PlayerAllIn.c new file mode 100644 index 00000000..8db8a3e7 --- /dev/null +++ b/src/third_party/asn1/PlayerAllIn.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PlayerAllIn.h" + +static int +memb_allInCards_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)) { + /* 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_allInCards_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Card, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_allInCards_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_allInCards_specs_3 = { + sizeof(struct allInCards), + offsetof(struct allInCards, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_allInCards_3 = { + "allInCards", + "allInCards", + 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_allInCards_tags_3, + sizeof(asn_DEF_allInCards_tags_3) + /sizeof(asn_DEF_allInCards_tags_3[0]), /* 1 */ + asn_DEF_allInCards_tags_3, /* Same as above */ + sizeof(asn_DEF_allInCards_tags_3) + /sizeof(asn_DEF_allInCards_tags_3[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_allInCards_3, + 1, /* Single element */ + &asn_SPC_allInCards_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_PlayerAllIn_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PlayerAllIn, playerId), + (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, + "playerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayerAllIn, allInCards), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_allInCards_3, + memb_allInCards_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "allInCards" + }, +}; +static ber_tlv_tag_t asn_DEF_PlayerAllIn_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_PlayerAllIn_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* playerId at 386 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* allInCards at 388 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_PlayerAllIn_specs_1 = { + sizeof(struct PlayerAllIn), + offsetof(struct PlayerAllIn, _asn_ctx), + asn_MAP_PlayerAllIn_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_PlayerAllIn = { + "PlayerAllIn", + "PlayerAllIn", + 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_PlayerAllIn_tags_1, + sizeof(asn_DEF_PlayerAllIn_tags_1) + /sizeof(asn_DEF_PlayerAllIn_tags_1[0]), /* 1 */ + asn_DEF_PlayerAllIn_tags_1, /* Same as above */ + sizeof(asn_DEF_PlayerAllIn_tags_1) + /sizeof(asn_DEF_PlayerAllIn_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_PlayerAllIn_1, + 2, /* Elements count */ + &asn_SPC_PlayerAllIn_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PlayerAllIn.h b/src/third_party/asn1/PlayerAllIn.h new file mode 100644 index 00000000..5144388d --- /dev/null +++ b/src/third_party/asn1/PlayerAllIn.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PlayerAllIn_H_ +#define _PlayerAllIn_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "Card.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PlayerAllIn */ +typedef struct PlayerAllIn { + NonZeroId_t playerId; + struct allInCards { + A_SEQUENCE_OF(Card_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } allInCards; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PlayerAllIn_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlayerAllIn; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlayerAllIn_H_ */ diff --git a/src/third_party/asn1/PlayerInfoData.c b/src/third_party/asn1/PlayerInfoData.c new file mode 100644 index 00000000..e18bab96 --- /dev/null +++ b/src/third_party/asn1/PlayerInfoData.c @@ -0,0 +1,141 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PlayerInfoData.h" + +static asn_TYPE_member_t asn_MBR_avatarData_4[] = { + { ATF_NOFLAGS, 0, offsetof(struct avatarData, avatarType), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_AvatarType, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarType" + }, + { ATF_NOFLAGS, 0, offsetof(struct avatarData, avatar), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_AvatarHash, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatar" + }, +}; +static ber_tlv_tag_t asn_DEF_avatarData_tags_4[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_avatarData_tag2el_4[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* avatar at 193 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* avatarType at 191 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_avatarData_specs_4 = { + sizeof(struct avatarData), + offsetof(struct avatarData, _asn_ctx), + asn_MAP_avatarData_tag2el_4, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_avatarData_4 = { + "avatarData", + "avatarData", + 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_avatarData_tags_4, + sizeof(asn_DEF_avatarData_tags_4) + /sizeof(asn_DEF_avatarData_tags_4[0]), /* 1 */ + asn_DEF_avatarData_tags_4, /* Same as above */ + sizeof(asn_DEF_avatarData_tags_4) + /sizeof(asn_DEF_avatarData_tags_4[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_avatarData_4, + 2, /* Elements count */ + &asn_SPC_avatarData_specs_4 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_PlayerInfoData_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PlayerInfoData, playerName), + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), + 0, + &asn_DEF_UTF8String, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerName" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayerInfoData, isHuman), + (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), + 0, + &asn_DEF_BOOLEAN, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "isHuman" + }, + { ATF_POINTER, 1, offsetof(struct PlayerInfoData, avatarData), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_avatarData_4, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarData" + }, +}; +static ber_tlv_tag_t asn_DEF_PlayerInfoData_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_PlayerInfoData_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* isHuman at 189 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* playerName at 188 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* avatarData at 191 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_PlayerInfoData_specs_1 = { + sizeof(struct PlayerInfoData), + offsetof(struct PlayerInfoData, _asn_ctx), + asn_MAP_PlayerInfoData_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* Start extensions */ + 4 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_PlayerInfoData = { + "PlayerInfoData", + "PlayerInfoData", + 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_PlayerInfoData_tags_1, + sizeof(asn_DEF_PlayerInfoData_tags_1) + /sizeof(asn_DEF_PlayerInfoData_tags_1[0]), /* 1 */ + asn_DEF_PlayerInfoData_tags_1, /* Same as above */ + sizeof(asn_DEF_PlayerInfoData_tags_1) + /sizeof(asn_DEF_PlayerInfoData_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_PlayerInfoData_1, + 3, /* Elements count */ + &asn_SPC_PlayerInfoData_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PlayerInfoData.h b/src/third_party/asn1/PlayerInfoData.h new file mode 100644 index 00000000..a7de8f43 --- /dev/null +++ b/src/third_party/asn1/PlayerInfoData.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PlayerInfoData_H_ +#define _PlayerInfoData_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include "AvatarType.h" +#include "AvatarHash.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PlayerInfoData */ +typedef struct PlayerInfoData { + UTF8String_t playerName; + BOOLEAN_t isHuman; + struct avatarData { + AvatarType_t avatarType; + AvatarHash_t avatar; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *avatarData; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PlayerInfoData_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlayerInfoData; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlayerInfoData_H_ */ diff --git a/src/third_party/asn1/PlayerInfoReplyMessage.c b/src/third_party/asn1/PlayerInfoReplyMessage.c new file mode 100644 index 00000000..32b98788 --- /dev/null +++ b/src/third_party/asn1/PlayerInfoReplyMessage.c @@ -0,0 +1,129 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PlayerInfoReplyMessage.h" + +static asn_TYPE_member_t asn_MBR_playerInfoResult_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct playerInfoResult, choice.playerInfoData), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PlayerInfoData, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerInfoData" + }, + { ATF_NOFLAGS, 0, offsetof(struct playerInfoResult, choice.unknownPlayerInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UnknownPlayerInfo, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "unknownPlayerInfo" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_playerInfoResult_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* playerInfoData at 182 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* unknownPlayerInfo at 184 */ +}; +static asn_CHOICE_specifics_t asn_SPC_playerInfoResult_specs_3 = { + sizeof(struct playerInfoResult), + offsetof(struct playerInfoResult, _asn_ctx), + offsetof(struct playerInfoResult, present), + sizeof(((struct playerInfoResult *)0)->present), + asn_MAP_playerInfoResult_tag2el_3, + 2, /* Count of tags in the map */ + 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_playerInfoResult_3 = { + "playerInfoResult", + "playerInfoResult", + 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 */ + 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_playerInfoResult_3, + 2, /* Elements count */ + &asn_SPC_playerInfoResult_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_PlayerInfoReplyMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PlayerInfoReplyMessage, playerId), + (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, + "playerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayerInfoReplyMessage, playerInfoResult), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_playerInfoResult_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerInfoResult" + }, +}; +static ber_tlv_tag_t asn_DEF_PlayerInfoReplyMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (6 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_PlayerInfoReplyMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* playerId at 180 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* playerInfoData at 182 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* unknownPlayerInfo at 184 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_PlayerInfoReplyMessage_specs_1 = { + sizeof(struct PlayerInfoReplyMessage), + offsetof(struct PlayerInfoReplyMessage, _asn_ctx), + asn_MAP_PlayerInfoReplyMessage_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_PlayerInfoReplyMessage = { + "PlayerInfoReplyMessage", + "PlayerInfoReplyMessage", + 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_PlayerInfoReplyMessage_tags_1, + sizeof(asn_DEF_PlayerInfoReplyMessage_tags_1) + /sizeof(asn_DEF_PlayerInfoReplyMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_PlayerInfoReplyMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_PlayerInfoReplyMessage_tags_1) + /sizeof(asn_DEF_PlayerInfoReplyMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_PlayerInfoReplyMessage_1, + 2, /* Elements count */ + &asn_SPC_PlayerInfoReplyMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PlayerInfoReplyMessage.h b/src/third_party/asn1/PlayerInfoReplyMessage.h new file mode 100644 index 00000000..5f9281ea --- /dev/null +++ b/src/third_party/asn1/PlayerInfoReplyMessage.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PlayerInfoReplyMessage_H_ +#define _PlayerInfoReplyMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "PlayerInfoData.h" +#include "UnknownPlayerInfo.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum playerInfoResult_PR { + playerInfoResult_PR_NOTHING, /* No components present */ + playerInfoResult_PR_playerInfoData, + playerInfoResult_PR_unknownPlayerInfo, + /* Extensions may appear below */ + +} playerInfoResult_PR; + +/* PlayerInfoReplyMessage */ +typedef struct PlayerInfoReplyMessage { + NonZeroId_t playerId; + struct playerInfoResult { + playerInfoResult_PR present; + union PlayerInfoReplyMessage__playerInfoResult_u { + PlayerInfoData_t playerInfoData; + UnknownPlayerInfo_t unknownPlayerInfo; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } playerInfoResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PlayerInfoReplyMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlayerInfoReplyMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlayerInfoReplyMessage_H_ */ diff --git a/src/third_party/asn1/PlayerInfoRequestMessage.c b/src/third_party/asn1/PlayerInfoRequestMessage.c new file mode 100644 index 00000000..95770931 --- /dev/null +++ b/src/third_party/asn1/PlayerInfoRequestMessage.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PlayerInfoRequestMessage.h" + +static asn_TYPE_member_t asn_MBR_PlayerInfoRequestMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PlayerInfoRequestMessage, playerId), + (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, + "playerId" + }, +}; +static ber_tlv_tag_t asn_DEF_PlayerInfoRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (5 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_PlayerInfoRequestMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 177 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_PlayerInfoRequestMessage_specs_1 = { + sizeof(struct PlayerInfoRequestMessage), + offsetof(struct PlayerInfoRequestMessage, _asn_ctx), + asn_MAP_PlayerInfoRequestMessage_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_PlayerInfoRequestMessage = { + "PlayerInfoRequestMessage", + "PlayerInfoRequestMessage", + 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_PlayerInfoRequestMessage_tags_1, + sizeof(asn_DEF_PlayerInfoRequestMessage_tags_1) + /sizeof(asn_DEF_PlayerInfoRequestMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_PlayerInfoRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_PlayerInfoRequestMessage_tags_1) + /sizeof(asn_DEF_PlayerInfoRequestMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_PlayerInfoRequestMessage_1, + 1, /* Elements count */ + &asn_SPC_PlayerInfoRequestMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PlayerInfoRequestMessage.h b/src/third_party/asn1/PlayerInfoRequestMessage.h new file mode 100644 index 00000000..3ef7a25b --- /dev/null +++ b/src/third_party/asn1/PlayerInfoRequestMessage.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PlayerInfoRequestMessage_H_ +#define _PlayerInfoRequestMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PlayerInfoRequestMessage */ +typedef struct PlayerInfoRequestMessage { + NonZeroId_t playerId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PlayerInfoRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlayerInfoRequestMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlayerInfoRequestMessage_H_ */ diff --git a/src/third_party/asn1/PlayerResult.c b/src/third_party/asn1/PlayerResult.c new file mode 100644 index 00000000..acec30fe --- /dev/null +++ b/src/third_party/asn1/PlayerResult.c @@ -0,0 +1,300 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PlayerResult.h" + +static int +memb_resultCards_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)) { + /* 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 int +memb_bestHandPosition_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 == 5)) { + /* 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 int +memb_moneyWon_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_playerMoney_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } 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_resultCards_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Card, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_resultCards_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_resultCards_specs_3 = { + sizeof(struct resultCards), + offsetof(struct resultCards, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_resultCards_3 = { + "resultCards", + "resultCards", + 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_resultCards_tags_3, + sizeof(asn_DEF_resultCards_tags_3) + /sizeof(asn_DEF_resultCards_tags_3[0]), /* 1 */ + asn_DEF_resultCards_tags_3, /* Same as above */ + sizeof(asn_DEF_resultCards_tags_3) + /sizeof(asn_DEF_resultCards_tags_3[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_resultCards_3, + 1, /* Single element */ + &asn_SPC_resultCards_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_bestHandPosition_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_bestHandPosition_tags_5[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_bestHandPosition_specs_5 = { + sizeof(struct bestHandPosition), + offsetof(struct bestHandPosition, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_bestHandPosition_5 = { + "bestHandPosition", + "bestHandPosition", + 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_bestHandPosition_tags_5, + sizeof(asn_DEF_bestHandPosition_tags_5) + /sizeof(asn_DEF_bestHandPosition_tags_5[0]), /* 1 */ + asn_DEF_bestHandPosition_tags_5, /* Same as above */ + sizeof(asn_DEF_bestHandPosition_tags_5) + /sizeof(asn_DEF_bestHandPosition_tags_5[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_bestHandPosition_5, + 1, /* Single element */ + &asn_SPC_bestHandPosition_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_PlayerResult_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PlayerResult, playerId), + (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, + "playerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayerResult, resultCards), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_resultCards_3, + memb_resultCards_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "resultCards" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayerResult, bestHandPosition), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_bestHandPosition_5, + memb_bestHandPosition_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "bestHandPosition" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayerResult, cardsValue), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "cardsValue" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayerResult, moneyWon), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_moneyWon_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "moneyWon" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayerResult, playerMoney), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_playerMoney_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerMoney" + }, +}; +static ber_tlv_tag_t asn_DEF_PlayerResult_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_PlayerResult_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 3 }, /* playerId at 403 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -1, 2 }, /* cardsValue at 406 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -2, 1 }, /* moneyWon at 407 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 5, -3, 0 }, /* playerMoney at 408 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* resultCards at 404 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* bestHandPosition at 405 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_PlayerResult_specs_1 = { + sizeof(struct PlayerResult), + offsetof(struct PlayerResult, _asn_ctx), + asn_MAP_PlayerResult_tag2el_1, + 6, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 5, /* Start extensions */ + 7 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_PlayerResult = { + "PlayerResult", + "PlayerResult", + 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_PlayerResult_tags_1, + sizeof(asn_DEF_PlayerResult_tags_1) + /sizeof(asn_DEF_PlayerResult_tags_1[0]), /* 1 */ + asn_DEF_PlayerResult_tags_1, /* Same as above */ + sizeof(asn_DEF_PlayerResult_tags_1) + /sizeof(asn_DEF_PlayerResult_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_PlayerResult_1, + 6, /* Elements count */ + &asn_SPC_PlayerResult_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PlayerResult.h b/src/third_party/asn1/PlayerResult.h new file mode 100644 index 00000000..6665854b --- /dev/null +++ b/src/third_party/asn1/PlayerResult.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PlayerResult_H_ +#define _PlayerResult_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include +#include "Card.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PlayerResult */ +typedef struct PlayerResult { + NonZeroId_t playerId; + struct resultCards { + A_SEQUENCE_OF(Card_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } resultCards; + struct bestHandPosition { + A_SEQUENCE_OF(long) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } bestHandPosition; + long cardsValue; + long moneyWon; + long playerMoney; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PlayerResult_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlayerResult; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlayerResult_H_ */ diff --git a/src/third_party/asn1/PlayersActionDoneMessage.c b/src/third_party/asn1/PlayersActionDoneMessage.c new file mode 100644 index 00000000..ccc2531c --- /dev/null +++ b/src/third_party/asn1/PlayersActionDoneMessage.c @@ -0,0 +1,231 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PlayersActionDoneMessage.h" + +static int +memb_totalPlayerBet_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_playerMoney_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_highestSet_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_minimumRaise_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } 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_PlayersActionDoneMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, playerId), + (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, + "playerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, gameState), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_GameState, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameState" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, playerAction), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_PlayerAction, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerAction" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, totalPlayerBet), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_totalPlayerBet_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "totalPlayerBet" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, playerMoney), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_playerMoney_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerMoney" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, highestSet), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_highestSet_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "highestSet" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, minimumRaise), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_minimumRaise_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "minimumRaise" + }, +}; +static ber_tlv_tag_t asn_DEF_PlayersActionDoneMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (20 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_PlayersActionDoneMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 5 }, /* gameId at 355 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 4 }, /* playerId at 356 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -2, 3 }, /* totalPlayerBet at 359 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 5, -3, 2 }, /* playerMoney at 360 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -4, 1 }, /* highestSet at 361 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 7, -5, 0 }, /* minimumRaise at 362 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 1 }, /* gameState at 357 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, -1, 0 } /* playerAction at 358 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_PlayersActionDoneMessage_specs_1 = { + sizeof(struct PlayersActionDoneMessage), + offsetof(struct PlayersActionDoneMessage, _asn_ctx), + asn_MAP_PlayersActionDoneMessage_tag2el_1, + 8, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 7, /* Start extensions */ + 9 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_PlayersActionDoneMessage = { + "PlayersActionDoneMessage", + "PlayersActionDoneMessage", + 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_PlayersActionDoneMessage_tags_1, + sizeof(asn_DEF_PlayersActionDoneMessage_tags_1) + /sizeof(asn_DEF_PlayersActionDoneMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_PlayersActionDoneMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_PlayersActionDoneMessage_tags_1) + /sizeof(asn_DEF_PlayersActionDoneMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_PlayersActionDoneMessage_1, + 8, /* Elements count */ + &asn_SPC_PlayersActionDoneMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PlayersActionDoneMessage.h b/src/third_party/asn1/PlayersActionDoneMessage.h new file mode 100644 index 00000000..91110133 --- /dev/null +++ b/src/third_party/asn1/PlayersActionDoneMessage.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PlayersActionDoneMessage_H_ +#define _PlayersActionDoneMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "GameState.h" +#include "PlayerAction.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PlayersActionDoneMessage */ +typedef struct PlayersActionDoneMessage { + NonZeroId_t gameId; + NonZeroId_t playerId; + GameState_t gameState; + PlayerAction_t playerAction; + long totalPlayerBet; + long playerMoney; + long highestSet; + long minimumRaise; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PlayersActionDoneMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlayersActionDoneMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlayersActionDoneMessage_H_ */ diff --git a/src/third_party/asn1/PlayersTurnMessage.c b/src/third_party/asn1/PlayersTurnMessage.c new file mode 100644 index 00000000..58c403ec --- /dev/null +++ b/src/third_party/asn1/PlayersTurnMessage.c @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PlayersTurnMessage.h" + +static asn_TYPE_member_t asn_MBR_PlayersTurnMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PlayersTurnMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersTurnMessage, playerId), + (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, + "playerId" + }, + { ATF_NOFLAGS, 0, offsetof(struct PlayersTurnMessage, gameState), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_GameState, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameState" + }, +}; +static ber_tlv_tag_t asn_DEF_PlayersTurnMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (17 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_PlayersTurnMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 330 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* playerId at 331 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 } /* gameState at 333 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_PlayersTurnMessage_specs_1 = { + sizeof(struct PlayersTurnMessage), + offsetof(struct PlayersTurnMessage, _asn_ctx), + asn_MAP_PlayersTurnMessage_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* Start extensions */ + 4 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_PlayersTurnMessage = { + "PlayersTurnMessage", + "PlayersTurnMessage", + 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_PlayersTurnMessage_tags_1, + sizeof(asn_DEF_PlayersTurnMessage_tags_1) + /sizeof(asn_DEF_PlayersTurnMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_PlayersTurnMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_PlayersTurnMessage_tags_1) + /sizeof(asn_DEF_PlayersTurnMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_PlayersTurnMessage_1, + 3, /* Elements count */ + &asn_SPC_PlayersTurnMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PlayersTurnMessage.h b/src/third_party/asn1/PlayersTurnMessage.h new file mode 100644 index 00000000..22960bf0 --- /dev/null +++ b/src/third_party/asn1/PlayersTurnMessage.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PlayersTurnMessage_H_ +#define _PlayersTurnMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "GameState.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PlayersTurnMessage */ +typedef struct PlayersTurnMessage { + NonZeroId_t gameId; + NonZeroId_t playerId; + GameState_t gameState; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PlayersTurnMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlayersTurnMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlayersTurnMessage_H_ */ diff --git a/src/third_party/asn1/PokerTHMessage.c b/src/third_party/asn1/PokerTHMessage.c new file mode 100644 index 00000000..9d8df504 --- /dev/null +++ b/src/third_party/asn1/PokerTHMessage.c @@ -0,0 +1,366 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "PokerTHMessage.h" + +static asn_TYPE_member_t asn_MBR_PokerTHMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.initMessage), + (ASN_TAG_CLASS_APPLICATION | (0 << 2)), + 0, + &asn_DEF_InitMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "initMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.initAckMessage), + (ASN_TAG_CLASS_APPLICATION | (1 << 2)), + 0, + &asn_DEF_InitAckMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "initAckMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.avatarRequestMessage), + (ASN_TAG_CLASS_APPLICATION | (2 << 2)), + 0, + &asn_DEF_AvatarRequestMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarRequestMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.avatarReplyMessage), + (ASN_TAG_CLASS_APPLICATION | (3 << 2)), + 0, + &asn_DEF_AvatarReplyMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "avatarReplyMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.gameListMessage), + (ASN_TAG_CLASS_APPLICATION | (4 << 2)), + 0, + &asn_DEF_GameListMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameListMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.playerInfoRequestMessage), + (ASN_TAG_CLASS_APPLICATION | (5 << 2)), + 0, + &asn_DEF_PlayerInfoRequestMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerInfoRequestMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.playerInfoReplyMessage), + (ASN_TAG_CLASS_APPLICATION | (6 << 2)), + 0, + &asn_DEF_PlayerInfoReplyMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playerInfoReplyMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.subscriptionRequestMessage), + (ASN_TAG_CLASS_APPLICATION | (7 << 2)), + 0, + &asn_DEF_SubscriptionRequestMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "subscriptionRequestMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.joinGameRequestMessage), + (ASN_TAG_CLASS_APPLICATION | (8 << 2)), + 0, + &asn_DEF_JoinGameRequestMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinGameRequestMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.joinGameReplyMessage), + (ASN_TAG_CLASS_APPLICATION | (9 << 2)), + 0, + &asn_DEF_JoinGameReplyMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "joinGameReplyMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.gamePlayerMessage), + (ASN_TAG_CLASS_APPLICATION | (10 << 2)), + 0, + &asn_DEF_GamePlayerMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gamePlayerMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.kickPlayerRequestMessage), + (ASN_TAG_CLASS_APPLICATION | (11 << 2)), + 0, + &asn_DEF_KickPlayerRequestMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "kickPlayerRequestMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.leaveGameRequestMessage), + (ASN_TAG_CLASS_APPLICATION | (12 << 2)), + 0, + &asn_DEF_LeaveGameRequestMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "leaveGameRequestMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.startEventMessage), + (ASN_TAG_CLASS_APPLICATION | (13 << 2)), + 0, + &asn_DEF_StartEventMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "startEventMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.startEventAckMessage), + (ASN_TAG_CLASS_APPLICATION | (14 << 2)), + 0, + &asn_DEF_StartEventAckMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "startEventAckMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.gameStartMessage), + (ASN_TAG_CLASS_APPLICATION | (15 << 2)), + 0, + &asn_DEF_GameStartMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameStartMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.handStartMessage), + (ASN_TAG_CLASS_APPLICATION | (16 << 2)), + 0, + &asn_DEF_HandStartMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "handStartMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.playersTurnMessage), + (ASN_TAG_CLASS_APPLICATION | (17 << 2)), + 0, + &asn_DEF_PlayersTurnMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playersTurnMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.myActionRequestMessage), + (ASN_TAG_CLASS_APPLICATION | (18 << 2)), + 0, + &asn_DEF_MyActionRequestMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "myActionRequestMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.yourActionRejectedMessage), + (ASN_TAG_CLASS_APPLICATION | (19 << 2)), + 0, + &asn_DEF_YourActionRejectedMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "yourActionRejectedMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.playersActionDoneMessage), + (ASN_TAG_CLASS_APPLICATION | (20 << 2)), + 0, + &asn_DEF_PlayersActionDoneMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "playersActionDoneMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.dealFlopCardsMessage), + (ASN_TAG_CLASS_APPLICATION | (21 << 2)), + 0, + &asn_DEF_DealFlopCardsMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dealFlopCardsMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.dealTurnCardMessage), + (ASN_TAG_CLASS_APPLICATION | (22 << 2)), + 0, + &asn_DEF_DealTurnCardMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dealTurnCardMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.dealRiverCardMessage), + (ASN_TAG_CLASS_APPLICATION | (23 << 2)), + 0, + &asn_DEF_DealRiverCardMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dealRiverCardMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.allInShowCardsMessage), + (ASN_TAG_CLASS_APPLICATION | (24 << 2)), + 0, + &asn_DEF_AllInShowCardsMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "allInShowCardsMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.endOfHandMessage), + (ASN_TAG_CLASS_APPLICATION | (25 << 2)), + 0, + &asn_DEF_EndOfHandMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "endOfHandMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.endOfGameMessage), + (ASN_TAG_CLASS_APPLICATION | (26 << 2)), + 0, + &asn_DEF_EndOfGameMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "endOfGameMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.statisticsMessage), + (ASN_TAG_CLASS_APPLICATION | (128 << 2)), + 0, + &asn_DEF_StatisticsMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "statisticsMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.chatRequestMessage), + (ASN_TAG_CLASS_APPLICATION | (129 << 2)), + 0, + &asn_DEF_ChatRequestMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "chatRequestMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.chatMessage), + (ASN_TAG_CLASS_APPLICATION | (130 << 2)), + 0, + &asn_DEF_ChatMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "chatMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.dialogMessage), + (ASN_TAG_CLASS_APPLICATION | (131 << 2)), + 0, + &asn_DEF_DialogMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dialogMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct PokerTHMessage, choice.errorMessage), + (ASN_TAG_CLASS_APPLICATION | (255 << 2)), + 0, + &asn_DEF_ErrorMessage, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "errorMessage" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_PokerTHMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_APPLICATION | (0 << 2)), 0, 0, 0 }, /* initMessage at 27 */ + { (ASN_TAG_CLASS_APPLICATION | (1 << 2)), 1, 0, 0 }, /* initAckMessage at 28 */ + { (ASN_TAG_CLASS_APPLICATION | (2 << 2)), 2, 0, 0 }, /* avatarRequestMessage at 29 */ + { (ASN_TAG_CLASS_APPLICATION | (3 << 2)), 3, 0, 0 }, /* avatarReplyMessage at 30 */ + { (ASN_TAG_CLASS_APPLICATION | (4 << 2)), 4, 0, 0 }, /* gameListMessage at 31 */ + { (ASN_TAG_CLASS_APPLICATION | (5 << 2)), 5, 0, 0 }, /* playerInfoRequestMessage at 32 */ + { (ASN_TAG_CLASS_APPLICATION | (6 << 2)), 6, 0, 0 }, /* playerInfoReplyMessage at 33 */ + { (ASN_TAG_CLASS_APPLICATION | (7 << 2)), 7, 0, 0 }, /* subscriptionRequestMessage at 34 */ + { (ASN_TAG_CLASS_APPLICATION | (8 << 2)), 8, 0, 0 }, /* joinGameRequestMessage at 35 */ + { (ASN_TAG_CLASS_APPLICATION | (9 << 2)), 9, 0, 0 }, /* joinGameReplyMessage at 36 */ + { (ASN_TAG_CLASS_APPLICATION | (10 << 2)), 10, 0, 0 }, /* gamePlayerMessage at 37 */ + { (ASN_TAG_CLASS_APPLICATION | (11 << 2)), 11, 0, 0 }, /* kickPlayerRequestMessage at 38 */ + { (ASN_TAG_CLASS_APPLICATION | (12 << 2)), 12, 0, 0 }, /* leaveGameRequestMessage at 39 */ + { (ASN_TAG_CLASS_APPLICATION | (13 << 2)), 13, 0, 0 }, /* startEventMessage at 40 */ + { (ASN_TAG_CLASS_APPLICATION | (14 << 2)), 14, 0, 0 }, /* startEventAckMessage at 41 */ + { (ASN_TAG_CLASS_APPLICATION | (15 << 2)), 15, 0, 0 }, /* gameStartMessage at 42 */ + { (ASN_TAG_CLASS_APPLICATION | (16 << 2)), 16, 0, 0 }, /* handStartMessage at 43 */ + { (ASN_TAG_CLASS_APPLICATION | (17 << 2)), 17, 0, 0 }, /* playersTurnMessage at 44 */ + { (ASN_TAG_CLASS_APPLICATION | (18 << 2)), 18, 0, 0 }, /* myActionRequestMessage at 45 */ + { (ASN_TAG_CLASS_APPLICATION | (19 << 2)), 19, 0, 0 }, /* yourActionRejectedMessage at 46 */ + { (ASN_TAG_CLASS_APPLICATION | (20 << 2)), 20, 0, 0 }, /* playersActionDoneMessage at 47 */ + { (ASN_TAG_CLASS_APPLICATION | (21 << 2)), 21, 0, 0 }, /* dealFlopCardsMessage at 48 */ + { (ASN_TAG_CLASS_APPLICATION | (22 << 2)), 22, 0, 0 }, /* dealTurnCardMessage at 49 */ + { (ASN_TAG_CLASS_APPLICATION | (23 << 2)), 23, 0, 0 }, /* dealRiverCardMessage at 50 */ + { (ASN_TAG_CLASS_APPLICATION | (24 << 2)), 24, 0, 0 }, /* allInShowCardsMessage at 51 */ + { (ASN_TAG_CLASS_APPLICATION | (25 << 2)), 25, 0, 0 }, /* endOfHandMessage at 52 */ + { (ASN_TAG_CLASS_APPLICATION | (26 << 2)), 26, 0, 0 }, /* endOfGameMessage at 53 */ + { (ASN_TAG_CLASS_APPLICATION | (128 << 2)), 27, 0, 0 }, /* statisticsMessage at 54 */ + { (ASN_TAG_CLASS_APPLICATION | (129 << 2)), 28, 0, 0 }, /* chatRequestMessage at 55 */ + { (ASN_TAG_CLASS_APPLICATION | (130 << 2)), 29, 0, 0 }, /* chatMessage at 56 */ + { (ASN_TAG_CLASS_APPLICATION | (131 << 2)), 30, 0, 0 }, /* dialogMessage at 57 */ + { (ASN_TAG_CLASS_APPLICATION | (255 << 2)), 31, 0, 0 } /* errorMessage at 59 */ +}; +static asn_CHOICE_specifics_t asn_SPC_PokerTHMessage_specs_1 = { + sizeof(struct PokerTHMessage), + offsetof(struct PokerTHMessage, _asn_ctx), + offsetof(struct PokerTHMessage, present), + sizeof(((struct PokerTHMessage *)0)->present), + asn_MAP_PokerTHMessage_tag2el_1, + 32, /* Count of tags in the map */ + 0, + 32 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_PokerTHMessage = { + "PokerTHMessage", + "PokerTHMessage", + 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 */ + 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_PokerTHMessage_1, + 32, /* Elements count */ + &asn_SPC_PokerTHMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/PokerTHMessage.h b/src/third_party/asn1/PokerTHMessage.h new file mode 100644 index 00000000..880af772 --- /dev/null +++ b/src/third_party/asn1/PokerTHMessage.h @@ -0,0 +1,144 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _PokerTHMessage_H_ +#define _PokerTHMessage_H_ + + +#include + +/* Including external dependencies */ +#include "InitMessage.h" +#include "InitAckMessage.h" +#include "AvatarRequestMessage.h" +#include "AvatarReplyMessage.h" +#include "GameListMessage.h" +#include "PlayerInfoRequestMessage.h" +#include "PlayerInfoReplyMessage.h" +#include "SubscriptionRequestMessage.h" +#include "JoinGameRequestMessage.h" +#include "JoinGameReplyMessage.h" +#include "GamePlayerMessage.h" +#include "KickPlayerRequestMessage.h" +#include "LeaveGameRequestMessage.h" +#include "StartEventMessage.h" +#include "StartEventAckMessage.h" +#include "GameStartMessage.h" +#include "HandStartMessage.h" +#include "PlayersTurnMessage.h" +#include "MyActionRequestMessage.h" +#include "YourActionRejectedMessage.h" +#include "PlayersActionDoneMessage.h" +#include "DealFlopCardsMessage.h" +#include "DealTurnCardMessage.h" +#include "DealRiverCardMessage.h" +#include "AllInShowCardsMessage.h" +#include "EndOfHandMessage.h" +#include "EndOfGameMessage.h" +#include "StatisticsMessage.h" +#include "ChatRequestMessage.h" +#include "ChatMessage.h" +#include "DialogMessage.h" +#include "ErrorMessage.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum PokerTHMessage_PR { + PokerTHMessage_PR_NOTHING, /* No components present */ + PokerTHMessage_PR_initMessage, + PokerTHMessage_PR_initAckMessage, + PokerTHMessage_PR_avatarRequestMessage, + PokerTHMessage_PR_avatarReplyMessage, + PokerTHMessage_PR_gameListMessage, + PokerTHMessage_PR_playerInfoRequestMessage, + PokerTHMessage_PR_playerInfoReplyMessage, + PokerTHMessage_PR_subscriptionRequestMessage, + PokerTHMessage_PR_joinGameRequestMessage, + PokerTHMessage_PR_joinGameReplyMessage, + PokerTHMessage_PR_gamePlayerMessage, + PokerTHMessage_PR_kickPlayerRequestMessage, + PokerTHMessage_PR_leaveGameRequestMessage, + PokerTHMessage_PR_startEventMessage, + PokerTHMessage_PR_startEventAckMessage, + PokerTHMessage_PR_gameStartMessage, + PokerTHMessage_PR_handStartMessage, + PokerTHMessage_PR_playersTurnMessage, + PokerTHMessage_PR_myActionRequestMessage, + PokerTHMessage_PR_yourActionRejectedMessage, + PokerTHMessage_PR_playersActionDoneMessage, + PokerTHMessage_PR_dealFlopCardsMessage, + PokerTHMessage_PR_dealTurnCardMessage, + PokerTHMessage_PR_dealRiverCardMessage, + PokerTHMessage_PR_allInShowCardsMessage, + PokerTHMessage_PR_endOfHandMessage, + PokerTHMessage_PR_endOfGameMessage, + PokerTHMessage_PR_statisticsMessage, + PokerTHMessage_PR_chatRequestMessage, + PokerTHMessage_PR_chatMessage, + PokerTHMessage_PR_dialogMessage, + PokerTHMessage_PR_errorMessage, + /* Extensions may appear below */ + +} PokerTHMessage_PR; + +/* PokerTHMessage */ +typedef struct PokerTHMessage { + PokerTHMessage_PR present; + union PokerTHMessage_u { + InitMessage_t initMessage; + InitAckMessage_t initAckMessage; + AvatarRequestMessage_t avatarRequestMessage; + AvatarReplyMessage_t avatarReplyMessage; + GameListMessage_t gameListMessage; + PlayerInfoRequestMessage_t playerInfoRequestMessage; + PlayerInfoReplyMessage_t playerInfoReplyMessage; + SubscriptionRequestMessage_t subscriptionRequestMessage; + JoinGameRequestMessage_t joinGameRequestMessage; + JoinGameReplyMessage_t joinGameReplyMessage; + GamePlayerMessage_t gamePlayerMessage; + KickPlayerRequestMessage_t kickPlayerRequestMessage; + LeaveGameRequestMessage_t leaveGameRequestMessage; + StartEventMessage_t startEventMessage; + StartEventAckMessage_t startEventAckMessage; + GameStartMessage_t gameStartMessage; + HandStartMessage_t handStartMessage; + PlayersTurnMessage_t playersTurnMessage; + MyActionRequestMessage_t myActionRequestMessage; + YourActionRejectedMessage_t yourActionRejectedMessage; + PlayersActionDoneMessage_t playersActionDoneMessage; + DealFlopCardsMessage_t dealFlopCardsMessage; + DealTurnCardMessage_t dealTurnCardMessage; + DealRiverCardMessage_t dealRiverCardMessage; + AllInShowCardsMessage_t allInShowCardsMessage; + EndOfHandMessage_t endOfHandMessage; + EndOfGameMessage_t endOfGameMessage; + StatisticsMessage_t statisticsMessage; + ChatRequestMessage_t chatRequestMessage; + ChatMessage_t chatMessage; + DialogMessage_t dialogMessage; + ErrorMessage_t errorMessage; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PokerTHMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PokerTHMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _PokerTHMessage_H_ */ diff --git a/src/third_party/asn1/RemovedFromGame.c b/src/third_party/asn1/RemovedFromGame.c new file mode 100644 index 00000000..f7095116 --- /dev/null +++ b/src/third_party/asn1/RemovedFromGame.c @@ -0,0 +1,183 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "RemovedFromGame.h" + +static int +removedFromGameReason_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +removedFromGameReason_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +static void +removedFromGameReason_2_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + removedFromGameReason_2_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +static int +removedFromGameReason_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + removedFromGameReason_2_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +static asn_dec_rval_t +removedFromGameReason_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + removedFromGameReason_2_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +static asn_enc_rval_t +removedFromGameReason_2_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + removedFromGameReason_2_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +static asn_dec_rval_t +removedFromGameReason_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + removedFromGameReason_2_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +static asn_enc_rval_t +removedFromGameReason_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + removedFromGameReason_2_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_removedFromGameReason_value2enum_2[] = { + { 0, 16, "removedOnRequest" }, + { 1, 14, "kickedFromGame" }, + { 2, 10, "gameIsFull" }, + { 3, 13, "gameIsRunning" }, + { 4, 11, "gameTimeout" } +}; +static unsigned int asn_MAP_removedFromGameReason_enum2value_2[] = { + 2, /* gameIsFull(2) */ + 3, /* gameIsRunning(3) */ + 4, /* gameTimeout(4) */ + 1, /* kickedFromGame(1) */ + 0 /* removedOnRequest(0) */ +}; +static asn_INTEGER_specifics_t asn_SPC_removedFromGameReason_specs_2 = { + asn_MAP_removedFromGameReason_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_removedFromGameReason_enum2value_2, /* N => "tag"; sorted by N */ + 5, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_removedFromGameReason_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_removedFromGameReason_2 = { + "removedFromGameReason", + "removedFromGameReason", + removedFromGameReason_2_free, + removedFromGameReason_2_print, + removedFromGameReason_2_constraint, + removedFromGameReason_2_decode_ber, + removedFromGameReason_2_encode_der, + removedFromGameReason_2_decode_xer, + removedFromGameReason_2_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_removedFromGameReason_tags_2, + sizeof(asn_DEF_removedFromGameReason_tags_2) + /sizeof(asn_DEF_removedFromGameReason_tags_2[0]), /* 1 */ + asn_DEF_removedFromGameReason_tags_2, /* Same as above */ + sizeof(asn_DEF_removedFromGameReason_tags_2) + /sizeof(asn_DEF_removedFromGameReason_tags_2[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_removedFromGameReason_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_RemovedFromGame_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RemovedFromGame, removedFromGameReason), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_removedFromGameReason_2, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "removedFromGameReason" + }, +}; +static ber_tlv_tag_t asn_DEF_RemovedFromGame_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_RemovedFromGame_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* removedFromGameReason at 291 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RemovedFromGame_specs_1 = { + sizeof(struct RemovedFromGame), + offsetof(struct RemovedFromGame, _asn_ctx), + asn_MAP_RemovedFromGame_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_RemovedFromGame = { + "RemovedFromGame", + "RemovedFromGame", + 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_RemovedFromGame_tags_1, + sizeof(asn_DEF_RemovedFromGame_tags_1) + /sizeof(asn_DEF_RemovedFromGame_tags_1[0]), /* 1 */ + asn_DEF_RemovedFromGame_tags_1, /* Same as above */ + sizeof(asn_DEF_RemovedFromGame_tags_1) + /sizeof(asn_DEF_RemovedFromGame_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_RemovedFromGame_1, + 1, /* Elements count */ + &asn_SPC_RemovedFromGame_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/RemovedFromGame.h b/src/third_party/asn1/RemovedFromGame.h new file mode 100644 index 00000000..3e9e4f86 --- /dev/null +++ b/src/third_party/asn1/RemovedFromGame.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _RemovedFromGame_H_ +#define _RemovedFromGame_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum removedFromGameReason { + removedFromGameReason_removedOnRequest = 0, + removedFromGameReason_kickedFromGame = 1, + removedFromGameReason_gameIsFull = 2, + removedFromGameReason_gameIsRunning = 3, + removedFromGameReason_gameTimeout = 4 +} e_removedFromGameReason; + +/* RemovedFromGame */ +typedef struct RemovedFromGame { + long removedFromGameReason; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RemovedFromGame_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_removedFromGameReason_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_RemovedFromGame; + +#ifdef __cplusplus +} +#endif + +#endif /* _RemovedFromGame_H_ */ diff --git a/src/third_party/asn1/StartEventAckMessage.c b/src/third_party/asn1/StartEventAckMessage.c new file mode 100644 index 00000000..faf27522 --- /dev/null +++ b/src/third_party/asn1/StartEventAckMessage.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "StartEventAckMessage.h" + +static asn_TYPE_member_t asn_MBR_StartEventAckMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct StartEventAckMessage, gameId), + (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, + "gameId" + }, +}; +static ber_tlv_tag_t asn_DEF_StartEventAckMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (14 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_StartEventAckMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 315 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_StartEventAckMessage_specs_1 = { + sizeof(struct StartEventAckMessage), + offsetof(struct StartEventAckMessage, _asn_ctx), + asn_MAP_StartEventAckMessage_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_StartEventAckMessage = { + "StartEventAckMessage", + "StartEventAckMessage", + 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_StartEventAckMessage_tags_1, + sizeof(asn_DEF_StartEventAckMessage_tags_1) + /sizeof(asn_DEF_StartEventAckMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_StartEventAckMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_StartEventAckMessage_tags_1) + /sizeof(asn_DEF_StartEventAckMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_StartEventAckMessage_1, + 1, /* Elements count */ + &asn_SPC_StartEventAckMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/StartEventAckMessage.h b/src/third_party/asn1/StartEventAckMessage.h new file mode 100644 index 00000000..95e1d49b --- /dev/null +++ b/src/third_party/asn1/StartEventAckMessage.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _StartEventAckMessage_H_ +#define _StartEventAckMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* StartEventAckMessage */ +typedef struct StartEventAckMessage { + NonZeroId_t gameId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} StartEventAckMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_StartEventAckMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _StartEventAckMessage_H_ */ diff --git a/src/third_party/asn1/StartEventMessage.c b/src/third_party/asn1/StartEventMessage.c new file mode 100644 index 00000000..0dc1f4d6 --- /dev/null +++ b/src/third_party/asn1/StartEventMessage.c @@ -0,0 +1,71 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "StartEventMessage.h" + +static asn_TYPE_member_t asn_MBR_StartEventMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct StartEventMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct StartEventMessage, fillWithComputerPlayers), + (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), + 0, + &asn_DEF_BOOLEAN, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "fillWithComputerPlayers" + }, +}; +static ber_tlv_tag_t asn_DEF_StartEventMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (13 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_StartEventMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* fillWithComputerPlayers at 310 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 309 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_StartEventMessage_specs_1 = { + sizeof(struct StartEventMessage), + offsetof(struct StartEventMessage, _asn_ctx), + asn_MAP_StartEventMessage_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_StartEventMessage = { + "StartEventMessage", + "StartEventMessage", + 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_StartEventMessage_tags_1, + sizeof(asn_DEF_StartEventMessage_tags_1) + /sizeof(asn_DEF_StartEventMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_StartEventMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_StartEventMessage_tags_1) + /sizeof(asn_DEF_StartEventMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_StartEventMessage_1, + 2, /* Elements count */ + &asn_SPC_StartEventMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/StartEventMessage.h b/src/third_party/asn1/StartEventMessage.h new file mode 100644 index 00000000..0301866f --- /dev/null +++ b/src/third_party/asn1/StartEventMessage.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _StartEventMessage_H_ +#define _StartEventMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* StartEventMessage */ +typedef struct StartEventMessage { + NonZeroId_t gameId; + BOOLEAN_t fillWithComputerPlayers; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} StartEventMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_StartEventMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _StartEventMessage_H_ */ diff --git a/src/third_party/asn1/StatisticsData.c b/src/third_party/asn1/StatisticsData.c new file mode 100644 index 00000000..ea9cf972 --- /dev/null +++ b/src/third_party/asn1/StatisticsData.c @@ -0,0 +1,185 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "StatisticsData.h" + +static int +statisticsType_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +statisticsType_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +static void +statisticsType_2_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + statisticsType_2_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +static int +statisticsType_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + statisticsType_2_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +static asn_dec_rval_t +statisticsType_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + statisticsType_2_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +static asn_enc_rval_t +statisticsType_2_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + statisticsType_2_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +static asn_dec_rval_t +statisticsType_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + statisticsType_2_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +static asn_enc_rval_t +statisticsType_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + statisticsType_2_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_statisticsType_value2enum_2[] = { + { 1, 19, "statNumberOfPlayers" } +}; +static unsigned int asn_MAP_statisticsType_enum2value_2[] = { + 0 /* statNumberOfPlayers(1) */ +}; +static asn_INTEGER_specifics_t asn_SPC_statisticsType_specs_2 = { + asn_MAP_statisticsType_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_statisticsType_enum2value_2, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_statisticsType_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_statisticsType_2 = { + "statisticsType", + "statisticsType", + statisticsType_2_free, + statisticsType_2_print, + statisticsType_2_constraint, + statisticsType_2_decode_ber, + statisticsType_2_encode_der, + statisticsType_2_decode_xer, + statisticsType_2_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_statisticsType_tags_2, + sizeof(asn_DEF_statisticsType_tags_2) + /sizeof(asn_DEF_statisticsType_tags_2[0]), /* 1 */ + asn_DEF_statisticsType_tags_2, /* Same as above */ + sizeof(asn_DEF_statisticsType_tags_2) + /sizeof(asn_DEF_statisticsType_tags_2[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_statisticsType_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_StatisticsData_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct StatisticsData, statisticsType), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_statisticsType_2, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "statisticsType" + }, + { ATF_NOFLAGS, 0, offsetof(struct StatisticsData, statisticsValue), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "statisticsValue" + }, +}; +static ber_tlv_tag_t asn_DEF_StatisticsData_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_StatisticsData_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* statisticsValue at 431 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* statisticsType at 428 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_StatisticsData_specs_1 = { + sizeof(struct StatisticsData), + offsetof(struct StatisticsData, _asn_ctx), + asn_MAP_StatisticsData_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_StatisticsData = { + "StatisticsData", + "StatisticsData", + 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_StatisticsData_tags_1, + sizeof(asn_DEF_StatisticsData_tags_1) + /sizeof(asn_DEF_StatisticsData_tags_1[0]), /* 1 */ + asn_DEF_StatisticsData_tags_1, /* Same as above */ + sizeof(asn_DEF_StatisticsData_tags_1) + /sizeof(asn_DEF_StatisticsData_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_StatisticsData_1, + 2, /* Elements count */ + &asn_SPC_StatisticsData_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/StatisticsData.h b/src/third_party/asn1/StatisticsData.h new file mode 100644 index 00000000..e9e64156 --- /dev/null +++ b/src/third_party/asn1/StatisticsData.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _StatisticsData_H_ +#define _StatisticsData_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum statisticsType { + statisticsType_statNumberOfPlayers = 1 +} e_statisticsType; + +/* StatisticsData */ +typedef struct StatisticsData { + long statisticsType; + long statisticsValue; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} StatisticsData_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_statisticsType_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_StatisticsData; + +#ifdef __cplusplus +} +#endif + +#endif /* _StatisticsData_H_ */ diff --git a/src/third_party/asn1/StatisticsLogin.c b/src/third_party/asn1/StatisticsLogin.c new file mode 100644 index 00000000..8932c391 --- /dev/null +++ b/src/third_party/asn1/StatisticsLogin.c @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "StatisticsLogin.h" + +static ber_tlv_tag_t asn_DEF_StatisticsLogin_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SEQUENCE_specifics_t asn_SPC_StatisticsLogin_specs_1 = { + sizeof(struct StatisticsLogin), + offsetof(struct StatisticsLogin, _asn_ctx), + 0, /* No top level tags */ + 0, /* No tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_StatisticsLogin = { + "StatisticsLogin", + "StatisticsLogin", + 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_StatisticsLogin_tags_1, + sizeof(asn_DEF_StatisticsLogin_tags_1) + /sizeof(asn_DEF_StatisticsLogin_tags_1[0]), /* 1 */ + asn_DEF_StatisticsLogin_tags_1, /* Same as above */ + sizeof(asn_DEF_StatisticsLogin_tags_1) + /sizeof(asn_DEF_StatisticsLogin_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + &asn_SPC_StatisticsLogin_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/StatisticsLogin.h b/src/third_party/asn1/StatisticsLogin.h new file mode 100644 index 00000000..aee8ebb9 --- /dev/null +++ b/src/third_party/asn1/StatisticsLogin.h @@ -0,0 +1,38 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _StatisticsLogin_H_ +#define _StatisticsLogin_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* StatisticsLogin */ +typedef struct StatisticsLogin { + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} StatisticsLogin_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_StatisticsLogin; + +#ifdef __cplusplus +} +#endif + +#endif /* _StatisticsLogin_H_ */ diff --git a/src/third_party/asn1/StatisticsMessage.c b/src/third_party/asn1/StatisticsMessage.c new file mode 100644 index 00000000..edd41b48 --- /dev/null +++ b/src/third_party/asn1/StatisticsMessage.c @@ -0,0 +1,131 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "StatisticsMessage.h" + +static int +memb_statisticsData_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 >= 1 && size <= 32)) { + /* 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_statisticsData_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_StatisticsData, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_statisticsData_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_statisticsData_specs_2 = { + sizeof(struct statisticsData), + offsetof(struct statisticsData, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_statisticsData_2 = { + "statisticsData", + "statisticsData", + 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_statisticsData_tags_2, + sizeof(asn_DEF_statisticsData_tags_2) + /sizeof(asn_DEF_statisticsData_tags_2[0]), /* 1 */ + asn_DEF_statisticsData_tags_2, /* Same as above */ + sizeof(asn_DEF_statisticsData_tags_2) + /sizeof(asn_DEF_statisticsData_tags_2[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_statisticsData_2, + 1, /* Single element */ + &asn_SPC_statisticsData_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_StatisticsMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct StatisticsMessage, statisticsData), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_statisticsData_2, + memb_statisticsData_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "statisticsData" + }, +}; +static ber_tlv_tag_t asn_DEF_StatisticsMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (128 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_StatisticsMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* statisticsData at 424 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_StatisticsMessage_specs_1 = { + sizeof(struct StatisticsMessage), + offsetof(struct StatisticsMessage, _asn_ctx), + asn_MAP_StatisticsMessage_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_StatisticsMessage = { + "StatisticsMessage", + "StatisticsMessage", + 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_StatisticsMessage_tags_1, + sizeof(asn_DEF_StatisticsMessage_tags_1) + /sizeof(asn_DEF_StatisticsMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_StatisticsMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_StatisticsMessage_tags_1) + /sizeof(asn_DEF_StatisticsMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_StatisticsMessage_1, + 1, /* Elements count */ + &asn_SPC_StatisticsMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/StatisticsMessage.h b/src/third_party/asn1/StatisticsMessage.h new file mode 100644 index 00000000..dc99d2c8 --- /dev/null +++ b/src/third_party/asn1/StatisticsMessage.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _StatisticsMessage_H_ +#define _StatisticsMessage_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct StatisticsData; + +/* StatisticsMessage */ +typedef struct StatisticsMessage { + struct statisticsData { + A_SEQUENCE_OF(struct StatisticsData) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } statisticsData; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} StatisticsMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_StatisticsMessage; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "StatisticsData.h" + +#endif /* _StatisticsMessage_H_ */ diff --git a/src/third_party/asn1/SubscriptionRequestMessage.c b/src/third_party/asn1/SubscriptionRequestMessage.c new file mode 100644 index 00000000..815f06d3 --- /dev/null +++ b/src/third_party/asn1/SubscriptionRequestMessage.c @@ -0,0 +1,178 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "SubscriptionRequestMessage.h" + +static int +subscriptionAction_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +subscriptionAction_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +static void +subscriptionAction_2_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + subscriptionAction_2_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +static int +subscriptionAction_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + subscriptionAction_2_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +static asn_dec_rval_t +subscriptionAction_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + subscriptionAction_2_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +static asn_enc_rval_t +subscriptionAction_2_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + subscriptionAction_2_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +static asn_dec_rval_t +subscriptionAction_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + subscriptionAction_2_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +static asn_enc_rval_t +subscriptionAction_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + subscriptionAction_2_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static asn_INTEGER_enum_map_t asn_MAP_subscriptionAction_value2enum_2[] = { + { 1, 19, "unsubscribeGameList" }, + { 2, 19, "resubscribeGameList" } +}; +static unsigned int asn_MAP_subscriptionAction_enum2value_2[] = { + 1, /* resubscribeGameList(2) */ + 0 /* unsubscribeGameList(1) */ +}; +static asn_INTEGER_specifics_t asn_SPC_subscriptionAction_specs_2 = { + asn_MAP_subscriptionAction_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_subscriptionAction_enum2value_2, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_subscriptionAction_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_subscriptionAction_2 = { + "subscriptionAction", + "subscriptionAction", + subscriptionAction_2_free, + subscriptionAction_2_print, + subscriptionAction_2_constraint, + subscriptionAction_2_decode_ber, + subscriptionAction_2_encode_der, + subscriptionAction_2_decode_xer, + subscriptionAction_2_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_subscriptionAction_tags_2, + sizeof(asn_DEF_subscriptionAction_tags_2) + /sizeof(asn_DEF_subscriptionAction_tags_2[0]), /* 1 */ + asn_DEF_subscriptionAction_tags_2, /* Same as above */ + sizeof(asn_DEF_subscriptionAction_tags_2) + /sizeof(asn_DEF_subscriptionAction_tags_2[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_subscriptionAction_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_SubscriptionRequestMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SubscriptionRequestMessage, subscriptionAction), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_subscriptionAction_2, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "subscriptionAction" + }, +}; +static ber_tlv_tag_t asn_DEF_SubscriptionRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (7 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_SubscriptionRequestMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* subscriptionAction at 204 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_SubscriptionRequestMessage_specs_1 = { + sizeof(struct SubscriptionRequestMessage), + offsetof(struct SubscriptionRequestMessage, _asn_ctx), + asn_MAP_SubscriptionRequestMessage_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_SubscriptionRequestMessage = { + "SubscriptionRequestMessage", + "SubscriptionRequestMessage", + 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_SubscriptionRequestMessage_tags_1, + sizeof(asn_DEF_SubscriptionRequestMessage_tags_1) + /sizeof(asn_DEF_SubscriptionRequestMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_SubscriptionRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_SubscriptionRequestMessage_tags_1) + /sizeof(asn_DEF_SubscriptionRequestMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_SubscriptionRequestMessage_1, + 1, /* Elements count */ + &asn_SPC_SubscriptionRequestMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/SubscriptionRequestMessage.h b/src/third_party/asn1/SubscriptionRequestMessage.h new file mode 100644 index 00000000..323afa2d --- /dev/null +++ b/src/third_party/asn1/SubscriptionRequestMessage.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _SubscriptionRequestMessage_H_ +#define _SubscriptionRequestMessage_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum subscriptionAction { + subscriptionAction_unsubscribeGameList = 1, + subscriptionAction_resubscribeGameList = 2 +} e_subscriptionAction; + +/* SubscriptionRequestMessage */ +typedef struct SubscriptionRequestMessage { + long subscriptionAction; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SubscriptionRequestMessage_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_subscriptionAction_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_SubscriptionRequestMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _SubscriptionRequestMessage_H_ */ diff --git a/src/third_party/asn1/UTF8String.c b/src/third_party/asn1/UTF8String.c new file mode 120000 index 00000000..9e9fdcad --- /dev/null +++ b/src/third_party/asn1/UTF8String.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/UTF8String.c \ No newline at end of file diff --git a/src/third_party/asn1/UTF8String.h b/src/third_party/asn1/UTF8String.h new file mode 120000 index 00000000..51fd3311 --- /dev/null +++ b/src/third_party/asn1/UTF8String.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/UTF8String.h \ No newline at end of file diff --git a/src/third_party/asn1/UnknownAvatar.c b/src/third_party/asn1/UnknownAvatar.c new file mode 100644 index 00000000..fe3558af --- /dev/null +++ b/src/third_party/asn1/UnknownAvatar.c @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "UnknownAvatar.h" + +static ber_tlv_tag_t asn_DEF_UnknownAvatar_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SEQUENCE_specifics_t asn_SPC_UnknownAvatar_specs_1 = { + sizeof(struct UnknownAvatar), + offsetof(struct UnknownAvatar, _asn_ctx), + 0, /* No top level tags */ + 0, /* No tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_UnknownAvatar = { + "UnknownAvatar", + "UnknownAvatar", + 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_UnknownAvatar_tags_1, + sizeof(asn_DEF_UnknownAvatar_tags_1) + /sizeof(asn_DEF_UnknownAvatar_tags_1[0]), /* 1 */ + asn_DEF_UnknownAvatar_tags_1, /* Same as above */ + sizeof(asn_DEF_UnknownAvatar_tags_1) + /sizeof(asn_DEF_UnknownAvatar_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + &asn_SPC_UnknownAvatar_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/UnknownAvatar.h b/src/third_party/asn1/UnknownAvatar.h new file mode 100644 index 00000000..0378437e --- /dev/null +++ b/src/third_party/asn1/UnknownAvatar.h @@ -0,0 +1,38 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _UnknownAvatar_H_ +#define _UnknownAvatar_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* UnknownAvatar */ +typedef struct UnknownAvatar { + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UnknownAvatar_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UnknownAvatar; + +#ifdef __cplusplus +} +#endif + +#endif /* _UnknownAvatar_H_ */ diff --git a/src/third_party/asn1/UnknownPlayerInfo.c b/src/third_party/asn1/UnknownPlayerInfo.c new file mode 100644 index 00000000..bbd9d4fd --- /dev/null +++ b/src/third_party/asn1/UnknownPlayerInfo.c @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "UnknownPlayerInfo.h" + +static ber_tlv_tag_t asn_DEF_UnknownPlayerInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SEQUENCE_specifics_t asn_SPC_UnknownPlayerInfo_specs_1 = { + sizeof(struct UnknownPlayerInfo), + offsetof(struct UnknownPlayerInfo, _asn_ctx), + 0, /* No top level tags */ + 0, /* No tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_UnknownPlayerInfo = { + "UnknownPlayerInfo", + "UnknownPlayerInfo", + 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_UnknownPlayerInfo_tags_1, + sizeof(asn_DEF_UnknownPlayerInfo_tags_1) + /sizeof(asn_DEF_UnknownPlayerInfo_tags_1[0]), /* 1 */ + asn_DEF_UnknownPlayerInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_UnknownPlayerInfo_tags_1) + /sizeof(asn_DEF_UnknownPlayerInfo_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* No members */ + &asn_SPC_UnknownPlayerInfo_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/UnknownPlayerInfo.h b/src/third_party/asn1/UnknownPlayerInfo.h new file mode 100644 index 00000000..f53ac946 --- /dev/null +++ b/src/third_party/asn1/UnknownPlayerInfo.h @@ -0,0 +1,38 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _UnknownPlayerInfo_H_ +#define _UnknownPlayerInfo_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* UnknownPlayerInfo */ +typedef struct UnknownPlayerInfo { + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UnknownPlayerInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UnknownPlayerInfo; + +#ifdef __cplusplus +} +#endif + +#endif /* _UnknownPlayerInfo_H_ */ diff --git a/src/third_party/asn1/Version.c b/src/third_party/asn1/Version.c new file mode 100644 index 00000000..884f2c01 --- /dev/null +++ b/src/third_party/asn1/Version.c @@ -0,0 +1,120 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "Version.h" + +static int +memb_major_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_minor_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } 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_Version_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Version, major), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_major_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "major" + }, + { ATF_NOFLAGS, 0, offsetof(struct Version, minor), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_minor_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "minor" + }, +}; +static ber_tlv_tag_t asn_DEF_Version_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_Version_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* major at 71 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* minor at 72 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Version_specs_1 = { + sizeof(struct Version), + offsetof(struct Version, _asn_ctx), + asn_MAP_Version_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* Start extensions */ + 3 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_Version = { + "Version", + "Version", + 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_Version_tags_1, + sizeof(asn_DEF_Version_tags_1) + /sizeof(asn_DEF_Version_tags_1[0]), /* 1 */ + asn_DEF_Version_tags_1, /* Same as above */ + sizeof(asn_DEF_Version_tags_1) + /sizeof(asn_DEF_Version_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_Version_1, + 2, /* Elements count */ + &asn_SPC_Version_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/Version.h b/src/third_party/asn1/Version.h new file mode 100644 index 00000000..b462876e --- /dev/null +++ b/src/third_party/asn1/Version.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _Version_H_ +#define _Version_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Version */ +typedef struct Version { + long major; + long minor; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Version_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Version; + +#ifdef __cplusplus +} +#endif + +#endif /* _Version_H_ */ diff --git a/src/third_party/asn1/YourActionRejectedMessage.c b/src/third_party/asn1/YourActionRejectedMessage.c new file mode 100644 index 00000000..ec3a13a9 --- /dev/null +++ b/src/third_party/asn1/YourActionRejectedMessage.c @@ -0,0 +1,245 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#include + +#include "YourActionRejectedMessage.h" + +static int +rejectionReason_6_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static void +rejectionReason_6_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_NativeEnumerated.free_struct; + td->print_struct = asn_DEF_NativeEnumerated.print_struct; + td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; + td->der_encoder = asn_DEF_NativeEnumerated.der_encoder; + td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder; + td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder; + td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder; + td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_NativeEnumerated.per_constraints; + td->elements = asn_DEF_NativeEnumerated.elements; + td->elements_count = asn_DEF_NativeEnumerated.elements_count; + /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */ +} + +static void +rejectionReason_6_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + rejectionReason_6_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +static int +rejectionReason_6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + rejectionReason_6_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +static asn_dec_rval_t +rejectionReason_6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + rejectionReason_6_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +static asn_enc_rval_t +rejectionReason_6_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + rejectionReason_6_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +static asn_dec_rval_t +rejectionReason_6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + rejectionReason_6_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +static asn_enc_rval_t +rejectionReason_6_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + rejectionReason_6_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static int +memb_yourRelativeBet_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + _ASN_CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 10000000)) { + /* Constraint check succeeded */ + return 0; + } else { + _ASN_CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_INTEGER_enum_map_t asn_MAP_rejectionReason_value2enum_6[] = { + { 1, 24, "rejectedInvalidGameState" }, + { 2, 19, "rejectedNotYourTurn" }, + { 3, 24, "rejectedActionNotAllowed" } +}; +static unsigned int asn_MAP_rejectionReason_enum2value_6[] = { + 2, /* rejectedActionNotAllowed(3) */ + 0, /* rejectedInvalidGameState(1) */ + 1 /* rejectedNotYourTurn(2) */ +}; +static asn_INTEGER_specifics_t asn_SPC_rejectionReason_specs_6 = { + asn_MAP_rejectionReason_value2enum_6, /* "tag" => N; sorted by tag */ + asn_MAP_rejectionReason_enum2value_6, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static ber_tlv_tag_t asn_DEF_rejectionReason_tags_6[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_rejectionReason_6 = { + "rejectionReason", + "rejectionReason", + rejectionReason_6_free, + rejectionReason_6_print, + rejectionReason_6_constraint, + rejectionReason_6_decode_ber, + rejectionReason_6_encode_der, + rejectionReason_6_decode_xer, + rejectionReason_6_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_rejectionReason_tags_6, + sizeof(asn_DEF_rejectionReason_tags_6) + /sizeof(asn_DEF_rejectionReason_tags_6[0]), /* 1 */ + asn_DEF_rejectionReason_tags_6, /* Same as above */ + sizeof(asn_DEF_rejectionReason_tags_6) + /sizeof(asn_DEF_rejectionReason_tags_6[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + &asn_SPC_rejectionReason_specs_6 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_YourActionRejectedMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, gameId), + (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, + "gameId" + }, + { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, gameState), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_GameState, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "gameState" + }, + { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, yourAction), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_PlayerAction, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "yourAction" + }, + { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, yourRelativeBet), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + memb_yourRelativeBet_constraint_1, + 0, /* PER is not compiled, use -gen-PER */ + 0, + "yourRelativeBet" + }, + { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, rejectionReason), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_rejectionReason_6, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "rejectionReason" + }, +}; +static ber_tlv_tag_t asn_DEF_YourActionRejectedMessage_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (19 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_YourActionRejectedMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 343 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -1, 0 }, /* yourRelativeBet at 346 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 2 }, /* gameState at 344 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, -1, 1 }, /* yourAction at 345 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, -2, 0 } /* rejectionReason at 348 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_YourActionRejectedMessage_specs_1 = { + sizeof(struct YourActionRejectedMessage), + offsetof(struct YourActionRejectedMessage, _asn_ctx), + asn_MAP_YourActionRejectedMessage_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* Start extensions */ + 6 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_YourActionRejectedMessage = { + "YourActionRejectedMessage", + "YourActionRejectedMessage", + 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_YourActionRejectedMessage_tags_1, + sizeof(asn_DEF_YourActionRejectedMessage_tags_1) + /sizeof(asn_DEF_YourActionRejectedMessage_tags_1[0]) - 1, /* 1 */ + asn_DEF_YourActionRejectedMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_YourActionRejectedMessage_tags_1) + /sizeof(asn_DEF_YourActionRejectedMessage_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_YourActionRejectedMessage_1, + 5, /* Elements count */ + &asn_SPC_YourActionRejectedMessage_specs_1 /* Additional specs */ +}; + diff --git a/src/third_party/asn1/YourActionRejectedMessage.h b/src/third_party/asn1/YourActionRejectedMessage.h new file mode 100644 index 00000000..a524c2b2 --- /dev/null +++ b/src/third_party/asn1/YourActionRejectedMessage.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) + * From ASN.1 module "POKERTH-PROTOCOL" + * found in "../../../docs/pokerth.asn1" + */ + +#ifndef _YourActionRejectedMessage_H_ +#define _YourActionRejectedMessage_H_ + + +#include + +/* Including external dependencies */ +#include "NonZeroId.h" +#include "GameState.h" +#include "PlayerAction.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum rejectionReason { + rejectionReason_rejectedInvalidGameState = 1, + rejectionReason_rejectedNotYourTurn = 2, + rejectionReason_rejectedActionNotAllowed = 3 +} e_rejectionReason; + +/* YourActionRejectedMessage */ +typedef struct YourActionRejectedMessage { + NonZeroId_t gameId; + GameState_t gameState; + PlayerAction_t yourAction; + long yourRelativeBet; + long rejectionReason; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} YourActionRejectedMessage_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_rejectionReason_6; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_YourActionRejectedMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _YourActionRejectedMessage_H_ */ diff --git a/src/third_party/asn1/asn_SEQUENCE_OF.c b/src/third_party/asn1/asn_SEQUENCE_OF.c new file mode 120000 index 00000000..3648c20b --- /dev/null +++ b/src/third_party/asn1/asn_SEQUENCE_OF.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_SEQUENCE_OF.c \ No newline at end of file diff --git a/src/third_party/asn1/asn_SEQUENCE_OF.h b/src/third_party/asn1/asn_SEQUENCE_OF.h new file mode 120000 index 00000000..43753785 --- /dev/null +++ b/src/third_party/asn1/asn_SEQUENCE_OF.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_SEQUENCE_OF.h \ No newline at end of file diff --git a/src/third_party/asn1/asn_SET_OF.c b/src/third_party/asn1/asn_SET_OF.c new file mode 120000 index 00000000..26e22f74 --- /dev/null +++ b/src/third_party/asn1/asn_SET_OF.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_SET_OF.c \ No newline at end of file diff --git a/src/third_party/asn1/asn_SET_OF.h b/src/third_party/asn1/asn_SET_OF.h new file mode 120000 index 00000000..8fe48c78 --- /dev/null +++ b/src/third_party/asn1/asn_SET_OF.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_SET_OF.h \ No newline at end of file diff --git a/src/third_party/asn1/asn_application.h b/src/third_party/asn1/asn_application.h new file mode 120000 index 00000000..3f8b4055 --- /dev/null +++ b/src/third_party/asn1/asn_application.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_application.h \ No newline at end of file diff --git a/src/third_party/asn1/asn_codecs.h b/src/third_party/asn1/asn_codecs.h new file mode 120000 index 00000000..d192fd8b --- /dev/null +++ b/src/third_party/asn1/asn_codecs.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_codecs.h \ No newline at end of file diff --git a/src/third_party/asn1/asn_codecs_prim.c b/src/third_party/asn1/asn_codecs_prim.c new file mode 120000 index 00000000..3b0dbc73 --- /dev/null +++ b/src/third_party/asn1/asn_codecs_prim.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_codecs_prim.c \ No newline at end of file diff --git a/src/third_party/asn1/asn_codecs_prim.h b/src/third_party/asn1/asn_codecs_prim.h new file mode 120000 index 00000000..4ae399f1 --- /dev/null +++ b/src/third_party/asn1/asn_codecs_prim.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_codecs_prim.h \ No newline at end of file diff --git a/src/third_party/asn1/asn_internal.h b/src/third_party/asn1/asn_internal.h new file mode 120000 index 00000000..72c1e2c1 --- /dev/null +++ b/src/third_party/asn1/asn_internal.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_internal.h \ No newline at end of file diff --git a/src/third_party/asn1/asn_system.h b/src/third_party/asn1/asn_system.h new file mode 120000 index 00000000..d87213b2 --- /dev/null +++ b/src/third_party/asn1/asn_system.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/asn_system.h \ No newline at end of file diff --git a/src/third_party/asn1/asntest.c b/src/third_party/asn1/asntest.c new file mode 100755 index 00000000..0bb774b0 --- /dev/null +++ b/src/third_party/asn1/asntest.c @@ -0,0 +1,60 @@ +#include +#include + +#include "PokerTHMessage.h" + +ssize_t +simple_serializer(PokerTHMessage_t *msg, unsigned char *buf, size_t size) { + asn_enc_rval_t er; /* Encoder return value */ + er = der_encode_to_buffer(&asn_DEF_PokerTHMessage, msg, buf, size); + if(er.encoded == -1) { + /* + * Failed to encode the rectangle data. + */ + fprintf(stderr, "Cannot encode %s\n", er.failed_type->name); + return -1; + } else { + /* Return the number of bytes */ + return er.encoded; + } +} + +PokerTHMessage_t * +simple_deserializer(const unsigned char *buf, size_t size) { + PokerTHMessage_t *msg = 0; /* Note this 0! */ + asn_dec_rval_t rval; + rval = ber_decode(0, &asn_DEF_PokerTHMessage, (void **)&msg, buf, size); + if(rval.code == RC_OK) { + return msg; /* Decoding succeeded */ + } else { + /* Free partially decoded message */ + ASN_STRUCT_FREE(asn_DEF_PokerTHMessage, msg); + return 0; + } +} + +int +main() +{ + PokerTHMessage_t *msg; + unsigned char buf[256]; + ssize_t outSize, i; + msg = calloc(1, sizeof(PokerTHMessage_t)); + memset(msg, 0, sizeof(PokerTHMessage_t)); + msg->present = PokerTHMessage_PR_initMessage; + msg->choice.initMessage.requestedVersion.major = 1; + msg->choice.initMessage.login.present = login_PR_anonymousLogin; + OCTET_STRING_fromString(&msg->choice.initMessage.login.choice.anonymousLogin.playerName, "Hallo"); + outSize = simple_serializer(msg, buf, sizeof(buf)); + ASN_STRUCT_FREE(asn_DEF_PokerTHMessage, msg); + for (i = 0; i < outSize; i++) + printf("%02x ", buf[i]); + printf("\n"); + msg = simple_deserializer(buf, outSize - 1); + if (msg) + printf("error\n"); + msg = simple_deserializer(buf, outSize+1); + xer_fprint(stdout, &asn_DEF_PokerTHMessage, msg); + return 0; +} + diff --git a/src/third_party/asn1/ber_decoder.c b/src/third_party/asn1/ber_decoder.c new file mode 120000 index 00000000..1706e5a6 --- /dev/null +++ b/src/third_party/asn1/ber_decoder.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/ber_decoder.c \ No newline at end of file diff --git a/src/third_party/asn1/ber_decoder.h b/src/third_party/asn1/ber_decoder.h new file mode 120000 index 00000000..41fc93c7 --- /dev/null +++ b/src/third_party/asn1/ber_decoder.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/ber_decoder.h \ No newline at end of file diff --git a/src/third_party/asn1/ber_tlv_length.c b/src/third_party/asn1/ber_tlv_length.c new file mode 120000 index 00000000..8594f4b1 --- /dev/null +++ b/src/third_party/asn1/ber_tlv_length.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/ber_tlv_length.c \ No newline at end of file diff --git a/src/third_party/asn1/ber_tlv_length.h b/src/third_party/asn1/ber_tlv_length.h new file mode 120000 index 00000000..6fbc4ad7 --- /dev/null +++ b/src/third_party/asn1/ber_tlv_length.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/ber_tlv_length.h \ No newline at end of file diff --git a/src/third_party/asn1/ber_tlv_tag.c b/src/third_party/asn1/ber_tlv_tag.c new file mode 120000 index 00000000..0cc49730 --- /dev/null +++ b/src/third_party/asn1/ber_tlv_tag.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/ber_tlv_tag.c \ No newline at end of file diff --git a/src/third_party/asn1/ber_tlv_tag.h b/src/third_party/asn1/ber_tlv_tag.h new file mode 120000 index 00000000..4c408874 --- /dev/null +++ b/src/third_party/asn1/ber_tlv_tag.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/ber_tlv_tag.h \ No newline at end of file diff --git a/src/third_party/asn1/constr_CHOICE.c b/src/third_party/asn1/constr_CHOICE.c new file mode 120000 index 00000000..26c08b6e --- /dev/null +++ b/src/third_party/asn1/constr_CHOICE.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_CHOICE.c \ No newline at end of file diff --git a/src/third_party/asn1/constr_CHOICE.h b/src/third_party/asn1/constr_CHOICE.h new file mode 120000 index 00000000..0c375105 --- /dev/null +++ b/src/third_party/asn1/constr_CHOICE.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_CHOICE.h \ No newline at end of file diff --git a/src/third_party/asn1/constr_SEQUENCE.c b/src/third_party/asn1/constr_SEQUENCE.c new file mode 120000 index 00000000..8bd884ee --- /dev/null +++ b/src/third_party/asn1/constr_SEQUENCE.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_SEQUENCE.c \ No newline at end of file diff --git a/src/third_party/asn1/constr_SEQUENCE.h b/src/third_party/asn1/constr_SEQUENCE.h new file mode 120000 index 00000000..73bfcbe8 --- /dev/null +++ b/src/third_party/asn1/constr_SEQUENCE.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_SEQUENCE.h \ No newline at end of file diff --git a/src/third_party/asn1/constr_SEQUENCE_OF.c b/src/third_party/asn1/constr_SEQUENCE_OF.c new file mode 120000 index 00000000..675e5a4a --- /dev/null +++ b/src/third_party/asn1/constr_SEQUENCE_OF.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_SEQUENCE_OF.c \ No newline at end of file diff --git a/src/third_party/asn1/constr_SEQUENCE_OF.h b/src/third_party/asn1/constr_SEQUENCE_OF.h new file mode 120000 index 00000000..9b97e87d --- /dev/null +++ b/src/third_party/asn1/constr_SEQUENCE_OF.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_SEQUENCE_OF.h \ No newline at end of file diff --git a/src/third_party/asn1/constr_SET_OF.c b/src/third_party/asn1/constr_SET_OF.c new file mode 120000 index 00000000..78612ff3 --- /dev/null +++ b/src/third_party/asn1/constr_SET_OF.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_SET_OF.c \ No newline at end of file diff --git a/src/third_party/asn1/constr_SET_OF.h b/src/third_party/asn1/constr_SET_OF.h new file mode 120000 index 00000000..5ada92bb --- /dev/null +++ b/src/third_party/asn1/constr_SET_OF.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_SET_OF.h \ No newline at end of file diff --git a/src/third_party/asn1/constr_TYPE.c b/src/third_party/asn1/constr_TYPE.c new file mode 120000 index 00000000..b87ad4c3 --- /dev/null +++ b/src/third_party/asn1/constr_TYPE.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_TYPE.c \ No newline at end of file diff --git a/src/third_party/asn1/constr_TYPE.h b/src/third_party/asn1/constr_TYPE.h new file mode 120000 index 00000000..005f097b --- /dev/null +++ b/src/third_party/asn1/constr_TYPE.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/constr_TYPE.h \ No newline at end of file diff --git a/src/third_party/asn1/constraints.c b/src/third_party/asn1/constraints.c new file mode 120000 index 00000000..89b279e8 --- /dev/null +++ b/src/third_party/asn1/constraints.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/constraints.c \ No newline at end of file diff --git a/src/third_party/asn1/constraints.h b/src/third_party/asn1/constraints.h new file mode 120000 index 00000000..8ef90291 --- /dev/null +++ b/src/third_party/asn1/constraints.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/constraints.h \ No newline at end of file diff --git a/src/third_party/asn1/converter-sample.c b/src/third_party/asn1/converter-sample.c new file mode 120000 index 00000000..2bf53f7b --- /dev/null +++ b/src/third_party/asn1/converter-sample.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/converter-sample.c \ No newline at end of file diff --git a/src/third_party/asn1/der_encoder.c b/src/third_party/asn1/der_encoder.c new file mode 120000 index 00000000..995f9c2d --- /dev/null +++ b/src/third_party/asn1/der_encoder.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/der_encoder.c \ No newline at end of file diff --git a/src/third_party/asn1/der_encoder.h b/src/third_party/asn1/der_encoder.h new file mode 120000 index 00000000..534ee95b --- /dev/null +++ b/src/third_party/asn1/der_encoder.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/der_encoder.h \ No newline at end of file diff --git a/src/third_party/asn1/per_decoder.c b/src/third_party/asn1/per_decoder.c new file mode 120000 index 00000000..de88bfb9 --- /dev/null +++ b/src/third_party/asn1/per_decoder.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/per_decoder.c \ No newline at end of file diff --git a/src/third_party/asn1/per_decoder.h b/src/third_party/asn1/per_decoder.h new file mode 120000 index 00000000..578f7af9 --- /dev/null +++ b/src/third_party/asn1/per_decoder.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/per_decoder.h \ No newline at end of file diff --git a/src/third_party/asn1/per_encoder.c b/src/third_party/asn1/per_encoder.c new file mode 120000 index 00000000..a723174f --- /dev/null +++ b/src/third_party/asn1/per_encoder.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/per_encoder.c \ No newline at end of file diff --git a/src/third_party/asn1/per_encoder.h b/src/third_party/asn1/per_encoder.h new file mode 120000 index 00000000..64935a35 --- /dev/null +++ b/src/third_party/asn1/per_encoder.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/per_encoder.h \ No newline at end of file diff --git a/src/third_party/asn1/per_opentype.c b/src/third_party/asn1/per_opentype.c new file mode 120000 index 00000000..171f330e --- /dev/null +++ b/src/third_party/asn1/per_opentype.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/per_opentype.c \ No newline at end of file diff --git a/src/third_party/asn1/per_opentype.h b/src/third_party/asn1/per_opentype.h new file mode 120000 index 00000000..a59d17ac --- /dev/null +++ b/src/third_party/asn1/per_opentype.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/per_opentype.h \ No newline at end of file diff --git a/src/third_party/asn1/per_support.c b/src/third_party/asn1/per_support.c new file mode 120000 index 00000000..24ce091b --- /dev/null +++ b/src/third_party/asn1/per_support.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/per_support.c \ No newline at end of file diff --git a/src/third_party/asn1/per_support.h b/src/third_party/asn1/per_support.h new file mode 120000 index 00000000..e55b75e9 --- /dev/null +++ b/src/third_party/asn1/per_support.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/per_support.h \ No newline at end of file diff --git a/src/third_party/asn1/xer_decoder.c b/src/third_party/asn1/xer_decoder.c new file mode 120000 index 00000000..06f38df4 --- /dev/null +++ b/src/third_party/asn1/xer_decoder.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/xer_decoder.c \ No newline at end of file diff --git a/src/third_party/asn1/xer_decoder.h b/src/third_party/asn1/xer_decoder.h new file mode 120000 index 00000000..96e2aada --- /dev/null +++ b/src/third_party/asn1/xer_decoder.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/xer_decoder.h \ No newline at end of file diff --git a/src/third_party/asn1/xer_encoder.c b/src/third_party/asn1/xer_encoder.c new file mode 120000 index 00000000..32b4a743 --- /dev/null +++ b/src/third_party/asn1/xer_encoder.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/xer_encoder.c \ No newline at end of file diff --git a/src/third_party/asn1/xer_encoder.h b/src/third_party/asn1/xer_encoder.h new file mode 120000 index 00000000..e01f9e83 --- /dev/null +++ b/src/third_party/asn1/xer_encoder.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/xer_encoder.h \ No newline at end of file diff --git a/src/third_party/asn1/xer_support.c b/src/third_party/asn1/xer_support.c new file mode 120000 index 00000000..c78a17da --- /dev/null +++ b/src/third_party/asn1/xer_support.c @@ -0,0 +1 @@ +/opt/local/share/asn1c/xer_support.c \ No newline at end of file diff --git a/src/third_party/asn1/xer_support.h b/src/third_party/asn1/xer_support.h new file mode 120000 index 00000000..965675af --- /dev/null +++ b/src/third_party/asn1/xer_support.h @@ -0,0 +1 @@ +/opt/local/share/asn1c/xer_support.h \ No newline at end of file