Resolving name collisions.

This commit is contained in:
lotodore
2009-07-18 21:36:28 +00:00
parent 196d9bd27c
commit deed6320c6
27 changed files with 326 additions and 326 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ static asn_TYPE_member_t asn_MBR_GameListNew_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameMode), { ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameMode),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_GameMode, &asn_DEF_NetGameMode,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
@@ -118,7 +118,7 @@ static asn_TYPE_member_t asn_MBR_GameListNew_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameInfo), { ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameInfo),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0, 0,
&asn_DEF_GameInfo, &asn_DEF_NetGameInfo,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
+4 -4
View File
@@ -11,10 +11,10 @@
#include <asn_application.h> #include <asn_application.h>
/* Including external dependencies */ /* Including external dependencies */
#include "GameMode.h" #include "NetGameMode.h"
#include <BOOLEAN.h> #include <BOOLEAN.h>
#include "NonZeroId.h" #include "NonZeroId.h"
#include "GameInfo.h" #include "NetGameInfo.h"
#include <asn_SEQUENCE_OF.h> #include <asn_SEQUENCE_OF.h>
#include <constr_SEQUENCE_OF.h> #include <constr_SEQUENCE_OF.h>
#include <constr_SEQUENCE.h> #include <constr_SEQUENCE.h>
@@ -25,7 +25,7 @@ extern "C" {
/* GameListNew */ /* GameListNew */
typedef struct GameListNew { typedef struct GameListNew {
GameMode_t gameMode; NetGameMode_t gameMode;
BOOLEAN_t isPrivate; BOOLEAN_t isPrivate;
struct playerIds { struct playerIds {
A_SEQUENCE_OF(NonZeroId_t) list; A_SEQUENCE_OF(NonZeroId_t) list;
@@ -34,7 +34,7 @@ typedef struct GameListNew {
asn_struct_ctx_t _asn_ctx; asn_struct_ctx_t _asn_ctx;
} playerIds; } playerIds;
NonZeroId_t adminPlayerId; NonZeroId_t adminPlayerId;
GameInfo_t gameInfo; NetGameInfo_t gameInfo;
/* /*
* This type is extensible, * This type is extensible,
* possible extensions are below. * possible extensions are below.
+1 -1
View File
@@ -12,7 +12,7 @@ static asn_TYPE_member_t asn_MBR_GameListUpdate_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GameListUpdate, gameMode), { ATF_NOFLAGS, 0, offsetof(struct GameListUpdate, gameMode),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_GameMode, &asn_DEF_NetGameMode,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
+2 -2
View File
@@ -11,7 +11,7 @@
#include <asn_application.h> #include <asn_application.h>
/* Including external dependencies */ /* Including external dependencies */
#include "GameMode.h" #include "NetGameMode.h"
#include <constr_SEQUENCE.h> #include <constr_SEQUENCE.h>
#ifdef __cplusplus #ifdef __cplusplus
@@ -20,7 +20,7 @@ extern "C" {
/* GameListUpdate */ /* GameListUpdate */
typedef struct GameListUpdate { typedef struct GameListUpdate {
GameMode_t gameMode; NetGameMode_t gameMode;
/* /*
* This type is extensible, * This type is extensible,
* possible extensions are below. * possible extensions are below.
-44
View File
@@ -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 <asn_application.h>
/* Including external dependencies */
#include <NativeEnumerated.h>
#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_ */
-47
View File
@@ -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 <asn_application.h>
/* Including external dependencies */
#include <NativeEnumerated.h>
#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_ */
+1 -1
View File
@@ -21,7 +21,7 @@ static asn_TYPE_member_t asn_MBR_JoinGameAck_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct JoinGameAck, gameInfo), { ATF_NOFLAGS, 0, offsetof(struct JoinGameAck, gameInfo),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0, 0,
&asn_DEF_GameInfo, &asn_DEF_NetGameInfo,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
+2 -2
View File
@@ -12,7 +12,7 @@
/* Including external dependencies */ /* Including external dependencies */
#include <BOOLEAN.h> #include <BOOLEAN.h>
#include "GameInfo.h" #include "NetGameInfo.h"
#include <constr_SEQUENCE.h> #include <constr_SEQUENCE.h>
#ifdef __cplusplus #ifdef __cplusplus
@@ -22,7 +22,7 @@ extern "C" {
/* JoinGameAck */ /* JoinGameAck */
typedef struct JoinGameAck { typedef struct JoinGameAck {
BOOLEAN_t areYouAdmin; BOOLEAN_t areYouAdmin;
GameInfo_t gameInfo; NetGameInfo_t gameInfo;
/* /*
* This type is extensible, * This type is extensible,
* possible extensions are below. * possible extensions are below.
+1 -1
View File
@@ -12,7 +12,7 @@ static asn_TYPE_member_t asn_MBR_JoinNewGame_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct JoinNewGame, gameInfo), { ATF_NOFLAGS, 0, offsetof(struct JoinNewGame, gameInfo),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0, 0,
&asn_DEF_GameInfo, &asn_DEF_NetGameInfo,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
+2 -2
View File
@@ -11,7 +11,7 @@
#include <asn_application.h> #include <asn_application.h>
/* Including external dependencies */ /* Including external dependencies */
#include "GameInfo.h" #include "NetGameInfo.h"
#include <constr_SEQUENCE.h> #include <constr_SEQUENCE.h>
#ifdef __cplusplus #ifdef __cplusplus
@@ -20,7 +20,7 @@ extern "C" {
/* JoinNewGame */ /* JoinNewGame */
typedef struct JoinNewGame { typedef struct JoinNewGame {
GameInfo_t gameInfo; NetGameInfo_t gameInfo;
/* /*
* This type is extensible, * This type is extensible,
* possible extensions are below. * possible extensions are below.
+2 -2
View File
@@ -46,7 +46,7 @@ static asn_TYPE_member_t asn_MBR_MyActionRequestMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, gameState), { ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, gameState),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_GameState, &asn_DEF_NetGameState,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
@@ -55,7 +55,7 @@ static asn_TYPE_member_t asn_MBR_MyActionRequestMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, myAction), { ATF_NOFLAGS, 0, offsetof(struct MyActionRequestMessage, myAction),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_PlayerAction, &asn_DEF_NetPlayerAction,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
+4 -4
View File
@@ -12,8 +12,8 @@
/* Including external dependencies */ /* Including external dependencies */
#include "NonZeroId.h" #include "NonZeroId.h"
#include "GameState.h" #include "NetGameState.h"
#include "PlayerAction.h" #include "NetPlayerAction.h"
#include <NativeInteger.h> #include <NativeInteger.h>
#include <constr_SEQUENCE.h> #include <constr_SEQUENCE.h>
@@ -24,8 +24,8 @@ extern "C" {
/* MyActionRequestMessage */ /* MyActionRequestMessage */
typedef struct MyActionRequestMessage { typedef struct MyActionRequestMessage {
NonZeroId_t gameId; NonZeroId_t gameId;
GameState_t gameState; NetGameState_t gameState;
PlayerAction_t myAction; NetPlayerAction_t myAction;
long myRelativeBet; long myRelativeBet;
/* /*
* This type is extensible, * This type is extensible,
@@ -6,7 +6,7 @@
#include <asn_internal.h> #include <asn_internal.h>
#include "GameInfo.h" #include "NetGameInfo.h"
static int static int
memb_raiseEveryHands_constraint_4(asn_TYPE_descriptor_t *td, const void *sptr, 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 */ &asn_SPC_manualBlinds_specs_17 /* Additional specs */
}; };
static asn_TYPE_member_t asn_MBR_GameInfo_1[] = { static asn_TYPE_member_t asn_MBR_NetGameInfo_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, gameName), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, gameName),
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
0, 0,
&asn_DEF_UTF8String, &asn_DEF_UTF8String,
@@ -489,7 +489,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"gameName" "gameName"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, maxNumPlayers), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, maxNumPlayers),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0, 0,
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
@@ -498,7 +498,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"maxNumPlayers" "maxNumPlayers"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, raiseIntervalMode), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, raiseIntervalMode),
-1 /* Ambiguous tag (CHOICE?) */, -1 /* Ambiguous tag (CHOICE?) */,
0, 0,
&asn_DEF_raiseIntervalMode_4, &asn_DEF_raiseIntervalMode_4,
@@ -507,7 +507,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"raiseIntervalMode" "raiseIntervalMode"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, endRaiseMode), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, endRaiseMode),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_endRaiseMode_8, &asn_DEF_endRaiseMode_8,
@@ -516,7 +516,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"endRaiseMode" "endRaiseMode"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, proposedGuiSpeed), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, proposedGuiSpeed),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0, 0,
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
@@ -525,7 +525,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"proposedGuiSpeed" "proposedGuiSpeed"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, playerActionTimeout), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, playerActionTimeout),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0, 0,
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
@@ -534,7 +534,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"playerActionTimeout" "playerActionTimeout"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, firstSmallBlind), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, firstSmallBlind),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0, 0,
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
@@ -543,7 +543,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"firstSmallBlind" "firstSmallBlind"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, endRaiseSmallBlindValue), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, endRaiseSmallBlindValue),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0, 0,
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
@@ -552,7 +552,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"endRaiseSmallBlindValue" "endRaiseSmallBlindValue"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, startMoney), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, startMoney),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0, 0,
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
@@ -561,7 +561,7 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
0, 0,
"startMoney" "startMoney"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, manualBlinds), { ATF_NOFLAGS, 0, offsetof(struct NetGameInfo, manualBlinds),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0, 0,
&asn_DEF_manualBlinds_17, &asn_DEF_manualBlinds_17,
@@ -571,10 +571,10 @@ static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
"manualBlinds" "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)) (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)), 1, 0, 5 }, /* maxNumPlayers at 249 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -1, 4 }, /* proposedGuiSpeed at 259 */ { (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)), 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 | (0 << 2)), 2, 0, 0 }, /* raiseEveryHands at 251 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* raiseEveryMinutes at 252 */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* raiseEveryMinutes at 252 */
}; };
static asn_SEQUENCE_specifics_t asn_SPC_GameInfo_specs_1 = { static asn_SEQUENCE_specifics_t asn_SPC_NetGameInfo_specs_1 = {
sizeof(struct GameInfo), sizeof(struct NetGameInfo),
offsetof(struct GameInfo, _asn_ctx), offsetof(struct NetGameInfo, _asn_ctx),
asn_MAP_GameInfo_tag2el_1, asn_MAP_NetGameInfo_tag2el_1,
11, /* Count of tags in the map */ 11, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */ 0, 0, 0, /* Optional elements (not needed) */
9, /* Start extensions */ 9, /* Start extensions */
11 /* Stop extensions */ 11 /* Stop extensions */
}; };
asn_TYPE_descriptor_t asn_DEF_GameInfo = { asn_TYPE_descriptor_t asn_DEF_NetGameInfo = {
"GameInfo", "NetGameInfo",
"GameInfo", "NetGameInfo",
SEQUENCE_free, SEQUENCE_free,
SEQUENCE_print, SEQUENCE_print,
SEQUENCE_constraint, SEQUENCE_constraint,
@@ -608,15 +608,15 @@ asn_TYPE_descriptor_t asn_DEF_GameInfo = {
SEQUENCE_encode_xer, SEQUENCE_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */ 0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn_DEF_GameInfo_tags_1, asn_DEF_NetGameInfo_tags_1,
sizeof(asn_DEF_GameInfo_tags_1) sizeof(asn_DEF_NetGameInfo_tags_1)
/sizeof(asn_DEF_GameInfo_tags_1[0]), /* 1 */ /sizeof(asn_DEF_NetGameInfo_tags_1[0]), /* 1 */
asn_DEF_GameInfo_tags_1, /* Same as above */ asn_DEF_NetGameInfo_tags_1, /* Same as above */
sizeof(asn_DEF_GameInfo_tags_1) sizeof(asn_DEF_NetGameInfo_tags_1)
/sizeof(asn_DEF_GameInfo_tags_1[0]), /* 1 */ /sizeof(asn_DEF_NetGameInfo_tags_1[0]), /* 1 */
0, /* No PER visible constraints */ 0, /* No PER visible constraints */
asn_MBR_GameInfo_1, asn_MBR_NetGameInfo_1,
10, /* Elements count */ 10, /* Elements count */
&asn_SPC_GameInfo_specs_1 /* Additional specs */ &asn_SPC_NetGameInfo_specs_1 /* Additional specs */
}; };
@@ -4,8 +4,8 @@
* found in "../../../docs/pokerth.asn1" * found in "../../../docs/pokerth.asn1"
*/ */
#ifndef _GameInfo_H_ #ifndef _NetGameInfo_H_
#define _GameInfo_H_ #define _NetGameInfo_H_
#include <asn_application.h> #include <asn_application.h>
@@ -37,13 +37,13 @@ typedef enum endRaiseMode {
endRaiseMode_keepLastBlind = 3 endRaiseMode_keepLastBlind = 3
} e_endRaiseMode; } e_endRaiseMode;
/* GameInfo */ /* NetGameInfo */
typedef struct GameInfo { typedef struct NetGameInfo {
UTF8String_t gameName; UTF8String_t gameName;
long maxNumPlayers; long maxNumPlayers;
struct raiseIntervalMode { struct raiseIntervalMode {
raiseIntervalMode_PR present; raiseIntervalMode_PR present;
union GameInfo__raiseIntervalMode_u { union NetGameInfo__raiseIntervalMode_u {
long raiseEveryHands; long raiseEveryHands;
long raiseEveryMinutes; long raiseEveryMinutes;
/* /*
@@ -74,14 +74,14 @@ typedef struct GameInfo {
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx; asn_struct_ctx_t _asn_ctx;
} GameInfo_t; } NetGameInfo_t;
/* Implementation */ /* Implementation */
/* extern asn_TYPE_descriptor_t asn_DEF_endRaiseMode_8; // (Use -fall-defs-global to expose) */ /* 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 #ifdef __cplusplus
} }
#endif #endif
#endif /* _GameInfo_H_ */ #endif /* _NetGameInfo_H_ */
@@ -6,10 +6,10 @@
#include <asn_internal.h> #include <asn_internal.h>
#include "GameMode.h" #include "NetGameMode.h"
int 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) { asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */ /* Replace with underlying type checker */
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; 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. * so here we adjust the DEF accordingly.
*/ */
static void 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->free_struct = asn_DEF_NativeEnumerated.free_struct;
td->print_struct = asn_DEF_NativeEnumerated.print_struct; td->print_struct = asn_DEF_NativeEnumerated.print_struct;
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
@@ -38,91 +38,91 @@ GameMode_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
} }
void void
GameMode_free(asn_TYPE_descriptor_t *td, NetGameMode_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) { 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); td->free_struct(td, struct_ptr, contents_only);
} }
int 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) { 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); return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
} }
asn_dec_rval_t 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) { 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); return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
} }
asn_enc_rval_t 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, void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) { 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); return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
} }
asn_dec_rval_t 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) { 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); return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
} }
asn_enc_rval_t 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, int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) { 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); 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" }, { 1, 11, "gameCreated" },
{ 2, 11, "gameStarted" }, { 2, 11, "gameStarted" },
{ 3, 10, "gameClosed" } { 3, 10, "gameClosed" }
}; };
static unsigned int asn_MAP_GameMode_enum2value_1[] = { static unsigned int asn_MAP_NetGameMode_enum2value_1[] = {
2, /* gameClosed(3) */ 2, /* gameClosed(3) */
0, /* gameCreated(1) */ 0, /* gameCreated(1) */
1 /* gameStarted(2) */ 1 /* gameStarted(2) */
}; };
static asn_INTEGER_specifics_t asn_SPC_GameMode_specs_1 = { static asn_INTEGER_specifics_t asn_SPC_NetGameMode_specs_1 = {
asn_MAP_GameMode_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_NetGameMode_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_GameMode_enum2value_1, /* N => "tag"; sorted by N */ asn_MAP_NetGameMode_enum2value_1, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */ 3, /* Number of elements in the maps */
0, /* Enumeration is not extensible */ 0, /* Enumeration is not extensible */
1, /* Strict enumeration */ 1, /* Strict enumeration */
0, /* Native long size */ 0, /* Native long size */
0 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_TAG_CLASS_UNIVERSAL | (10 << 2))
}; };
asn_TYPE_descriptor_t asn_DEF_GameMode = { asn_TYPE_descriptor_t asn_DEF_NetGameMode = {
"GameMode", "NetGameMode",
"GameMode", "NetGameMode",
GameMode_free, NetGameMode_free,
GameMode_print, NetGameMode_print,
GameMode_constraint, NetGameMode_constraint,
GameMode_decode_ber, NetGameMode_decode_ber,
GameMode_encode_der, NetGameMode_encode_der,
GameMode_decode_xer, NetGameMode_decode_xer,
GameMode_encode_xer, NetGameMode_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */ 0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn_DEF_GameMode_tags_1, asn_DEF_NetGameMode_tags_1,
sizeof(asn_DEF_GameMode_tags_1) sizeof(asn_DEF_NetGameMode_tags_1)
/sizeof(asn_DEF_GameMode_tags_1[0]), /* 1 */ /sizeof(asn_DEF_NetGameMode_tags_1[0]), /* 1 */
asn_DEF_GameMode_tags_1, /* Same as above */ asn_DEF_NetGameMode_tags_1, /* Same as above */
sizeof(asn_DEF_GameMode_tags_1) sizeof(asn_DEF_NetGameMode_tags_1)
/sizeof(asn_DEF_GameMode_tags_1[0]), /* 1 */ /sizeof(asn_DEF_NetGameMode_tags_1[0]), /* 1 */
0, /* No PER visible constraints */ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */ 0, 0, /* Defined elsewhere */
&asn_SPC_GameMode_specs_1 /* Additional specs */ &asn_SPC_NetGameMode_specs_1 /* Additional specs */
}; };
+44
View File
@@ -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 <asn_application.h>
/* Including external dependencies */
#include <NativeEnumerated.h>
#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_ */
@@ -6,10 +6,10 @@
#include <asn_internal.h> #include <asn_internal.h>
#include "GameState.h" #include "NetGameState.h"
int 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) { asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */ /* Replace with underlying type checker */
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; 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. * so here we adjust the DEF accordingly.
*/ */
static void 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->free_struct = asn_DEF_NativeEnumerated.free_struct;
td->print_struct = asn_DEF_NativeEnumerated.print_struct; td->print_struct = asn_DEF_NativeEnumerated.print_struct;
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
@@ -38,50 +38,50 @@ GameState_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
} }
void void
GameState_free(asn_TYPE_descriptor_t *td, NetGameState_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) { 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); td->free_struct(td, struct_ptr, contents_only);
} }
int 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) { 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); return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
} }
asn_dec_rval_t 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) { 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); return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
} }
asn_enc_rval_t 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, void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) { 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); return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
} }
asn_dec_rval_t 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) { 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); return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
} }
asn_enc_rval_t 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, int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) { 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); 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" }, { 0, 12, "statePreflop" },
{ 1, 9, "stateFlop" }, { 1, 9, "stateFlop" },
{ 2, 9, "stateTurn" }, { 2, 9, "stateTurn" },
@@ -89,7 +89,7 @@ static asn_INTEGER_enum_map_t asn_MAP_GameState_value2enum_1[] = {
{ 4, 22, "statePreflopSmallBlind" }, { 4, 22, "statePreflopSmallBlind" },
{ 5, 20, "statePreflopBigBlind" } { 5, 20, "statePreflopBigBlind" }
}; };
static unsigned int asn_MAP_GameState_enum2value_1[] = { static unsigned int asn_MAP_NetGameState_enum2value_1[] = {
1, /* stateFlop(1) */ 1, /* stateFlop(1) */
0, /* statePreflop(0) */ 0, /* statePreflop(0) */
5, /* statePreflopBigBlind(5) */ 5, /* statePreflopBigBlind(5) */
@@ -97,38 +97,38 @@ static unsigned int asn_MAP_GameState_enum2value_1[] = {
3, /* stateRiver(3) */ 3, /* stateRiver(3) */
2 /* stateTurn(2) */ 2 /* stateTurn(2) */
}; };
static asn_INTEGER_specifics_t asn_SPC_GameState_specs_1 = { static asn_INTEGER_specifics_t asn_SPC_NetGameState_specs_1 = {
asn_MAP_GameState_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_NetGameState_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_GameState_enum2value_1, /* N => "tag"; sorted by N */ asn_MAP_NetGameState_enum2value_1, /* N => "tag"; sorted by N */
6, /* Number of elements in the maps */ 6, /* Number of elements in the maps */
0, /* Enumeration is not extensible */ 0, /* Enumeration is not extensible */
1, /* Strict enumeration */ 1, /* Strict enumeration */
0, /* Native long size */ 0, /* Native long size */
0 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_TAG_CLASS_UNIVERSAL | (10 << 2))
}; };
asn_TYPE_descriptor_t asn_DEF_GameState = { asn_TYPE_descriptor_t asn_DEF_NetGameState = {
"GameState", "NetGameState",
"GameState", "NetGameState",
GameState_free, NetGameState_free,
GameState_print, NetGameState_print,
GameState_constraint, NetGameState_constraint,
GameState_decode_ber, NetGameState_decode_ber,
GameState_encode_der, NetGameState_encode_der,
GameState_decode_xer, NetGameState_decode_xer,
GameState_encode_xer, NetGameState_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */ 0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn_DEF_GameState_tags_1, asn_DEF_NetGameState_tags_1,
sizeof(asn_DEF_GameState_tags_1) sizeof(asn_DEF_NetGameState_tags_1)
/sizeof(asn_DEF_GameState_tags_1[0]), /* 1 */ /sizeof(asn_DEF_NetGameState_tags_1[0]), /* 1 */
asn_DEF_GameState_tags_1, /* Same as above */ asn_DEF_NetGameState_tags_1, /* Same as above */
sizeof(asn_DEF_GameState_tags_1) sizeof(asn_DEF_NetGameState_tags_1)
/sizeof(asn_DEF_GameState_tags_1[0]), /* 1 */ /sizeof(asn_DEF_NetGameState_tags_1[0]), /* 1 */
0, /* No PER visible constraints */ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */ 0, 0, /* Defined elsewhere */
&asn_SPC_GameState_specs_1 /* Additional specs */ &asn_SPC_NetGameState_specs_1 /* Additional specs */
}; };
+47
View File
@@ -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 <asn_application.h>
/* Including external dependencies */
#include <NativeEnumerated.h>
#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_ */
@@ -6,10 +6,10 @@
#include <asn_internal.h> #include <asn_internal.h>
#include "PlayerAction.h" #include "NetPlayerAction.h"
int 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) { asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */ /* Replace with underlying type checker */
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints; 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. * so here we adjust the DEF accordingly.
*/ */
static void 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->free_struct = asn_DEF_NativeEnumerated.free_struct;
td->print_struct = asn_DEF_NativeEnumerated.print_struct; td->print_struct = asn_DEF_NativeEnumerated.print_struct;
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder; td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
@@ -38,50 +38,50 @@ PlayerAction_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
} }
void void
PlayerAction_free(asn_TYPE_descriptor_t *td, NetPlayerAction_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) { 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); td->free_struct(td, struct_ptr, contents_only);
} }
int 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) { 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); return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
} }
asn_dec_rval_t 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) { 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); return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
} }
asn_enc_rval_t 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, void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) { 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); return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
} }
asn_dec_rval_t 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) { 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); return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
} }
asn_enc_rval_t 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, int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) { 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); 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" }, { 0, 10, "actionNone" },
{ 1, 10, "actionFold" }, { 1, 10, "actionFold" },
{ 2, 11, "actionCheck" }, { 2, 11, "actionCheck" },
@@ -90,7 +90,7 @@ static asn_INTEGER_enum_map_t asn_MAP_PlayerAction_value2enum_1[] = {
{ 5, 11, "actionRaise" }, { 5, 11, "actionRaise" },
{ 6, 11, "actionAllIn" } { 6, 11, "actionAllIn" }
}; };
static unsigned int asn_MAP_PlayerAction_enum2value_1[] = { static unsigned int asn_MAP_NetPlayerAction_enum2value_1[] = {
6, /* actionAllIn(6) */ 6, /* actionAllIn(6) */
4, /* actionBet(4) */ 4, /* actionBet(4) */
3, /* actionCall(3) */ 3, /* actionCall(3) */
@@ -99,38 +99,38 @@ static unsigned int asn_MAP_PlayerAction_enum2value_1[] = {
0, /* actionNone(0) */ 0, /* actionNone(0) */
5 /* actionRaise(5) */ 5 /* actionRaise(5) */
}; };
static asn_INTEGER_specifics_t asn_SPC_PlayerAction_specs_1 = { static asn_INTEGER_specifics_t asn_SPC_NetPlayerAction_specs_1 = {
asn_MAP_PlayerAction_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_NetPlayerAction_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_PlayerAction_enum2value_1, /* N => "tag"; sorted by N */ asn_MAP_NetPlayerAction_enum2value_1, /* N => "tag"; sorted by N */
7, /* Number of elements in the maps */ 7, /* Number of elements in the maps */
0, /* Enumeration is not extensible */ 0, /* Enumeration is not extensible */
1, /* Strict enumeration */ 1, /* Strict enumeration */
0, /* Native long size */ 0, /* Native long size */
0 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_TAG_CLASS_UNIVERSAL | (10 << 2))
}; };
asn_TYPE_descriptor_t asn_DEF_PlayerAction = { asn_TYPE_descriptor_t asn_DEF_NetPlayerAction = {
"PlayerAction", "NetPlayerAction",
"PlayerAction", "NetPlayerAction",
PlayerAction_free, NetPlayerAction_free,
PlayerAction_print, NetPlayerAction_print,
PlayerAction_constraint, NetPlayerAction_constraint,
PlayerAction_decode_ber, NetPlayerAction_decode_ber,
PlayerAction_encode_der, NetPlayerAction_encode_der,
PlayerAction_decode_xer, NetPlayerAction_decode_xer,
PlayerAction_encode_xer, NetPlayerAction_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */ 0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn_DEF_PlayerAction_tags_1, asn_DEF_NetPlayerAction_tags_1,
sizeof(asn_DEF_PlayerAction_tags_1) sizeof(asn_DEF_NetPlayerAction_tags_1)
/sizeof(asn_DEF_PlayerAction_tags_1[0]), /* 1 */ /sizeof(asn_DEF_NetPlayerAction_tags_1[0]), /* 1 */
asn_DEF_PlayerAction_tags_1, /* Same as above */ asn_DEF_NetPlayerAction_tags_1, /* Same as above */
sizeof(asn_DEF_PlayerAction_tags_1) sizeof(asn_DEF_NetPlayerAction_tags_1)
/sizeof(asn_DEF_PlayerAction_tags_1[0]), /* 1 */ /sizeof(asn_DEF_NetPlayerAction_tags_1[0]), /* 1 */
0, /* No PER visible constraints */ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */ 0, 0, /* Defined elsewhere */
&asn_SPC_PlayerAction_specs_1 /* Additional specs */ &asn_SPC_NetPlayerAction_specs_1 /* Additional specs */
}; };
+48
View File
@@ -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 <asn_application.h>
/* Including external dependencies */
#include <NativeEnumerated.h>
#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_ */
-48
View File
@@ -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 <asn_application.h>
/* Including external dependencies */
#include <NativeEnumerated.h>
#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_ */
+2 -2
View File
@@ -130,7 +130,7 @@ static asn_TYPE_member_t asn_MBR_PlayersActionDoneMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, gameState), { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, gameState),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_GameState, &asn_DEF_NetGameState,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
@@ -139,7 +139,7 @@ static asn_TYPE_member_t asn_MBR_PlayersActionDoneMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, playerAction), { ATF_NOFLAGS, 0, offsetof(struct PlayersActionDoneMessage, playerAction),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_PlayerAction, &asn_DEF_NetPlayerAction,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
+4 -4
View File
@@ -12,8 +12,8 @@
/* Including external dependencies */ /* Including external dependencies */
#include "NonZeroId.h" #include "NonZeroId.h"
#include "GameState.h" #include "NetGameState.h"
#include "PlayerAction.h" #include "NetPlayerAction.h"
#include <NativeInteger.h> #include <NativeInteger.h>
#include <constr_SEQUENCE.h> #include <constr_SEQUENCE.h>
@@ -25,8 +25,8 @@ extern "C" {
typedef struct PlayersActionDoneMessage { typedef struct PlayersActionDoneMessage {
NonZeroId_t gameId; NonZeroId_t gameId;
NonZeroId_t playerId; NonZeroId_t playerId;
GameState_t gameState; NetGameState_t gameState;
PlayerAction_t playerAction; NetPlayerAction_t playerAction;
long totalPlayerBet; long totalPlayerBet;
long playerMoney; long playerMoney;
long highestSet; long highestSet;
+1 -1
View File
@@ -30,7 +30,7 @@ static asn_TYPE_member_t asn_MBR_PlayersTurnMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct PlayersTurnMessage, gameState), { ATF_NOFLAGS, 0, offsetof(struct PlayersTurnMessage, gameState),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_GameState, &asn_DEF_NetGameState,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
+2 -2
View File
@@ -12,7 +12,7 @@
/* Including external dependencies */ /* Including external dependencies */
#include "NonZeroId.h" #include "NonZeroId.h"
#include "GameState.h" #include "NetGameState.h"
#include <constr_SEQUENCE.h> #include <constr_SEQUENCE.h>
#ifdef __cplusplus #ifdef __cplusplus
@@ -23,7 +23,7 @@ extern "C" {
typedef struct PlayersTurnMessage { typedef struct PlayersTurnMessage {
NonZeroId_t gameId; NonZeroId_t gameId;
NonZeroId_t playerId; NonZeroId_t playerId;
GameState_t gameState; NetGameState_t gameState;
/* /*
* This type is extensible, * This type is extensible,
* possible extensions are below. * possible extensions are below.
+2 -2
View File
@@ -165,7 +165,7 @@ static asn_TYPE_member_t asn_MBR_YourActionRejectedMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, gameState), { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, gameState),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_GameState, &asn_DEF_NetGameState,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
@@ -174,7 +174,7 @@ static asn_TYPE_member_t asn_MBR_YourActionRejectedMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, yourAction), { ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, yourAction),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
0, 0,
&asn_DEF_PlayerAction, &asn_DEF_NetPlayerAction,
0, /* Defer constraints checking to the member type */ 0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */ 0, /* PER is not compiled, use -gen-PER */
0, 0,
+4 -4
View File
@@ -12,8 +12,8 @@
/* Including external dependencies */ /* Including external dependencies */
#include "NonZeroId.h" #include "NonZeroId.h"
#include "GameState.h" #include "NetGameState.h"
#include "PlayerAction.h" #include "NetPlayerAction.h"
#include <NativeInteger.h> #include <NativeInteger.h>
#include <NativeEnumerated.h> #include <NativeEnumerated.h>
#include <constr_SEQUENCE.h> #include <constr_SEQUENCE.h>
@@ -32,8 +32,8 @@ typedef enum rejectionReason {
/* YourActionRejectedMessage */ /* YourActionRejectedMessage */
typedef struct YourActionRejectedMessage { typedef struct YourActionRejectedMessage {
NonZeroId_t gameId; NonZeroId_t gameId;
GameState_t gameState; NetGameState_t gameState;
PlayerAction_t yourAction; NetPlayerAction_t yourAction;
long yourRelativeBet; long yourRelativeBet;
long rejectionReason; long rejectionReason;
/* /*