diff --git a/src/third_party/asn1/GameListNew.c b/src/third_party/asn1/GameListNew.c index b1dd0af8..96131458 100644 --- a/src/third_party/asn1/GameListNew.c +++ b/src/third_party/asn1/GameListNew.c @@ -82,7 +82,7 @@ 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, + &asn_DEF_NetGameMode, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, @@ -118,7 +118,7 @@ static asn_TYPE_member_t asn_MBR_GameListNew_1[] = { { ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_GameInfo, + &asn_DEF_NetGameInfo, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, diff --git a/src/third_party/asn1/GameListNew.h b/src/third_party/asn1/GameListNew.h index ce3aae48..a9caf72f 100644 --- a/src/third_party/asn1/GameListNew.h +++ b/src/third_party/asn1/GameListNew.h @@ -11,10 +11,10 @@ #include /* Including external dependencies */ -#include "GameMode.h" +#include "NetGameMode.h" #include #include "NonZeroId.h" -#include "GameInfo.h" +#include "NetGameInfo.h" #include #include #include @@ -25,7 +25,7 @@ extern "C" { /* GameListNew */ typedef struct GameListNew { - GameMode_t gameMode; + NetGameMode_t gameMode; BOOLEAN_t isPrivate; struct playerIds { A_SEQUENCE_OF(NonZeroId_t) list; @@ -34,7 +34,7 @@ typedef struct GameListNew { asn_struct_ctx_t _asn_ctx; } playerIds; NonZeroId_t adminPlayerId; - GameInfo_t gameInfo; + NetGameInfo_t gameInfo; /* * This type is extensible, * possible extensions are below. diff --git a/src/third_party/asn1/GameListUpdate.c b/src/third_party/asn1/GameListUpdate.c index 35f59958..f0a87235 100644 --- a/src/third_party/asn1/GameListUpdate.c +++ b/src/third_party/asn1/GameListUpdate.c @@ -12,7 +12,7 @@ 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, + &asn_DEF_NetGameMode, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, diff --git a/src/third_party/asn1/GameListUpdate.h b/src/third_party/asn1/GameListUpdate.h index 9dccdd4c..c9f97546 100644 --- a/src/third_party/asn1/GameListUpdate.h +++ b/src/third_party/asn1/GameListUpdate.h @@ -11,7 +11,7 @@ #include /* Including external dependencies */ -#include "GameMode.h" +#include "NetGameMode.h" #include #ifdef __cplusplus @@ -20,7 +20,7 @@ extern "C" { /* GameListUpdate */ typedef struct GameListUpdate { - GameMode_t gameMode; + NetGameMode_t gameMode; /* * This type is extensible, * possible extensions are below. diff --git a/src/third_party/asn1/GameMode.h b/src/third_party/asn1/GameMode.h deleted file mode 100644 index cf083900..00000000 --- a/src/third_party/asn1/GameMode.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/GameState.h b/src/third_party/asn1/GameState.h deleted file mode 100644 index b3b5d361..00000000 --- a/src/third_party/asn1/GameState.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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/JoinGameAck.c b/src/third_party/asn1/JoinGameAck.c index cfe3a598..a7edc054 100644 --- a/src/third_party/asn1/JoinGameAck.c +++ b/src/third_party/asn1/JoinGameAck.c @@ -21,7 +21,7 @@ static asn_TYPE_member_t asn_MBR_JoinGameAck_1[] = { { ATF_NOFLAGS, 0, offsetof(struct JoinGameAck, gameInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_GameInfo, + &asn_DEF_NetGameInfo, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, diff --git a/src/third_party/asn1/JoinGameAck.h b/src/third_party/asn1/JoinGameAck.h index a27b7426..7fb833af 100644 --- a/src/third_party/asn1/JoinGameAck.h +++ b/src/third_party/asn1/JoinGameAck.h @@ -12,7 +12,7 @@ /* Including external dependencies */ #include -#include "GameInfo.h" +#include "NetGameInfo.h" #include #ifdef __cplusplus @@ -22,7 +22,7 @@ extern "C" { /* JoinGameAck */ typedef struct JoinGameAck { BOOLEAN_t areYouAdmin; - GameInfo_t gameInfo; + NetGameInfo_t gameInfo; /* * This type is extensible, * possible extensions are below. diff --git a/src/third_party/asn1/JoinNewGame.c b/src/third_party/asn1/JoinNewGame.c index 456aaf9b..584dddb9 100644 --- a/src/third_party/asn1/JoinNewGame.c +++ b/src/third_party/asn1/JoinNewGame.c @@ -12,7 +12,7 @@ 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, + &asn_DEF_NetGameInfo, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, diff --git a/src/third_party/asn1/JoinNewGame.h b/src/third_party/asn1/JoinNewGame.h index c63acb79..a93158e5 100644 --- a/src/third_party/asn1/JoinNewGame.h +++ b/src/third_party/asn1/JoinNewGame.h @@ -11,7 +11,7 @@ #include /* Including external dependencies */ -#include "GameInfo.h" +#include "NetGameInfo.h" #include #ifdef __cplusplus @@ -20,7 +20,7 @@ extern "C" { /* JoinNewGame */ typedef struct JoinNewGame { - GameInfo_t gameInfo; + NetGameInfo_t gameInfo; /* * This type is extensible, * possible extensions are below. diff --git a/src/third_party/asn1/MyActionRequestMessage.c b/src/third_party/asn1/MyActionRequestMessage.c index 6c6847f2..514a33c4 100644 --- a/src/third_party/asn1/MyActionRequestMessage.c +++ b/src/third_party/asn1/MyActionRequestMessage.c @@ -46,7 +46,7 @@ static asn_TYPE_member_t asn_MBR_MyActionRequestMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, gameState), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, - &asn_DEF_GameState, + &asn_DEF_NetGameState, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, @@ -55,7 +55,7 @@ static asn_TYPE_member_t asn_MBR_MyActionRequestMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, myAction), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, - &asn_DEF_PlayerAction, + &asn_DEF_NetPlayerAction, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, diff --git a/src/third_party/asn1/MyActionRequestMessage.h b/src/third_party/asn1/MyActionRequestMessage.h index c42aa260..3ecd9064 100644 --- a/src/third_party/asn1/MyActionRequestMessage.h +++ b/src/third_party/asn1/MyActionRequestMessage.h @@ -12,8 +12,8 @@ /* Including external dependencies */ #include "NonZeroId.h" -#include "GameState.h" -#include "PlayerAction.h" +#include "NetGameState.h" +#include "NetPlayerAction.h" #include #include @@ -24,8 +24,8 @@ extern "C" { /* MyActionRequestMessage */ typedef struct MyActionRequestMessage { NonZeroId_t gameId; - GameState_t gameState; - PlayerAction_t myAction; + NetGameState_t gameState; + NetPlayerAction_t myAction; long myRelativeBet; /* * This type is extensible, diff --git a/src/third_party/asn1/GameInfo.c b/src/third_party/asn1/NetGameInfo.c similarity index 92% rename from src/third_party/asn1/GameInfo.c rename to src/third_party/asn1/NetGameInfo.c index 2214f7b3..5bfffbf6 100644 --- a/src/third_party/asn1/GameInfo.c +++ b/src/third_party/asn1/NetGameInfo.c @@ -6,7 +6,7 @@ #include -#include "GameInfo.h" +#include "NetGameInfo.h" static int memb_raiseEveryHands_constraint_4(asn_TYPE_descriptor_t *td, const void *sptr, @@ -479,8 +479,8 @@ asn_TYPE_descriptor_t asn_DEF_manualBlinds_17 = { &asn_SPC_manualBlinds_specs_17 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, gameName), +static asn_TYPE_member_t asn_MBR_NetGameInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, gameName), (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, &asn_DEF_UTF8String, @@ -489,7 +489,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "gameName" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, maxNumPlayers), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, maxNumPlayers), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_NativeInteger, @@ -498,7 +498,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "maxNumPlayers" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, raiseIntervalMode), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, raiseIntervalMode), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_raiseIntervalMode_4, @@ -507,7 +507,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "raiseIntervalMode" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, endRaiseMode), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, endRaiseMode), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_endRaiseMode_8, @@ -516,7 +516,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "endRaiseMode" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, proposedGuiSpeed), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, proposedGuiSpeed), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_NativeInteger, @@ -525,7 +525,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "proposedGuiSpeed" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, playerActionTimeout), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, playerActionTimeout), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_NativeInteger, @@ -534,7 +534,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "playerActionTimeout" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, firstSmallBlind), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, firstSmallBlind), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_NativeInteger, @@ -543,7 +543,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "firstSmallBlind" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, endRaiseSmallBlindValue), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, endRaiseSmallBlindValue), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_NativeInteger, @@ -552,7 +552,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "endRaiseSmallBlindValue" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, startMoney), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, startMoney), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_NativeInteger, @@ -561,7 +561,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { 0, "startMoney" }, - { ATF_NOFLAGS, 0, offsetof(struct GameInfo, manualBlinds), + { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, manualBlinds), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_manualBlinds_17, @@ -571,10 +571,10 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { "manualBlinds" }, }; -static ber_tlv_tag_t asn_DEF_GameInfo_tags_1[] = { +static ber_tlv_tag_t asn_DEF_NetGameInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static asn_TYPE_tag2member_t asn_MAP_GameInfo_tag2el_1[] = { +static asn_TYPE_tag2member_t asn_MAP_NetGameInfo_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 */ @@ -587,18 +587,18 @@ static asn_TYPE_tag2member_t asn_MAP_GameInfo_tag2el_1[] = { { (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, +static asn_SEQUENCE_specifics_t asn_SPC_NetGameInfo_specs_1 = { + sizeof(struct NetGameInfo), + offsetof(struct NetGameInfo, _asn_ctx), + asn_MAP_NetGameInfo_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", +asn_TYPE_descriptor_t asn_DEF_NetGameInfo = { + "NetGameInfo", + "NetGameInfo", SEQUENCE_free, SEQUENCE_print, SEQUENCE_constraint, @@ -608,15 +608,15 @@ asn_TYPE_descriptor_t asn_DEF_GameInfo = { 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 */ + asn_DEF_NetGameInfo_tags_1, + sizeof(asn_DEF_NetGameInfo_tags_1) + /sizeof(asn_DEF_NetGameInfo_tags_1[0]), /* 1 */ + asn_DEF_NetGameInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_NetGameInfo_tags_1) + /sizeof(asn_DEF_NetGameInfo_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ - asn_MBR_GameInfo_1, + asn_MBR_NetGameInfo_1, 10, /* Elements count */ - &asn_SPC_GameInfo_specs_1 /* Additional specs */ + &asn_SPC_NetGameInfo_specs_1 /* Additional specs */ }; diff --git a/src/third_party/asn1/GameInfo.h b/src/third_party/asn1/NetGameInfo.h similarity index 88% rename from src/third_party/asn1/GameInfo.h rename to src/third_party/asn1/NetGameInfo.h index 4546a9dd..27cd67c4 100644 --- a/src/third_party/asn1/GameInfo.h +++ b/src/third_party/asn1/NetGameInfo.h @@ -4,8 +4,8 @@ * found in "../../../docs/pokerth.asn1" */ -#ifndef _GameInfo_H_ -#define _GameInfo_H_ +#ifndef _NetGameInfo_H_ +#define _NetGameInfo_H_ #include @@ -37,13 +37,13 @@ typedef enum endRaiseMode { endRaiseMode_keepLastBlind = 3 } e_endRaiseMode; -/* GameInfo */ -typedef struct GameInfo { +/* NetGameInfo */ +typedef struct NetGameInfo { UTF8String_t gameName; long maxNumPlayers; struct raiseIntervalMode { raiseIntervalMode_PR present; - union GameInfo__raiseIntervalMode_u { + union NetGameInfo__raiseIntervalMode_u { long raiseEveryHands; long raiseEveryMinutes; /* @@ -74,14 +74,14 @@ typedef struct GameInfo { /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; -} GameInfo_t; +} NetGameInfo_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; +extern asn_TYPE_descriptor_t asn_DEF_NetGameInfo; #ifdef __cplusplus } #endif -#endif /* _GameInfo_H_ */ +#endif /* _NetGameInfo_H_ */ diff --git a/src/third_party/asn1/GameMode.c b/src/third_party/asn1/NetGameMode.c similarity index 61% rename from src/third_party/asn1/GameMode.c rename to src/third_party/asn1/NetGameMode.c index 020fea28..43020926 100644 --- a/src/third_party/asn1/GameMode.c +++ b/src/third_party/asn1/NetGameMode.c @@ -6,10 +6,10 @@ #include -#include "GameMode.h" +#include "NetGameMode.h" int -GameMode_constraint(asn_TYPE_descriptor_t *td, const void *sptr, +NetGameMode_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; @@ -21,7 +21,7 @@ GameMode_constraint(asn_TYPE_descriptor_t *td, const void *sptr, * so here we adjust the DEF accordingly. */ static void -GameMode_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { +NetGameMode_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; @@ -38,91 +38,91 @@ GameMode_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { } void -GameMode_free(asn_TYPE_descriptor_t *td, +NetGameMode_free(asn_TYPE_descriptor_t *td, void *struct_ptr, int contents_only) { - GameMode_1_inherit_TYPE_descriptor(td); + NetGameMode_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, +NetGameMode_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); + NetGameMode_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, +NetGameMode_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); + NetGameMode_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, +NetGameMode_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); + NetGameMode_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, +NetGameMode_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); + NetGameMode_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, +NetGameMode_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); + NetGameMode_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[] = { +static asn_INTEGER_enum_map_t asn_MAP_NetGameMode_value2enum_1[] = { { 1, 11, "gameCreated" }, { 2, 11, "gameStarted" }, { 3, 10, "gameClosed" } }; -static unsigned int asn_MAP_GameMode_enum2value_1[] = { +static unsigned int asn_MAP_NetGameMode_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 */ +static asn_INTEGER_specifics_t asn_SPC_NetGameMode_specs_1 = { + asn_MAP_NetGameMode_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_NetGameMode_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[] = { +static ber_tlv_tag_t asn_DEF_NetGameMode_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, +asn_TYPE_descriptor_t asn_DEF_NetGameMode = { + "NetGameMode", + "NetGameMode", + NetGameMode_free, + NetGameMode_print, + NetGameMode_constraint, + NetGameMode_decode_ber, + NetGameMode_encode_der, + NetGameMode_decode_xer, + NetGameMode_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 */ + asn_DEF_NetGameMode_tags_1, + sizeof(asn_DEF_NetGameMode_tags_1) + /sizeof(asn_DEF_NetGameMode_tags_1[0]), /* 1 */ + asn_DEF_NetGameMode_tags_1, /* Same as above */ + sizeof(asn_DEF_NetGameMode_tags_1) + /sizeof(asn_DEF_NetGameMode_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ 0, 0, /* Defined elsewhere */ - &asn_SPC_GameMode_specs_1 /* Additional specs */ + &asn_SPC_NetGameMode_specs_1 /* Additional specs */ }; diff --git a/src/third_party/asn1/NetGameMode.h b/src/third_party/asn1/NetGameMode.h new file mode 100644 index 00000000..7012b5ff --- /dev/null +++ b/src/third_party/asn1/NetGameMode.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 _NetGameMode_H_ +#define _NetGameMode_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NetGameMode { + NetGameMode_gameCreated = 1, + NetGameMode_gameStarted = 2, + NetGameMode_gameClosed = 3 +} e_NetGameMode; + +/* NetGameMode */ +typedef long NetGameMode_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NetGameMode; +asn_struct_free_f NetGameMode_free; +asn_struct_print_f NetGameMode_print; +asn_constr_check_f NetGameMode_constraint; +ber_type_decoder_f NetGameMode_decode_ber; +der_type_encoder_f NetGameMode_encode_der; +xer_type_decoder_f NetGameMode_decode_xer; +xer_type_encoder_f NetGameMode_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _NetGameMode_H_ */ diff --git a/src/third_party/asn1/GameState.c b/src/third_party/asn1/NetGameState.c similarity index 62% rename from src/third_party/asn1/GameState.c rename to src/third_party/asn1/NetGameState.c index 59fc0c09..b6359251 100644 --- a/src/third_party/asn1/GameState.c +++ b/src/third_party/asn1/NetGameState.c @@ -6,10 +6,10 @@ #include -#include "GameState.h" +#include "NetGameState.h" int -GameState_constraint(asn_TYPE_descriptor_t *td, const void *sptr, +NetGameState_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; @@ -21,7 +21,7 @@ GameState_constraint(asn_TYPE_descriptor_t *td, const void *sptr, * so here we adjust the DEF accordingly. */ static void -GameState_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { +NetGameState_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; @@ -38,50 +38,50 @@ GameState_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { } void -GameState_free(asn_TYPE_descriptor_t *td, +NetGameState_free(asn_TYPE_descriptor_t *td, void *struct_ptr, int contents_only) { - GameState_1_inherit_TYPE_descriptor(td); + NetGameState_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, +NetGameState_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); + NetGameState_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, +NetGameState_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); + NetGameState_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, +NetGameState_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); + NetGameState_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, +NetGameState_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); + NetGameState_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, +NetGameState_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); + NetGameState_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[] = { +static asn_INTEGER_enum_map_t asn_MAP_NetGameState_value2enum_1[] = { { 0, 12, "statePreflop" }, { 1, 9, "stateFlop" }, { 2, 9, "stateTurn" }, @@ -89,7 +89,7 @@ static asn_INTEGER_enum_map_t asn_MAP_GameState_value2enum_1[] = { { 4, 22, "statePreflopSmallBlind" }, { 5, 20, "statePreflopBigBlind" } }; -static unsigned int asn_MAP_GameState_enum2value_1[] = { +static unsigned int asn_MAP_NetGameState_enum2value_1[] = { 1, /* stateFlop(1) */ 0, /* statePreflop(0) */ 5, /* statePreflopBigBlind(5) */ @@ -97,38 +97,38 @@ static unsigned int asn_MAP_GameState_enum2value_1[] = { 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 */ +static asn_INTEGER_specifics_t asn_SPC_NetGameState_specs_1 = { + asn_MAP_NetGameState_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_NetGameState_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[] = { +static ber_tlv_tag_t asn_DEF_NetGameState_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, +asn_TYPE_descriptor_t asn_DEF_NetGameState = { + "NetGameState", + "NetGameState", + NetGameState_free, + NetGameState_print, + NetGameState_constraint, + NetGameState_decode_ber, + NetGameState_encode_der, + NetGameState_decode_xer, + NetGameState_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 */ + asn_DEF_NetGameState_tags_1, + sizeof(asn_DEF_NetGameState_tags_1) + /sizeof(asn_DEF_NetGameState_tags_1[0]), /* 1 */ + asn_DEF_NetGameState_tags_1, /* Same as above */ + sizeof(asn_DEF_NetGameState_tags_1) + /sizeof(asn_DEF_NetGameState_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ 0, 0, /* Defined elsewhere */ - &asn_SPC_GameState_specs_1 /* Additional specs */ + &asn_SPC_NetGameState_specs_1 /* Additional specs */ }; diff --git a/src/third_party/asn1/NetGameState.h b/src/third_party/asn1/NetGameState.h new file mode 100644 index 00000000..411549bd --- /dev/null +++ b/src/third_party/asn1/NetGameState.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 _NetGameState_H_ +#define _NetGameState_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NetGameState { + NetGameState_statePreflop = 0, + NetGameState_stateFlop = 1, + NetGameState_stateTurn = 2, + NetGameState_stateRiver = 3, + NetGameState_statePreflopSmallBlind = 4, + NetGameState_statePreflopBigBlind = 5 +} e_NetGameState; + +/* NetGameState */ +typedef long NetGameState_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NetGameState; +asn_struct_free_f NetGameState_free; +asn_struct_print_f NetGameState_print; +asn_constr_check_f NetGameState_constraint; +ber_type_decoder_f NetGameState_decode_ber; +der_type_encoder_f NetGameState_encode_der; +xer_type_decoder_f NetGameState_decode_xer; +xer_type_encoder_f NetGameState_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _NetGameState_H_ */ diff --git a/src/third_party/asn1/PlayerAction.c b/src/third_party/asn1/NetPlayerAction.c similarity index 61% rename from src/third_party/asn1/PlayerAction.c rename to src/third_party/asn1/NetPlayerAction.c index d7cabea6..89127a07 100644 --- a/src/third_party/asn1/PlayerAction.c +++ b/src/third_party/asn1/NetPlayerAction.c @@ -6,10 +6,10 @@ #include -#include "PlayerAction.h" +#include "NetPlayerAction.h" int -PlayerAction_constraint(asn_TYPE_descriptor_t *td, const void *sptr, +NetPlayerAction_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; @@ -21,7 +21,7 @@ PlayerAction_constraint(asn_TYPE_descriptor_t *td, const void *sptr, * so here we adjust the DEF accordingly. */ static void -PlayerAction_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { +NetPlayerAction_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; @@ -38,50 +38,50 @@ PlayerAction_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { } void -PlayerAction_free(asn_TYPE_descriptor_t *td, +NetPlayerAction_free(asn_TYPE_descriptor_t *td, void *struct_ptr, int contents_only) { - PlayerAction_1_inherit_TYPE_descriptor(td); + NetPlayerAction_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, +NetPlayerAction_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); + NetPlayerAction_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, +NetPlayerAction_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); + NetPlayerAction_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, +NetPlayerAction_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); + NetPlayerAction_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, +NetPlayerAction_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); + NetPlayerAction_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, +NetPlayerAction_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); + NetPlayerAction_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[] = { +static asn_INTEGER_enum_map_t asn_MAP_NetPlayerAction_value2enum_1[] = { { 0, 10, "actionNone" }, { 1, 10, "actionFold" }, { 2, 11, "actionCheck" }, @@ -90,7 +90,7 @@ static asn_INTEGER_enum_map_t asn_MAP_PlayerAction_value2enum_1[] = { { 5, 11, "actionRaise" }, { 6, 11, "actionAllIn" } }; -static unsigned int asn_MAP_PlayerAction_enum2value_1[] = { +static unsigned int asn_MAP_NetPlayerAction_enum2value_1[] = { 6, /* actionAllIn(6) */ 4, /* actionBet(4) */ 3, /* actionCall(3) */ @@ -99,38 +99,38 @@ static unsigned int asn_MAP_PlayerAction_enum2value_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 */ +static asn_INTEGER_specifics_t asn_SPC_NetPlayerAction_specs_1 = { + asn_MAP_NetPlayerAction_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_NetPlayerAction_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[] = { +static ber_tlv_tag_t asn_DEF_NetPlayerAction_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, +asn_TYPE_descriptor_t asn_DEF_NetPlayerAction = { + "NetPlayerAction", + "NetPlayerAction", + NetPlayerAction_free, + NetPlayerAction_print, + NetPlayerAction_constraint, + NetPlayerAction_decode_ber, + NetPlayerAction_encode_der, + NetPlayerAction_decode_xer, + NetPlayerAction_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 */ + asn_DEF_NetPlayerAction_tags_1, + sizeof(asn_DEF_NetPlayerAction_tags_1) + /sizeof(asn_DEF_NetPlayerAction_tags_1[0]), /* 1 */ + asn_DEF_NetPlayerAction_tags_1, /* Same as above */ + sizeof(asn_DEF_NetPlayerAction_tags_1) + /sizeof(asn_DEF_NetPlayerAction_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ 0, 0, /* Defined elsewhere */ - &asn_SPC_PlayerAction_specs_1 /* Additional specs */ + &asn_SPC_NetPlayerAction_specs_1 /* Additional specs */ }; diff --git a/src/third_party/asn1/NetPlayerAction.h b/src/third_party/asn1/NetPlayerAction.h new file mode 100644 index 00000000..c1139020 --- /dev/null +++ b/src/third_party/asn1/NetPlayerAction.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 _NetPlayerAction_H_ +#define _NetPlayerAction_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NetPlayerAction { + NetPlayerAction_actionNone = 0, + NetPlayerAction_actionFold = 1, + NetPlayerAction_actionCheck = 2, + NetPlayerAction_actionCall = 3, + NetPlayerAction_actionBet = 4, + NetPlayerAction_actionRaise = 5, + NetPlayerAction_actionAllIn = 6 +} e_NetPlayerAction; + +/* NetPlayerAction */ +typedef long NetPlayerAction_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NetPlayerAction; +asn_struct_free_f NetPlayerAction_free; +asn_struct_print_f NetPlayerAction_print; +asn_constr_check_f NetPlayerAction_constraint; +ber_type_decoder_f NetPlayerAction_decode_ber; +der_type_encoder_f NetPlayerAction_encode_der; +xer_type_decoder_f NetPlayerAction_decode_xer; +xer_type_encoder_f NetPlayerAction_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _NetPlayerAction_H_ */ diff --git a/src/third_party/asn1/PlayerAction.h b/src/third_party/asn1/PlayerAction.h deleted file mode 100644 index 27c5f6ad..00000000 --- a/src/third_party/asn1/PlayerAction.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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/PlayersActionDoneMessage.c b/src/third_party/asn1/PlayersActionDoneMessage.c index ccc2531c..4f3eaade 100644 --- a/src/third_party/asn1/PlayersActionDoneMessage.c +++ b/src/third_party/asn1/PlayersActionDoneMessage.c @@ -130,7 +130,7 @@ static asn_TYPE_member_t asn_MBR_PlayersActionDoneMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, gameState), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, - &asn_DEF_GameState, + &asn_DEF_NetGameState, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, @@ -139,7 +139,7 @@ static asn_TYPE_member_t asn_MBR_PlayersActionDoneMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, playerAction), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, - &asn_DEF_PlayerAction, + &asn_DEF_NetPlayerAction, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, diff --git a/src/third_party/asn1/PlayersActionDoneMessage.h b/src/third_party/asn1/PlayersActionDoneMessage.h index 91110133..c33db954 100644 --- a/src/third_party/asn1/PlayersActionDoneMessage.h +++ b/src/third_party/asn1/PlayersActionDoneMessage.h @@ -12,8 +12,8 @@ /* Including external dependencies */ #include "NonZeroId.h" -#include "GameState.h" -#include "PlayerAction.h" +#include "NetGameState.h" +#include "NetPlayerAction.h" #include #include @@ -25,8 +25,8 @@ extern "C" { typedef struct PlayersActionDoneMessage { NonZeroId_t gameId; NonZeroId_t playerId; - GameState_t gameState; - PlayerAction_t playerAction; + NetGameState_t gameState; + NetPlayerAction_t playerAction; long totalPlayerBet; long playerMoney; long highestSet; diff --git a/src/third_party/asn1/PlayersTurnMessage.c b/src/third_party/asn1/PlayersTurnMessage.c index 58c403ec..cf92f50d 100644 --- a/src/third_party/asn1/PlayersTurnMessage.c +++ b/src/third_party/asn1/PlayersTurnMessage.c @@ -30,7 +30,7 @@ static asn_TYPE_member_t asn_MBR_PlayersTurnMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct PlayersTurnMessage, gameState), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, - &asn_DEF_GameState, + &asn_DEF_NetGameState, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, diff --git a/src/third_party/asn1/PlayersTurnMessage.h b/src/third_party/asn1/PlayersTurnMessage.h index 22960bf0..1b4644bb 100644 --- a/src/third_party/asn1/PlayersTurnMessage.h +++ b/src/third_party/asn1/PlayersTurnMessage.h @@ -12,7 +12,7 @@ /* Including external dependencies */ #include "NonZeroId.h" -#include "GameState.h" +#include "NetGameState.h" #include #ifdef __cplusplus @@ -23,7 +23,7 @@ extern "C" { typedef struct PlayersTurnMessage { NonZeroId_t gameId; NonZeroId_t playerId; - GameState_t gameState; + NetGameState_t gameState; /* * This type is extensible, * possible extensions are below. diff --git a/src/third_party/asn1/YourActionRejectedMessage.c b/src/third_party/asn1/YourActionRejectedMessage.c index ec3a13a9..73834a37 100644 --- a/src/third_party/asn1/YourActionRejectedMessage.c +++ b/src/third_party/asn1/YourActionRejectedMessage.c @@ -165,7 +165,7 @@ static asn_TYPE_member_t asn_MBR_YourActionRejectedMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, gameState), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, - &asn_DEF_GameState, + &asn_DEF_NetGameState, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, @@ -174,7 +174,7 @@ static asn_TYPE_member_t asn_MBR_YourActionRejectedMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, yourAction), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, - &asn_DEF_PlayerAction, + &asn_DEF_NetPlayerAction, 0, /* Defer constraints checking to the member type */ 0, /* PER is not compiled, use -gen-PER */ 0, diff --git a/src/third_party/asn1/YourActionRejectedMessage.h b/src/third_party/asn1/YourActionRejectedMessage.h index a524c2b2..d7103277 100644 --- a/src/third_party/asn1/YourActionRejectedMessage.h +++ b/src/third_party/asn1/YourActionRejectedMessage.h @@ -12,8 +12,8 @@ /* Including external dependencies */ #include "NonZeroId.h" -#include "GameState.h" -#include "PlayerAction.h" +#include "NetGameState.h" +#include "NetPlayerAction.h" #include #include #include @@ -32,8 +32,8 @@ typedef enum rejectionReason { /* YourActionRejectedMessage */ typedef struct YourActionRejectedMessage { NonZeroId_t gameId; - GameState_t gameState; - PlayerAction_t yourAction; + NetGameState_t gameState; + NetPlayerAction_t yourAction; long yourRelativeBet; long rejectionReason; /*