Adding code which was generated by asn1c from pokerth.asn1 using the call asn1c -fnative-types. Note the license file (COPYING_asn1c).
This commit is contained in:
+141
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AllInShowCardsMessage.h"
|
||||
|
||||
static int
|
||||
memb_playersAllIn_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Determine the number of elements */
|
||||
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
|
||||
|
||||
if((size >= 1 && size <= 10)) {
|
||||
/* Perform validation of the inner elements */
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_playersAllIn_3[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_PlayerAllIn,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_playersAllIn_tags_3[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_playersAllIn_specs_3 = {
|
||||
sizeof(struct playersAllIn),
|
||||
offsetof(struct playersAllIn, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_playersAllIn_3 = {
|
||||
"playersAllIn",
|
||||
"playersAllIn",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_playersAllIn_tags_3,
|
||||
sizeof(asn_DEF_playersAllIn_tags_3)
|
||||
/sizeof(asn_DEF_playersAllIn_tags_3[0]), /* 1 */
|
||||
asn_DEF_playersAllIn_tags_3, /* Same as above */
|
||||
sizeof(asn_DEF_playersAllIn_tags_3)
|
||||
/sizeof(asn_DEF_playersAllIn_tags_3[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_playersAllIn_3,
|
||||
1, /* Single element */
|
||||
&asn_SPC_playersAllIn_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_AllInShowCardsMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AllInShowCardsMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AllInShowCardsMessage, playersAllIn),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_playersAllIn_3,
|
||||
memb_playersAllIn_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playersAllIn"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_AllInShowCardsMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (24 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_AllInShowCardsMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 381 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* playersAllIn at 383 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_AllInShowCardsMessage_specs_1 = {
|
||||
sizeof(struct AllInShowCardsMessage),
|
||||
offsetof(struct AllInShowCardsMessage, _asn_ctx),
|
||||
asn_MAP_AllInShowCardsMessage_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AllInShowCardsMessage = {
|
||||
"AllInShowCardsMessage",
|
||||
"AllInShowCardsMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AllInShowCardsMessage_tags_1,
|
||||
sizeof(asn_DEF_AllInShowCardsMessage_tags_1)
|
||||
/sizeof(asn_DEF_AllInShowCardsMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_AllInShowCardsMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AllInShowCardsMessage_tags_1)
|
||||
/sizeof(asn_DEF_AllInShowCardsMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_AllInShowCardsMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_AllInShowCardsMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AllInShowCardsMessage_H_
|
||||
#define _AllInShowCardsMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Forward declarations */
|
||||
struct PlayerAllIn;
|
||||
|
||||
/* AllInShowCardsMessage */
|
||||
typedef struct AllInShowCardsMessage {
|
||||
NonZeroId_t gameId;
|
||||
struct playersAllIn {
|
||||
A_SEQUENCE_OF(struct PlayerAllIn) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} playersAllIn;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} AllInShowCardsMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AllInShowCardsMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Referred external types */
|
||||
#include "PlayerAllIn.h"
|
||||
|
||||
#endif /* _AllInShowCardsMessage_H_ */
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AnonymousLogin.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_AnonymousLogin_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AnonymousLogin, playerName),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
0,
|
||||
&asn_DEF_UTF8String,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerName"
|
||||
},
|
||||
{ ATF_POINTER, 1, offsetof(struct AnonymousLogin, avatar),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
|
||||
0,
|
||||
&asn_DEF_AvatarHash,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatar"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_AnonymousLogin_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_AnonymousLogin_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* avatar at 77 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* playerName at 76 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_AnonymousLogin_specs_1 = {
|
||||
sizeof(struct AnonymousLogin),
|
||||
offsetof(struct AnonymousLogin, _asn_ctx),
|
||||
asn_MAP_AnonymousLogin_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AnonymousLogin = {
|
||||
"AnonymousLogin",
|
||||
"AnonymousLogin",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AnonymousLogin_tags_1,
|
||||
sizeof(asn_DEF_AnonymousLogin_tags_1)
|
||||
/sizeof(asn_DEF_AnonymousLogin_tags_1[0]), /* 1 */
|
||||
asn_DEF_AnonymousLogin_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AnonymousLogin_tags_1)
|
||||
/sizeof(asn_DEF_AnonymousLogin_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_AnonymousLogin_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_AnonymousLogin_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AnonymousLogin_H_
|
||||
#define _AnonymousLogin_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <UTF8String.h>
|
||||
#include "AvatarHash.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* AnonymousLogin */
|
||||
typedef struct AnonymousLogin {
|
||||
UTF8String_t playerName;
|
||||
AvatarHash_t *avatar /* OPTIONAL */;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} AnonymousLogin_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AnonymousLogin;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AnonymousLogin_H_ */
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AuthenticatedLogin.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_AuthenticatedLogin_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AuthenticatedLogin, playerName),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
0,
|
||||
&asn_DEF_UTF8String,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerName"
|
||||
},
|
||||
{ ATF_POINTER, 1, offsetof(struct AuthenticatedLogin, avatar),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
|
||||
0,
|
||||
&asn_DEF_AvatarHash,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatar"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_AuthenticatedLogin_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_AuthenticatedLogin_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* avatar at 83 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* playerName at 82 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_AuthenticatedLogin_specs_1 = {
|
||||
sizeof(struct AuthenticatedLogin),
|
||||
offsetof(struct AuthenticatedLogin, _asn_ctx),
|
||||
asn_MAP_AuthenticatedLogin_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AuthenticatedLogin = {
|
||||
"AuthenticatedLogin",
|
||||
"AuthenticatedLogin",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AuthenticatedLogin_tags_1,
|
||||
sizeof(asn_DEF_AuthenticatedLogin_tags_1)
|
||||
/sizeof(asn_DEF_AuthenticatedLogin_tags_1[0]), /* 1 */
|
||||
asn_DEF_AuthenticatedLogin_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AuthenticatedLogin_tags_1)
|
||||
/sizeof(asn_DEF_AuthenticatedLogin_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_AuthenticatedLogin_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_AuthenticatedLogin_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AuthenticatedLogin_H_
|
||||
#define _AuthenticatedLogin_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <UTF8String.h>
|
||||
#include "AvatarHash.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* AuthenticatedLogin */
|
||||
typedef struct AuthenticatedLogin {
|
||||
UTF8String_t playerName;
|
||||
AvatarHash_t *avatar /* OPTIONAL */;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} AuthenticatedLogin_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AuthenticatedLogin;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AuthenticatedLogin_H_ */
|
||||
Vendored
+86
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AvatarData.h"
|
||||
|
||||
static int
|
||||
memb_avatarBlock_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
size = st->size;
|
||||
|
||||
if((size >= 1 && size <= 256)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_AvatarData_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AvatarData, avatarBlock),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
|
||||
0,
|
||||
&asn_DEF_OCTET_STRING,
|
||||
memb_avatarBlock_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatarBlock"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_AvatarData_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_AvatarData_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* avatarBlock at 117 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_AvatarData_specs_1 = {
|
||||
sizeof(struct AvatarData),
|
||||
offsetof(struct AvatarData, _asn_ctx),
|
||||
asn_MAP_AvatarData_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AvatarData = {
|
||||
"AvatarData",
|
||||
"AvatarData",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AvatarData_tags_1,
|
||||
sizeof(asn_DEF_AvatarData_tags_1)
|
||||
/sizeof(asn_DEF_AvatarData_tags_1[0]), /* 1 */
|
||||
asn_DEF_AvatarData_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AvatarData_tags_1)
|
||||
/sizeof(asn_DEF_AvatarData_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_AvatarData_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_AvatarData_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AvatarData_H_
|
||||
#define _AvatarData_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <OCTET_STRING.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* AvatarData */
|
||||
typedef struct AvatarData {
|
||||
OCTET_STRING_t avatarBlock;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} AvatarData_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AvatarData;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AvatarData_H_ */
|
||||
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AvatarEnd.h"
|
||||
|
||||
static ber_tlv_tag_t asn_DEF_AvatarEnd_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_AvatarEnd_specs_1 = {
|
||||
sizeof(struct AvatarEnd),
|
||||
offsetof(struct AvatarEnd, _asn_ctx),
|
||||
0, /* No top level tags */
|
||||
0, /* No tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
-1, /* Start extensions */
|
||||
-1 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AvatarEnd = {
|
||||
"AvatarEnd",
|
||||
"AvatarEnd",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AvatarEnd_tags_1,
|
||||
sizeof(asn_DEF_AvatarEnd_tags_1)
|
||||
/sizeof(asn_DEF_AvatarEnd_tags_1[0]), /* 1 */
|
||||
asn_DEF_AvatarEnd_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AvatarEnd_tags_1)
|
||||
/sizeof(asn_DEF_AvatarEnd_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* No members */
|
||||
&asn_SPC_AvatarEnd_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AvatarEnd_H_
|
||||
#define _AvatarEnd_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* AvatarEnd */
|
||||
typedef struct AvatarEnd {
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} AvatarEnd_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AvatarEnd;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AvatarEnd_H_ */
|
||||
Vendored
+127
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AvatarHash.h"
|
||||
|
||||
int
|
||||
AvatarHash_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
size = st->size;
|
||||
|
||||
if((size == 20)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using OCTET_STRING,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
AvatarHash_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_OCTET_STRING.free_struct;
|
||||
td->print_struct = asn_DEF_OCTET_STRING.print_struct;
|
||||
td->ber_decoder = asn_DEF_OCTET_STRING.ber_decoder;
|
||||
td->der_encoder = asn_DEF_OCTET_STRING.der_encoder;
|
||||
td->xer_decoder = asn_DEF_OCTET_STRING.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_OCTET_STRING.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_OCTET_STRING.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_OCTET_STRING.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_OCTET_STRING.per_constraints;
|
||||
td->elements = asn_DEF_OCTET_STRING.elements;
|
||||
td->elements_count = asn_DEF_OCTET_STRING.elements_count;
|
||||
td->specifics = asn_DEF_OCTET_STRING.specifics;
|
||||
}
|
||||
|
||||
void
|
||||
AvatarHash_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
AvatarHash_1_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
int
|
||||
AvatarHash_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
AvatarHash_1_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
AvatarHash_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
AvatarHash_1_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
AvatarHash_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
AvatarHash_1_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
AvatarHash_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
AvatarHash_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
AvatarHash_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
AvatarHash_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static ber_tlv_tag_t asn_DEF_AvatarHash_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AvatarHash = {
|
||||
"AvatarHash",
|
||||
"AvatarHash",
|
||||
AvatarHash_free,
|
||||
AvatarHash_print,
|
||||
AvatarHash_constraint,
|
||||
AvatarHash_decode_ber,
|
||||
AvatarHash_encode_der,
|
||||
AvatarHash_decode_xer,
|
||||
AvatarHash_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AvatarHash_tags_1,
|
||||
sizeof(asn_DEF_AvatarHash_tags_1)
|
||||
/sizeof(asn_DEF_AvatarHash_tags_1[0]), /* 1 */
|
||||
asn_DEF_AvatarHash_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AvatarHash_tags_1)
|
||||
/sizeof(asn_DEF_AvatarHash_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* No members */
|
||||
0 /* No specifics */
|
||||
};
|
||||
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AvatarHash_H_
|
||||
#define _AvatarHash_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <OCTET_STRING.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* AvatarHash */
|
||||
typedef OCTET_STRING_t AvatarHash_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AvatarHash;
|
||||
asn_struct_free_f AvatarHash_free;
|
||||
asn_struct_print_f AvatarHash_print;
|
||||
asn_constr_check_f AvatarHash_constraint;
|
||||
ber_type_decoder_f AvatarHash_decode_ber;
|
||||
der_type_encoder_f AvatarHash_encode_der;
|
||||
xer_type_decoder_f AvatarHash_decode_xer;
|
||||
xer_type_encoder_f AvatarHash_encode_xer;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AvatarHash_H_ */
|
||||
Vendored
+95
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AvatarHeader.h"
|
||||
|
||||
static int
|
||||
memb_avatarSize_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 32 && value <= 30720)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_AvatarHeader_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AvatarHeader, avatarType),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
|
||||
0,
|
||||
&asn_DEF_AvatarType,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatarType"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AvatarHeader, avatarSize),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_avatarSize_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatarSize"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_AvatarHeader_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_AvatarHeader_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* avatarSize at 113 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* avatarType at 112 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_AvatarHeader_specs_1 = {
|
||||
sizeof(struct AvatarHeader),
|
||||
offsetof(struct AvatarHeader, _asn_ctx),
|
||||
asn_MAP_AvatarHeader_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AvatarHeader = {
|
||||
"AvatarHeader",
|
||||
"AvatarHeader",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AvatarHeader_tags_1,
|
||||
sizeof(asn_DEF_AvatarHeader_tags_1)
|
||||
/sizeof(asn_DEF_AvatarHeader_tags_1[0]), /* 1 */
|
||||
asn_DEF_AvatarHeader_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AvatarHeader_tags_1)
|
||||
/sizeof(asn_DEF_AvatarHeader_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_AvatarHeader_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_AvatarHeader_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AvatarHeader_H_
|
||||
#define _AvatarHeader_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "AvatarType.h"
|
||||
#include <NativeInteger.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* AvatarHeader */
|
||||
typedef struct AvatarHeader {
|
||||
AvatarType_t avatarType;
|
||||
long avatarSize;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} AvatarHeader_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AvatarHeader;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AvatarHeader_H_ */
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AvatarReplyMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_avatarResult_3[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct avatarResult, choice.avatarHeader),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_AvatarHeader,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatarHeader"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct avatarResult, choice.avatarData),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_AvatarData,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatarData"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct avatarResult, choice.avatarEnd),
|
||||
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_AvatarEnd,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatarEnd"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct avatarResult, choice.unknownAvatar),
|
||||
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_UnknownAvatar,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"unknownAvatar"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_avatarResult_tag2el_3[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* avatarHeader at 104 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* avatarData at 105 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* avatarEnd at 106 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* unknownAvatar at 108 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_avatarResult_specs_3 = {
|
||||
sizeof(struct avatarResult),
|
||||
offsetof(struct avatarResult, _asn_ctx),
|
||||
offsetof(struct avatarResult, present),
|
||||
sizeof(((struct avatarResult *)0)->present),
|
||||
asn_MAP_avatarResult_tag2el_3,
|
||||
4, /* Count of tags in the map */
|
||||
0,
|
||||
4 /* Extensions start */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_avatarResult_3 = {
|
||||
"avatarResult",
|
||||
"avatarResult",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
0, /* No tags (count) */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_avatarResult_3,
|
||||
4, /* Elements count */
|
||||
&asn_SPC_avatarResult_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_AvatarReplyMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AvatarReplyMessage, requestId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"requestId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AvatarReplyMessage, avatarResult),
|
||||
-1 /* Ambiguous tag (CHOICE?) */,
|
||||
0,
|
||||
&asn_DEF_avatarResult_3,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatarResult"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_AvatarReplyMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (3 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_AvatarReplyMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* requestId at 102 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* avatarHeader at 104 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* avatarData at 105 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* avatarEnd at 106 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* unknownAvatar at 108 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_AvatarReplyMessage_specs_1 = {
|
||||
sizeof(struct AvatarReplyMessage),
|
||||
offsetof(struct AvatarReplyMessage, _asn_ctx),
|
||||
asn_MAP_AvatarReplyMessage_tag2el_1,
|
||||
5, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AvatarReplyMessage = {
|
||||
"AvatarReplyMessage",
|
||||
"AvatarReplyMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AvatarReplyMessage_tags_1,
|
||||
sizeof(asn_DEF_AvatarReplyMessage_tags_1)
|
||||
/sizeof(asn_DEF_AvatarReplyMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_AvatarReplyMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AvatarReplyMessage_tags_1)
|
||||
/sizeof(asn_DEF_AvatarReplyMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_AvatarReplyMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_AvatarReplyMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AvatarReplyMessage_H_
|
||||
#define _AvatarReplyMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "AvatarHeader.h"
|
||||
#include "AvatarData.h"
|
||||
#include "AvatarEnd.h"
|
||||
#include "UnknownAvatar.h"
|
||||
#include <constr_CHOICE.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum avatarResult_PR {
|
||||
avatarResult_PR_NOTHING, /* No components present */
|
||||
avatarResult_PR_avatarHeader,
|
||||
avatarResult_PR_avatarData,
|
||||
avatarResult_PR_avatarEnd,
|
||||
avatarResult_PR_unknownAvatar,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} avatarResult_PR;
|
||||
|
||||
/* AvatarReplyMessage */
|
||||
typedef struct AvatarReplyMessage {
|
||||
NonZeroId_t requestId;
|
||||
struct avatarResult {
|
||||
avatarResult_PR present;
|
||||
union AvatarReplyMessage__avatarResult_u {
|
||||
AvatarHeader_t avatarHeader;
|
||||
AvatarData_t avatarData;
|
||||
AvatarEnd_t avatarEnd;
|
||||
UnknownAvatar_t unknownAvatar;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} avatarResult;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} AvatarReplyMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AvatarReplyMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AvatarReplyMessage_H_ */
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AvatarRequestMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_AvatarRequestMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AvatarRequestMessage, requestId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"requestId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct AvatarRequestMessage, avatar),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
|
||||
0,
|
||||
&asn_DEF_AvatarHash,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"avatar"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_AvatarRequestMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (2 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_AvatarRequestMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* requestId at 97 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 } /* avatar at 99 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_AvatarRequestMessage_specs_1 = {
|
||||
sizeof(struct AvatarRequestMessage),
|
||||
offsetof(struct AvatarRequestMessage, _asn_ctx),
|
||||
asn_MAP_AvatarRequestMessage_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AvatarRequestMessage = {
|
||||
"AvatarRequestMessage",
|
||||
"AvatarRequestMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AvatarRequestMessage_tags_1,
|
||||
sizeof(asn_DEF_AvatarRequestMessage_tags_1)
|
||||
/sizeof(asn_DEF_AvatarRequestMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_AvatarRequestMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AvatarRequestMessage_tags_1)
|
||||
/sizeof(asn_DEF_AvatarRequestMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_AvatarRequestMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_AvatarRequestMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AvatarRequestMessage_H_
|
||||
#define _AvatarRequestMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "AvatarHash.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* AvatarRequestMessage */
|
||||
typedef struct AvatarRequestMessage {
|
||||
NonZeroId_t requestId;
|
||||
AvatarHash_t avatar;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} AvatarRequestMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AvatarRequestMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AvatarRequestMessage_H_ */
|
||||
Vendored
+128
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "AvatarType.h"
|
||||
|
||||
int
|
||||
AvatarType_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeEnumerated,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
AvatarType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
|
||||
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
|
||||
td->elements = asn_DEF_NativeEnumerated.elements;
|
||||
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
|
||||
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
|
||||
}
|
||||
|
||||
void
|
||||
AvatarType_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
AvatarType_1_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
int
|
||||
AvatarType_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
AvatarType_1_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
AvatarType_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
AvatarType_1_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
AvatarType_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
AvatarType_1_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
AvatarType_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
AvatarType_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
AvatarType_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
AvatarType_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_INTEGER_enum_map_t asn_MAP_AvatarType_value2enum_1[] = {
|
||||
{ 1, 8, "imagePng" },
|
||||
{ 2, 8, "imageJpg" },
|
||||
{ 3, 8, "imageGif" }
|
||||
};
|
||||
static unsigned int asn_MAP_AvatarType_enum2value_1[] = {
|
||||
2, /* imageGif(3) */
|
||||
1, /* imageJpg(2) */
|
||||
0 /* imagePng(1) */
|
||||
};
|
||||
static asn_INTEGER_specifics_t asn_SPC_AvatarType_specs_1 = {
|
||||
asn_MAP_AvatarType_value2enum_1, /* "tag" => N; sorted by tag */
|
||||
asn_MAP_AvatarType_enum2value_1, /* N => "tag"; sorted by N */
|
||||
3, /* Number of elements in the maps */
|
||||
0, /* Enumeration is not extensible */
|
||||
1, /* Strict enumeration */
|
||||
0, /* Native long size */
|
||||
0
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_AvatarType_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_AvatarType = {
|
||||
"AvatarType",
|
||||
"AvatarType",
|
||||
AvatarType_free,
|
||||
AvatarType_print,
|
||||
AvatarType_constraint,
|
||||
AvatarType_decode_ber,
|
||||
AvatarType_encode_der,
|
||||
AvatarType_decode_xer,
|
||||
AvatarType_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_AvatarType_tags_1,
|
||||
sizeof(asn_DEF_AvatarType_tags_1)
|
||||
/sizeof(asn_DEF_AvatarType_tags_1[0]), /* 1 */
|
||||
asn_DEF_AvatarType_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_AvatarType_tags_1)
|
||||
/sizeof(asn_DEF_AvatarType_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* Defined elsewhere */
|
||||
&asn_SPC_AvatarType_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _AvatarType_H_
|
||||
#define _AvatarType_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <NativeEnumerated.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum AvatarType {
|
||||
AvatarType_imagePng = 1,
|
||||
AvatarType_imageJpg = 2,
|
||||
AvatarType_imageGif = 3
|
||||
} e_AvatarType;
|
||||
|
||||
/* AvatarType */
|
||||
typedef long AvatarType_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AvatarType;
|
||||
asn_struct_free_f AvatarType_free;
|
||||
asn_struct_print_f AvatarType_print;
|
||||
asn_constr_check_f AvatarType_constraint;
|
||||
ber_type_decoder_f AvatarType_decode_ber;
|
||||
der_type_encoder_f AvatarType_encode_der;
|
||||
xer_type_decoder_f AvatarType_decode_xer;
|
||||
xer_type_encoder_f AvatarType_encode_xer;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AvatarType_H_ */
|
||||
+1
@@ -0,0 +1 @@
|
||||
/opt/local/share/asn1c/BIT_STRING.c
|
||||
+1
@@ -0,0 +1 @@
|
||||
/opt/local/share/asn1c/BIT_STRING.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
/opt/local/share/asn1c/BOOLEAN.c
|
||||
+1
@@ -0,0 +1 @@
|
||||
/opt/local/share/asn1c/BOOLEAN.h
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
These files are generated using asn1c.
|
||||
http://lionet.info/asn1c/
|
||||
/*-
|
||||
* Copyright (c) 2003, 2004, 2005, 2006, 2007 Lev Walkin <vlm@lionet.info>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: COPYING 1293 2007-06-23 18:33:31Z vlm $
|
||||
*/
|
||||
Vendored
+126
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "Card.h"
|
||||
|
||||
int
|
||||
Card_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 0 && value <= 51)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeInteger,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
Card_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeInteger.free_struct;
|
||||
td->print_struct = asn_DEF_NativeInteger.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeInteger.per_constraints;
|
||||
td->elements = asn_DEF_NativeInteger.elements;
|
||||
td->elements_count = asn_DEF_NativeInteger.elements_count;
|
||||
td->specifics = asn_DEF_NativeInteger.specifics;
|
||||
}
|
||||
|
||||
void
|
||||
Card_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
Card_1_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
int
|
||||
Card_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Card_1_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
Card_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
Card_1_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
Card_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Card_1_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
Card_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
Card_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
Card_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Card_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static ber_tlv_tag_t asn_DEF_Card_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_Card = {
|
||||
"Card",
|
||||
"Card",
|
||||
Card_free,
|
||||
Card_print,
|
||||
Card_constraint,
|
||||
Card_decode_ber,
|
||||
Card_encode_der,
|
||||
Card_decode_xer,
|
||||
Card_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Card_tags_1,
|
||||
sizeof(asn_DEF_Card_tags_1)
|
||||
/sizeof(asn_DEF_Card_tags_1[0]), /* 1 */
|
||||
asn_DEF_Card_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_Card_tags_1)
|
||||
/sizeof(asn_DEF_Card_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* No members */
|
||||
0 /* No specifics */
|
||||
};
|
||||
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _Card_H_
|
||||
#define _Card_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <NativeInteger.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Card */
|
||||
typedef long Card_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_Card;
|
||||
asn_struct_free_f Card_free;
|
||||
asn_struct_print_f Card_print;
|
||||
asn_constr_check_f Card_constraint;
|
||||
ber_type_decoder_f Card_decode_ber;
|
||||
der_type_encoder_f Card_encode_der;
|
||||
xer_type_decoder_f Card_decode_xer;
|
||||
xer_type_encoder_f Card_encode_xer;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Card_H_ */
|
||||
Vendored
+81
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "ChatMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_ChatMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct ChatMessage, playerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_Id,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct ChatMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_Id,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct ChatMessage, chatText),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
0,
|
||||
&asn_DEF_UTF8String,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"chatText"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_ChatMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (130 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_ChatMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* playerId at 439 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* gameId at 440 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 2, 0, 0 } /* chatText at 441 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_ChatMessage_specs_1 = {
|
||||
sizeof(struct ChatMessage),
|
||||
offsetof(struct ChatMessage, _asn_ctx),
|
||||
asn_MAP_ChatMessage_tag2el_1,
|
||||
3, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
2, /* Start extensions */
|
||||
4 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ChatMessage = {
|
||||
"ChatMessage",
|
||||
"ChatMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_ChatMessage_tags_1,
|
||||
sizeof(asn_DEF_ChatMessage_tags_1)
|
||||
/sizeof(asn_DEF_ChatMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_ChatMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_ChatMessage_tags_1)
|
||||
/sizeof(asn_DEF_ChatMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_ChatMessage_1,
|
||||
3, /* Elements count */
|
||||
&asn_SPC_ChatMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _ChatMessage_H_
|
||||
#define _ChatMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "Id.h"
|
||||
#include <UTF8String.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* ChatMessage */
|
||||
typedef struct ChatMessage {
|
||||
Id_t playerId;
|
||||
Id_t gameId;
|
||||
UTF8String_t chatText;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} ChatMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_ChatMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ChatMessage_H_ */
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "ChatRequestMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_ChatRequestMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct ChatRequestMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_Id,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct ChatRequestMessage, chatText),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
0,
|
||||
&asn_DEF_UTF8String,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"chatText"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_ChatRequestMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (129 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_ChatRequestMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 434 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 } /* chatText at 435 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_ChatRequestMessage_specs_1 = {
|
||||
sizeof(struct ChatRequestMessage),
|
||||
offsetof(struct ChatRequestMessage, _asn_ctx),
|
||||
asn_MAP_ChatRequestMessage_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ChatRequestMessage = {
|
||||
"ChatRequestMessage",
|
||||
"ChatRequestMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_ChatRequestMessage_tags_1,
|
||||
sizeof(asn_DEF_ChatRequestMessage_tags_1)
|
||||
/sizeof(asn_DEF_ChatRequestMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_ChatRequestMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_ChatRequestMessage_tags_1)
|
||||
/sizeof(asn_DEF_ChatRequestMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_ChatRequestMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_ChatRequestMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _ChatRequestMessage_H_
|
||||
#define _ChatRequestMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "Id.h"
|
||||
#include <UTF8String.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* ChatRequestMessage */
|
||||
typedef struct ChatRequestMessage {
|
||||
Id_t gameId;
|
||||
UTF8String_t chatText;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} ChatRequestMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_ChatRequestMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ChatRequestMessage_H_ */
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "DealFlopCardsMessage.h"
|
||||
|
||||
static int
|
||||
memb_flopCards_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Determine the number of elements */
|
||||
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
|
||||
|
||||
if((size == 3)) {
|
||||
/* Perform validation of the inner elements */
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_flopCards_3[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_Card,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_flopCards_tags_3[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_flopCards_specs_3 = {
|
||||
sizeof(struct flopCards),
|
||||
offsetof(struct flopCards, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_flopCards_3 = {
|
||||
"flopCards",
|
||||
"flopCards",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_flopCards_tags_3,
|
||||
sizeof(asn_DEF_flopCards_tags_3)
|
||||
/sizeof(asn_DEF_flopCards_tags_3[0]), /* 1 */
|
||||
asn_DEF_flopCards_tags_3, /* Same as above */
|
||||
sizeof(asn_DEF_flopCards_tags_3)
|
||||
/sizeof(asn_DEF_flopCards_tags_3[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_flopCards_3,
|
||||
1, /* Single element */
|
||||
&asn_SPC_flopCards_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_DealFlopCardsMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct DealFlopCardsMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct DealFlopCardsMessage, flopCards),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_flopCards_3,
|
||||
memb_flopCards_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"flopCards"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_DealFlopCardsMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (21 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_DealFlopCardsMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 366 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* flopCards at 368 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_DealFlopCardsMessage_specs_1 = {
|
||||
sizeof(struct DealFlopCardsMessage),
|
||||
offsetof(struct DealFlopCardsMessage, _asn_ctx),
|
||||
asn_MAP_DealFlopCardsMessage_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_DealFlopCardsMessage = {
|
||||
"DealFlopCardsMessage",
|
||||
"DealFlopCardsMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_DealFlopCardsMessage_tags_1,
|
||||
sizeof(asn_DEF_DealFlopCardsMessage_tags_1)
|
||||
/sizeof(asn_DEF_DealFlopCardsMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_DealFlopCardsMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_DealFlopCardsMessage_tags_1)
|
||||
/sizeof(asn_DEF_DealFlopCardsMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_DealFlopCardsMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_DealFlopCardsMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _DealFlopCardsMessage_H_
|
||||
#define _DealFlopCardsMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "Card.h"
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* DealFlopCardsMessage */
|
||||
typedef struct DealFlopCardsMessage {
|
||||
NonZeroId_t gameId;
|
||||
struct flopCards {
|
||||
A_SEQUENCE_OF(Card_t) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} flopCards;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} DealFlopCardsMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_DealFlopCardsMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DealFlopCardsMessage_H_ */
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "DealRiverCardMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_DealRiverCardMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct DealRiverCardMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct DealRiverCardMessage, riverCard),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_Card,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"riverCard"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_DealRiverCardMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (23 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_DealRiverCardMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 376 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* riverCard at 378 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_DealRiverCardMessage_specs_1 = {
|
||||
sizeof(struct DealRiverCardMessage),
|
||||
offsetof(struct DealRiverCardMessage, _asn_ctx),
|
||||
asn_MAP_DealRiverCardMessage_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_DealRiverCardMessage = {
|
||||
"DealRiverCardMessage",
|
||||
"DealRiverCardMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_DealRiverCardMessage_tags_1,
|
||||
sizeof(asn_DEF_DealRiverCardMessage_tags_1)
|
||||
/sizeof(asn_DEF_DealRiverCardMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_DealRiverCardMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_DealRiverCardMessage_tags_1)
|
||||
/sizeof(asn_DEF_DealRiverCardMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_DealRiverCardMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_DealRiverCardMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _DealRiverCardMessage_H_
|
||||
#define _DealRiverCardMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "Card.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* DealRiverCardMessage */
|
||||
typedef struct DealRiverCardMessage {
|
||||
NonZeroId_t gameId;
|
||||
Card_t riverCard;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} DealRiverCardMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_DealRiverCardMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DealRiverCardMessage_H_ */
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "DealTurnCardMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_DealTurnCardMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct DealTurnCardMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct DealTurnCardMessage, turnCard),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_Card,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"turnCard"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_DealTurnCardMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (22 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_DealTurnCardMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 371 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* turnCard at 373 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_DealTurnCardMessage_specs_1 = {
|
||||
sizeof(struct DealTurnCardMessage),
|
||||
offsetof(struct DealTurnCardMessage, _asn_ctx),
|
||||
asn_MAP_DealTurnCardMessage_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_DealTurnCardMessage = {
|
||||
"DealTurnCardMessage",
|
||||
"DealTurnCardMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_DealTurnCardMessage_tags_1,
|
||||
sizeof(asn_DEF_DealTurnCardMessage_tags_1)
|
||||
/sizeof(asn_DEF_DealTurnCardMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_DealTurnCardMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_DealTurnCardMessage_tags_1)
|
||||
/sizeof(asn_DEF_DealTurnCardMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_DealTurnCardMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_DealTurnCardMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _DealTurnCardMessage_H_
|
||||
#define _DealTurnCardMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "Card.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* DealTurnCardMessage */
|
||||
typedef struct DealTurnCardMessage {
|
||||
NonZeroId_t gameId;
|
||||
Card_t turnCard;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} DealTurnCardMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_DealTurnCardMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DealTurnCardMessage_H_ */
|
||||
Vendored
+61
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "DialogMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_DialogMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct DialogMessage, notificationText),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
0,
|
||||
&asn_DEF_UTF8String,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"notificationText"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_DialogMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (131 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_DialogMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* notificationText at 445 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_DialogMessage_specs_1 = {
|
||||
sizeof(struct DialogMessage),
|
||||
offsetof(struct DialogMessage, _asn_ctx),
|
||||
asn_MAP_DialogMessage_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_DialogMessage = {
|
||||
"DialogMessage",
|
||||
"DialogMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_DialogMessage_tags_1,
|
||||
sizeof(asn_DEF_DialogMessage_tags_1)
|
||||
/sizeof(asn_DEF_DialogMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_DialogMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_DialogMessage_tags_1)
|
||||
/sizeof(asn_DEF_DialogMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_DialogMessage_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_DialogMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _DialogMessage_H_
|
||||
#define _DialogMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <UTF8String.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* DialogMessage */
|
||||
typedef struct DialogMessage {
|
||||
UTF8String_t notificationText;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} DialogMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_DialogMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DialogMessage_H_ */
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "EndOfGameMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_EndOfGameMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct EndOfGameMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct EndOfGameMessage, winnerPlayerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"winnerPlayerId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_EndOfGameMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (26 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_EndOfGameMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 418 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* winnerPlayerId at 420 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_EndOfGameMessage_specs_1 = {
|
||||
sizeof(struct EndOfGameMessage),
|
||||
offsetof(struct EndOfGameMessage, _asn_ctx),
|
||||
asn_MAP_EndOfGameMessage_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_EndOfGameMessage = {
|
||||
"EndOfGameMessage",
|
||||
"EndOfGameMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_EndOfGameMessage_tags_1,
|
||||
sizeof(asn_DEF_EndOfGameMessage_tags_1)
|
||||
/sizeof(asn_DEF_EndOfGameMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_EndOfGameMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_EndOfGameMessage_tags_1)
|
||||
/sizeof(asn_DEF_EndOfGameMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_EndOfGameMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_EndOfGameMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _EndOfGameMessage_H_
|
||||
#define _EndOfGameMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* EndOfGameMessage */
|
||||
typedef struct EndOfGameMessage {
|
||||
NonZeroId_t gameId;
|
||||
NonZeroId_t winnerPlayerId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} EndOfGameMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_EndOfGameMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _EndOfGameMessage_H_ */
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "EndOfHandHideCards.h"
|
||||
|
||||
static int
|
||||
memb_moneyWon_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 0 && value <= 10000000)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_playerMoney_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 0 && value <= 10000000)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_EndOfHandHideCards_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct EndOfHandHideCards, playerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct EndOfHandHideCards, moneyWon),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_moneyWon_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"moneyWon"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct EndOfHandHideCards, playerMoney),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_playerMoney_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerMoney"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_EndOfHandHideCards_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_EndOfHandHideCards_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* playerId at 412 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* moneyWon at 413 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 0 } /* playerMoney at 414 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandHideCards_specs_1 = {
|
||||
sizeof(struct EndOfHandHideCards),
|
||||
offsetof(struct EndOfHandHideCards, _asn_ctx),
|
||||
asn_MAP_EndOfHandHideCards_tag2el_1,
|
||||
3, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
2, /* Start extensions */
|
||||
4 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_EndOfHandHideCards = {
|
||||
"EndOfHandHideCards",
|
||||
"EndOfHandHideCards",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_EndOfHandHideCards_tags_1,
|
||||
sizeof(asn_DEF_EndOfHandHideCards_tags_1)
|
||||
/sizeof(asn_DEF_EndOfHandHideCards_tags_1[0]), /* 1 */
|
||||
asn_DEF_EndOfHandHideCards_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_EndOfHandHideCards_tags_1)
|
||||
/sizeof(asn_DEF_EndOfHandHideCards_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_EndOfHandHideCards_1,
|
||||
3, /* Elements count */
|
||||
&asn_SPC_EndOfHandHideCards_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _EndOfHandHideCards_H_
|
||||
#define _EndOfHandHideCards_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <NativeInteger.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* EndOfHandHideCards */
|
||||
typedef struct EndOfHandHideCards {
|
||||
NonZeroId_t playerId;
|
||||
long moneyWon;
|
||||
long playerMoney;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} EndOfHandHideCards_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_EndOfHandHideCards;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _EndOfHandHideCards_H_ */
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "EndOfHandMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_endOfHandType_3[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct endOfHandType, choice.endOfHandShowCards),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_EndOfHandShowCards,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"endOfHandShowCards"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct endOfHandType, choice.endOfHandHideCards),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_EndOfHandHideCards,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"endOfHandHideCards"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_endOfHandType_tag2el_3[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* endOfHandShowCards at 393 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* endOfHandHideCards at 395 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_endOfHandType_specs_3 = {
|
||||
sizeof(struct endOfHandType),
|
||||
offsetof(struct endOfHandType, _asn_ctx),
|
||||
offsetof(struct endOfHandType, present),
|
||||
sizeof(((struct endOfHandType *)0)->present),
|
||||
asn_MAP_endOfHandType_tag2el_3,
|
||||
2, /* Count of tags in the map */
|
||||
0,
|
||||
2 /* Extensions start */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_endOfHandType_3 = {
|
||||
"endOfHandType",
|
||||
"endOfHandType",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
0, /* No tags (count) */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_endOfHandType_3,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_endOfHandType_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_EndOfHandMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct EndOfHandMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct EndOfHandMessage, endOfHandType),
|
||||
-1 /* Ambiguous tag (CHOICE?) */,
|
||||
0,
|
||||
&asn_DEF_endOfHandType_3,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"endOfHandType"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_EndOfHandMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (25 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_EndOfHandMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 391 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* endOfHandShowCards at 393 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* endOfHandHideCards at 395 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandMessage_specs_1 = {
|
||||
sizeof(struct EndOfHandMessage),
|
||||
offsetof(struct EndOfHandMessage, _asn_ctx),
|
||||
asn_MAP_EndOfHandMessage_tag2el_1,
|
||||
3, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_EndOfHandMessage = {
|
||||
"EndOfHandMessage",
|
||||
"EndOfHandMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_EndOfHandMessage_tags_1,
|
||||
sizeof(asn_DEF_EndOfHandMessage_tags_1)
|
||||
/sizeof(asn_DEF_EndOfHandMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_EndOfHandMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_EndOfHandMessage_tags_1)
|
||||
/sizeof(asn_DEF_EndOfHandMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_EndOfHandMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_EndOfHandMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _EndOfHandMessage_H_
|
||||
#define _EndOfHandMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "EndOfHandShowCards.h"
|
||||
#include "EndOfHandHideCards.h"
|
||||
#include <constr_CHOICE.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum endOfHandType_PR {
|
||||
endOfHandType_PR_NOTHING, /* No components present */
|
||||
endOfHandType_PR_endOfHandShowCards,
|
||||
endOfHandType_PR_endOfHandHideCards,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} endOfHandType_PR;
|
||||
|
||||
/* EndOfHandMessage */
|
||||
typedef struct EndOfHandMessage {
|
||||
NonZeroId_t gameId;
|
||||
struct endOfHandType {
|
||||
endOfHandType_PR present;
|
||||
union EndOfHandMessage__endOfHandType_u {
|
||||
EndOfHandShowCards_t endOfHandShowCards;
|
||||
EndOfHandHideCards_t endOfHandHideCards;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} endOfHandType;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} EndOfHandMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_EndOfHandMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _EndOfHandMessage_H_ */
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "EndOfHandShowCards.h"
|
||||
|
||||
static int
|
||||
memb_playerResults_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Determine the number of elements */
|
||||
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
|
||||
|
||||
if((size >= 1 && size <= 10)) {
|
||||
/* Perform validation of the inner elements */
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_playerResults_2[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_PlayerResult,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_playerResults_tags_2[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_playerResults_specs_2 = {
|
||||
sizeof(struct playerResults),
|
||||
offsetof(struct playerResults, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_playerResults_2 = {
|
||||
"playerResults",
|
||||
"playerResults",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_playerResults_tags_2,
|
||||
sizeof(asn_DEF_playerResults_tags_2)
|
||||
/sizeof(asn_DEF_playerResults_tags_2[0]), /* 1 */
|
||||
asn_DEF_playerResults_tags_2, /* Same as above */
|
||||
sizeof(asn_DEF_playerResults_tags_2)
|
||||
/sizeof(asn_DEF_playerResults_tags_2[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_playerResults_2,
|
||||
1, /* Single element */
|
||||
&asn_SPC_playerResults_specs_2 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_EndOfHandShowCards_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct EndOfHandShowCards, playerResults),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_playerResults_2,
|
||||
memb_playerResults_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerResults"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_EndOfHandShowCards_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_EndOfHandShowCards_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* playerResults at 400 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_EndOfHandShowCards_specs_1 = {
|
||||
sizeof(struct EndOfHandShowCards),
|
||||
offsetof(struct EndOfHandShowCards, _asn_ctx),
|
||||
asn_MAP_EndOfHandShowCards_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_EndOfHandShowCards = {
|
||||
"EndOfHandShowCards",
|
||||
"EndOfHandShowCards",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_EndOfHandShowCards_tags_1,
|
||||
sizeof(asn_DEF_EndOfHandShowCards_tags_1)
|
||||
/sizeof(asn_DEF_EndOfHandShowCards_tags_1[0]), /* 1 */
|
||||
asn_DEF_EndOfHandShowCards_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_EndOfHandShowCards_tags_1)
|
||||
/sizeof(asn_DEF_EndOfHandShowCards_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_EndOfHandShowCards_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_EndOfHandShowCards_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _EndOfHandShowCards_H_
|
||||
#define _EndOfHandShowCards_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Forward declarations */
|
||||
struct PlayerResult;
|
||||
|
||||
/* EndOfHandShowCards */
|
||||
typedef struct EndOfHandShowCards {
|
||||
struct playerResults {
|
||||
A_SEQUENCE_OF(struct PlayerResult) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} playerResults;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} EndOfHandShowCards_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_EndOfHandShowCards;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Referred external types */
|
||||
#include "PlayerResult.h"
|
||||
|
||||
#endif /* _EndOfHandShowCards_H_ */
|
||||
Vendored
+202
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "ErrorMessage.h"
|
||||
|
||||
static int
|
||||
errorReason_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeEnumerated,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
errorReason_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
|
||||
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
|
||||
td->elements = asn_DEF_NativeEnumerated.elements;
|
||||
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
|
||||
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
|
||||
}
|
||||
|
||||
static void
|
||||
errorReason_2_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
errorReason_2_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
static int
|
||||
errorReason_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
errorReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_dec_rval_t
|
||||
errorReason_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
errorReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
static asn_enc_rval_t
|
||||
errorReason_2_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
errorReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_dec_rval_t
|
||||
errorReason_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
errorReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
static asn_enc_rval_t
|
||||
errorReason_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
errorReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_INTEGER_enum_map_t asn_MAP_errorReason_value2enum_2[] = {
|
||||
{ 0, 13, "errorReserved" },
|
||||
{ 1, 28, "errorInitVersionNotSupported" },
|
||||
{ 2, 19, "errorInitServerFull" },
|
||||
{ 3, 20, "errorInitAuthFailure" },
|
||||
{ 4, 24, "errorInitPlayerNameInUse" },
|
||||
{ 5, 26, "errorInitInvalidPlayerName" },
|
||||
{ 6, 26, "errorInitServerMaintenance" },
|
||||
{ 7, 19, "errorAvatarTooLarge" },
|
||||
{ 8, 24, "errorAvatarUploadBlocked" },
|
||||
{ 256, 18, "errorInvalidPacket" },
|
||||
{ 257, 17, "errorInvalidState" },
|
||||
{ 258, 21, "errorKickedFromServer" },
|
||||
{ 259, 21, "errorBannedFromServer" },
|
||||
{ 260, 19, "errorSessionTimeout" }
|
||||
};
|
||||
static unsigned int asn_MAP_errorReason_enum2value_2[] = {
|
||||
7, /* errorAvatarTooLarge(7) */
|
||||
8, /* errorAvatarUploadBlocked(8) */
|
||||
12, /* errorBannedFromServer(259) */
|
||||
3, /* errorInitAuthFailure(3) */
|
||||
5, /* errorInitInvalidPlayerName(5) */
|
||||
4, /* errorInitPlayerNameInUse(4) */
|
||||
2, /* errorInitServerFull(2) */
|
||||
6, /* errorInitServerMaintenance(6) */
|
||||
1, /* errorInitVersionNotSupported(1) */
|
||||
9, /* errorInvalidPacket(256) */
|
||||
10, /* errorInvalidState(257) */
|
||||
11, /* errorKickedFromServer(258) */
|
||||
0, /* errorReserved(0) */
|
||||
13 /* errorSessionTimeout(260) */
|
||||
};
|
||||
static asn_INTEGER_specifics_t asn_SPC_errorReason_specs_2 = {
|
||||
asn_MAP_errorReason_value2enum_2, /* "tag" => N; sorted by tag */
|
||||
asn_MAP_errorReason_enum2value_2, /* N => "tag"; sorted by N */
|
||||
14, /* Number of elements in the maps */
|
||||
0, /* Enumeration is not extensible */
|
||||
1, /* Strict enumeration */
|
||||
0, /* Native long size */
|
||||
0
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_errorReason_tags_2[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_errorReason_2 = {
|
||||
"errorReason",
|
||||
"errorReason",
|
||||
errorReason_2_free,
|
||||
errorReason_2_print,
|
||||
errorReason_2_constraint,
|
||||
errorReason_2_decode_ber,
|
||||
errorReason_2_encode_der,
|
||||
errorReason_2_decode_xer,
|
||||
errorReason_2_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_errorReason_tags_2,
|
||||
sizeof(asn_DEF_errorReason_tags_2)
|
||||
/sizeof(asn_DEF_errorReason_tags_2[0]), /* 1 */
|
||||
asn_DEF_errorReason_tags_2, /* Same as above */
|
||||
sizeof(asn_DEF_errorReason_tags_2)
|
||||
/sizeof(asn_DEF_errorReason_tags_2[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* Defined elsewhere */
|
||||
&asn_SPC_errorReason_specs_2 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_ErrorMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct ErrorMessage, errorReason),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
|
||||
0,
|
||||
&asn_DEF_errorReason_2,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"errorReason"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_ErrorMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (255 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_ErrorMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* errorReason at 450 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_ErrorMessage_specs_1 = {
|
||||
sizeof(struct ErrorMessage),
|
||||
offsetof(struct ErrorMessage, _asn_ctx),
|
||||
asn_MAP_ErrorMessage_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ErrorMessage = {
|
||||
"ErrorMessage",
|
||||
"ErrorMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_ErrorMessage_tags_1,
|
||||
sizeof(asn_DEF_ErrorMessage_tags_1)
|
||||
/sizeof(asn_DEF_ErrorMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_ErrorMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_ErrorMessage_tags_1)
|
||||
/sizeof(asn_DEF_ErrorMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_ErrorMessage_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_ErrorMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _ErrorMessage_H_
|
||||
#define _ErrorMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <NativeEnumerated.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum errorReason {
|
||||
errorReason_errorReserved = 0,
|
||||
errorReason_errorInitVersionNotSupported = 1,
|
||||
errorReason_errorInitServerFull = 2,
|
||||
errorReason_errorInitAuthFailure = 3,
|
||||
errorReason_errorInitPlayerNameInUse = 4,
|
||||
errorReason_errorInitInvalidPlayerName = 5,
|
||||
errorReason_errorInitServerMaintenance = 6,
|
||||
errorReason_errorAvatarTooLarge = 7,
|
||||
errorReason_errorAvatarUploadBlocked = 8,
|
||||
errorReason_errorInvalidPacket = 256,
|
||||
errorReason_errorInvalidState = 257,
|
||||
errorReason_errorKickedFromServer = 258,
|
||||
errorReason_errorBannedFromServer = 259,
|
||||
errorReason_errorSessionTimeout = 260
|
||||
} e_errorReason;
|
||||
|
||||
/* ErrorMessage */
|
||||
typedef struct ErrorMessage {
|
||||
long errorReason;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} ErrorMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_errorReason_2; // (Use -fall-defs-global to expose) */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_ErrorMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ErrorMessage_H_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameAdminChanged.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameAdminChanged_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameAdminChanged, newAdminPlayerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"newAdminPlayerId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameAdminChanged_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameAdminChanged_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* newAdminPlayerId at 287 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameAdminChanged_specs_1 = {
|
||||
sizeof(struct GameAdminChanged),
|
||||
offsetof(struct GameAdminChanged, _asn_ctx),
|
||||
asn_MAP_GameAdminChanged_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameAdminChanged = {
|
||||
"GameAdminChanged",
|
||||
"GameAdminChanged",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameAdminChanged_tags_1,
|
||||
sizeof(asn_DEF_GameAdminChanged_tags_1)
|
||||
/sizeof(asn_DEF_GameAdminChanged_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameAdminChanged_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameAdminChanged_tags_1)
|
||||
/sizeof(asn_DEF_GameAdminChanged_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameAdminChanged_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_GameAdminChanged_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameAdminChanged_H_
|
||||
#define _GameAdminChanged_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GameAdminChanged */
|
||||
typedef struct GameAdminChanged {
|
||||
NonZeroId_t newAdminPlayerId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameAdminChanged_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameAdminChanged;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameAdminChanged_H_ */
|
||||
Vendored
+622
@@ -0,0 +1,622 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameInfo.h"
|
||||
|
||||
static int
|
||||
memb_raiseEveryHands_constraint_4(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 1000)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_raiseEveryMinutes_constraint_4(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 1000)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
endRaiseMode_8_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeEnumerated,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
endRaiseMode_8_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
|
||||
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
|
||||
td->elements = asn_DEF_NativeEnumerated.elements;
|
||||
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
|
||||
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
|
||||
}
|
||||
|
||||
static void
|
||||
endRaiseMode_8_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
endRaiseMode_8_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
static int
|
||||
endRaiseMode_8_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
endRaiseMode_8_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_dec_rval_t
|
||||
endRaiseMode_8_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
endRaiseMode_8_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
static asn_enc_rval_t
|
||||
endRaiseMode_8_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
endRaiseMode_8_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_dec_rval_t
|
||||
endRaiseMode_8_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
endRaiseMode_8_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
static asn_enc_rval_t
|
||||
endRaiseMode_8_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
endRaiseMode_8_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static int
|
||||
memb_NativeInteger_constraint_17(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 20001)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_maxNumPlayers_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 2 && value <= 10)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_proposedGuiSpeed_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 11)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_playerActionTimeout_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 5 && value <= 60)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_firstSmallBlind_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 20000)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_endRaiseSmallBlindValue_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 20000)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_startMoney_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 1000000)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_manualBlinds_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Determine the number of elements */
|
||||
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
|
||||
|
||||
if((size <= 30)) {
|
||||
/* Perform validation of the inner elements */
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_raiseIntervalMode_4[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct raiseIntervalMode, choice.raiseEveryHands),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_raiseEveryHands_constraint_4,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"raiseEveryHands"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct raiseIntervalMode, choice.raiseEveryMinutes),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_raiseEveryMinutes_constraint_4,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"raiseEveryMinutes"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_raiseIntervalMode_tag2el_4[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* raiseEveryHands at 251 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* raiseEveryMinutes at 252 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_raiseIntervalMode_specs_4 = {
|
||||
sizeof(struct raiseIntervalMode),
|
||||
offsetof(struct raiseIntervalMode, _asn_ctx),
|
||||
offsetof(struct raiseIntervalMode, present),
|
||||
sizeof(((struct raiseIntervalMode *)0)->present),
|
||||
asn_MAP_raiseIntervalMode_tag2el_4,
|
||||
2, /* Count of tags in the map */
|
||||
0,
|
||||
2 /* Extensions start */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_raiseIntervalMode_4 = {
|
||||
"raiseIntervalMode",
|
||||
"raiseIntervalMode",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
0, /* No tags (count) */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_raiseIntervalMode_4,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_raiseIntervalMode_specs_4 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_INTEGER_enum_map_t asn_MAP_endRaiseMode_value2enum_8[] = {
|
||||
{ 1, 12, "doubleBlinds" },
|
||||
{ 2, 15, "raiseByEndValue" },
|
||||
{ 3, 13, "keepLastBlind" }
|
||||
};
|
||||
static unsigned int asn_MAP_endRaiseMode_enum2value_8[] = {
|
||||
0, /* doubleBlinds(1) */
|
||||
2, /* keepLastBlind(3) */
|
||||
1 /* raiseByEndValue(2) */
|
||||
};
|
||||
static asn_INTEGER_specifics_t asn_SPC_endRaiseMode_specs_8 = {
|
||||
asn_MAP_endRaiseMode_value2enum_8, /* "tag" => N; sorted by tag */
|
||||
asn_MAP_endRaiseMode_enum2value_8, /* N => "tag"; sorted by N */
|
||||
3, /* Number of elements in the maps */
|
||||
0, /* Enumeration is not extensible */
|
||||
1, /* Strict enumeration */
|
||||
0, /* Native long size */
|
||||
0
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_endRaiseMode_tags_8[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_endRaiseMode_8 = {
|
||||
"endRaiseMode",
|
||||
"endRaiseMode",
|
||||
endRaiseMode_8_free,
|
||||
endRaiseMode_8_print,
|
||||
endRaiseMode_8_constraint,
|
||||
endRaiseMode_8_decode_ber,
|
||||
endRaiseMode_8_encode_der,
|
||||
endRaiseMode_8_decode_xer,
|
||||
endRaiseMode_8_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_endRaiseMode_tags_8,
|
||||
sizeof(asn_DEF_endRaiseMode_tags_8)
|
||||
/sizeof(asn_DEF_endRaiseMode_tags_8[0]), /* 1 */
|
||||
asn_DEF_endRaiseMode_tags_8, /* Same as above */
|
||||
sizeof(asn_DEF_endRaiseMode_tags_8)
|
||||
/sizeof(asn_DEF_endRaiseMode_tags_8[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* Defined elsewhere */
|
||||
&asn_SPC_endRaiseMode_specs_8 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_manualBlinds_17[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_NativeInteger_constraint_17,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_manualBlinds_tags_17[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_manualBlinds_specs_17 = {
|
||||
sizeof(struct manualBlinds),
|
||||
offsetof(struct manualBlinds, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_manualBlinds_17 = {
|
||||
"manualBlinds",
|
||||
"manualBlinds",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_manualBlinds_tags_17,
|
||||
sizeof(asn_DEF_manualBlinds_tags_17)
|
||||
/sizeof(asn_DEF_manualBlinds_tags_17[0]), /* 1 */
|
||||
asn_DEF_manualBlinds_tags_17, /* Same as above */
|
||||
sizeof(asn_DEF_manualBlinds_tags_17)
|
||||
/sizeof(asn_DEF_manualBlinds_tags_17[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_manualBlinds_17,
|
||||
1, /* Single element */
|
||||
&asn_SPC_manualBlinds_specs_17 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameInfo_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, gameName),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
0,
|
||||
&asn_DEF_UTF8String,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameName"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, maxNumPlayers),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_maxNumPlayers_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"maxNumPlayers"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, raiseIntervalMode),
|
||||
-1 /* Ambiguous tag (CHOICE?) */,
|
||||
0,
|
||||
&asn_DEF_raiseIntervalMode_4,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"raiseIntervalMode"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, endRaiseMode),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
|
||||
0,
|
||||
&asn_DEF_endRaiseMode_8,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"endRaiseMode"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, proposedGuiSpeed),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_proposedGuiSpeed_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"proposedGuiSpeed"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, playerActionTimeout),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_playerActionTimeout_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerActionTimeout"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, firstSmallBlind),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_firstSmallBlind_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"firstSmallBlind"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, endRaiseSmallBlindValue),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_endRaiseSmallBlindValue_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"endRaiseSmallBlindValue"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, startMoney),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_startMoney_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"startMoney"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameInfo, manualBlinds),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_manualBlinds_17,
|
||||
memb_manualBlinds_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"manualBlinds"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameInfo_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameInfo_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 5 }, /* maxNumPlayers at 249 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -1, 4 }, /* proposedGuiSpeed at 259 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 5, -2, 3 }, /* playerActionTimeout at 260 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -3, 2 }, /* firstSmallBlind at 261 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 7, -4, 1 }, /* endRaiseSmallBlindValue at 262 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 8, -5, 0 }, /* startMoney at 263 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* endRaiseMode at 255 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* gameName at 248 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, 0, 0 }, /* manualBlinds at 264 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* raiseEveryHands at 251 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* raiseEveryMinutes at 252 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameInfo_specs_1 = {
|
||||
sizeof(struct GameInfo),
|
||||
offsetof(struct GameInfo, _asn_ctx),
|
||||
asn_MAP_GameInfo_tag2el_1,
|
||||
11, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
9, /* Start extensions */
|
||||
11 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameInfo = {
|
||||
"GameInfo",
|
||||
"GameInfo",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameInfo_tags_1,
|
||||
sizeof(asn_DEF_GameInfo_tags_1)
|
||||
/sizeof(asn_DEF_GameInfo_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameInfo_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameInfo_tags_1)
|
||||
/sizeof(asn_DEF_GameInfo_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameInfo_1,
|
||||
10, /* Elements count */
|
||||
&asn_SPC_GameInfo_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+87
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameInfo_H_
|
||||
#define _GameInfo_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <UTF8String.h>
|
||||
#include <NativeInteger.h>
|
||||
#include <NativeEnumerated.h>
|
||||
#include <constr_CHOICE.h>
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum raiseIntervalMode_PR {
|
||||
raiseIntervalMode_PR_NOTHING, /* No components present */
|
||||
raiseIntervalMode_PR_raiseEveryHands,
|
||||
raiseIntervalMode_PR_raiseEveryMinutes,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} raiseIntervalMode_PR;
|
||||
typedef enum endRaiseMode {
|
||||
endRaiseMode_doubleBlinds = 1,
|
||||
endRaiseMode_raiseByEndValue = 2,
|
||||
endRaiseMode_keepLastBlind = 3
|
||||
} e_endRaiseMode;
|
||||
|
||||
/* GameInfo */
|
||||
typedef struct GameInfo {
|
||||
UTF8String_t gameName;
|
||||
long maxNumPlayers;
|
||||
struct raiseIntervalMode {
|
||||
raiseIntervalMode_PR present;
|
||||
union GameInfo__raiseIntervalMode_u {
|
||||
long raiseEveryHands;
|
||||
long raiseEveryMinutes;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} raiseIntervalMode;
|
||||
long endRaiseMode;
|
||||
long proposedGuiSpeed;
|
||||
long playerActionTimeout;
|
||||
long firstSmallBlind;
|
||||
long endRaiseSmallBlindValue;
|
||||
long startMoney;
|
||||
struct manualBlinds {
|
||||
A_SEQUENCE_OF(long) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} manualBlinds;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameInfo_t;
|
||||
|
||||
/* Implementation */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_endRaiseMode_8; // (Use -fall-defs-global to expose) */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameInfo_H_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameListAdminChanged.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameListAdminChanged_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListAdminChanged, newAdminPlayerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"newAdminPlayerId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameListAdminChanged_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameListAdminChanged_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* newAdminPlayerId at 167 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameListAdminChanged_specs_1 = {
|
||||
sizeof(struct GameListAdminChanged),
|
||||
offsetof(struct GameListAdminChanged, _asn_ctx),
|
||||
asn_MAP_GameListAdminChanged_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameListAdminChanged = {
|
||||
"GameListAdminChanged",
|
||||
"GameListAdminChanged",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameListAdminChanged_tags_1,
|
||||
sizeof(asn_DEF_GameListAdminChanged_tags_1)
|
||||
/sizeof(asn_DEF_GameListAdminChanged_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameListAdminChanged_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameListAdminChanged_tags_1)
|
||||
/sizeof(asn_DEF_GameListAdminChanged_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameListAdminChanged_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_GameListAdminChanged_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameListAdminChanged_H_
|
||||
#define _GameListAdminChanged_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GameListAdminChanged */
|
||||
typedef struct GameListAdminChanged {
|
||||
NonZeroId_t newAdminPlayerId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameListAdminChanged_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameListAdminChanged;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameListAdminChanged_H_ */
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameListMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_gameListNotification_3[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListNew),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_GameListNew,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameListNew"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListUpdate),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_GameListUpdate,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameListUpdate"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListPlayerJoined),
|
||||
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_GameListPlayerJoined,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameListPlayerJoined"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListPlayerLeft),
|
||||
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_GameListPlayerLeft,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameListPlayerLeft"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gameListNotification, choice.gameListAdminChanged),
|
||||
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_GameListAdminChanged,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameListAdminChanged"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_gameListNotification_tag2el_3[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gameListNew at 137 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gameListUpdate at 138 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gameListPlayerJoined at 139 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gameListPlayerLeft at 140 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* gameListAdminChanged at 142 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_gameListNotification_specs_3 = {
|
||||
sizeof(struct gameListNotification),
|
||||
offsetof(struct gameListNotification, _asn_ctx),
|
||||
offsetof(struct gameListNotification, present),
|
||||
sizeof(((struct gameListNotification *)0)->present),
|
||||
asn_MAP_gameListNotification_tag2el_3,
|
||||
5, /* Count of tags in the map */
|
||||
0,
|
||||
5 /* Extensions start */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_gameListNotification_3 = {
|
||||
"gameListNotification",
|
||||
"gameListNotification",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
0, /* No tags (count) */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_gameListNotification_3,
|
||||
5, /* Elements count */
|
||||
&asn_SPC_gameListNotification_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameListMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListMessage, gameListNotification),
|
||||
-1 /* Ambiguous tag (CHOICE?) */,
|
||||
0,
|
||||
&asn_DEF_gameListNotification_3,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameListNotification"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameListMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (4 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameListMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 135 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gameListNew at 137 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gameListUpdate at 138 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* gameListPlayerJoined at 139 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* gameListPlayerLeft at 140 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 } /* gameListAdminChanged at 142 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameListMessage_specs_1 = {
|
||||
sizeof(struct GameListMessage),
|
||||
offsetof(struct GameListMessage, _asn_ctx),
|
||||
asn_MAP_GameListMessage_tag2el_1,
|
||||
6, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameListMessage = {
|
||||
"GameListMessage",
|
||||
"GameListMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameListMessage_tags_1,
|
||||
sizeof(asn_DEF_GameListMessage_tags_1)
|
||||
/sizeof(asn_DEF_GameListMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_GameListMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameListMessage_tags_1)
|
||||
/sizeof(asn_DEF_GameListMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameListMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_GameListMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameListMessage_H_
|
||||
#define _GameListMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "GameListNew.h"
|
||||
#include "GameListUpdate.h"
|
||||
#include "GameListPlayerJoined.h"
|
||||
#include "GameListPlayerLeft.h"
|
||||
#include "GameListAdminChanged.h"
|
||||
#include <constr_CHOICE.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum gameListNotification_PR {
|
||||
gameListNotification_PR_NOTHING, /* No components present */
|
||||
gameListNotification_PR_gameListNew,
|
||||
gameListNotification_PR_gameListUpdate,
|
||||
gameListNotification_PR_gameListPlayerJoined,
|
||||
gameListNotification_PR_gameListPlayerLeft,
|
||||
gameListNotification_PR_gameListAdminChanged,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} gameListNotification_PR;
|
||||
|
||||
/* GameListMessage */
|
||||
typedef struct GameListMessage {
|
||||
NonZeroId_t gameId;
|
||||
struct gameListNotification {
|
||||
gameListNotification_PR present;
|
||||
union GameListMessage__gameListNotification_u {
|
||||
GameListNew_t gameListNew;
|
||||
GameListUpdate_t gameListUpdate;
|
||||
GameListPlayerJoined_t gameListPlayerJoined;
|
||||
GameListPlayerLeft_t gameListPlayerLeft;
|
||||
GameListAdminChanged_t gameListAdminChanged;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} gameListNotification;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameListMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameListMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameListMessage_H_ */
|
||||
Vendored
+170
@@ -0,0 +1,170 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameListNew.h"
|
||||
|
||||
static int
|
||||
memb_playerIds_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Determine the number of elements */
|
||||
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
|
||||
|
||||
if((size >= 1 && size <= 10)) {
|
||||
/* Perform validation of the inner elements */
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_playerIds_4[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_playerIds_tags_4[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_playerIds_specs_4 = {
|
||||
sizeof(struct playerIds),
|
||||
offsetof(struct playerIds, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_playerIds_4 = {
|
||||
"playerIds",
|
||||
"playerIds",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_playerIds_tags_4,
|
||||
sizeof(asn_DEF_playerIds_tags_4)
|
||||
/sizeof(asn_DEF_playerIds_tags_4[0]), /* 1 */
|
||||
asn_DEF_playerIds_tags_4, /* Same as above */
|
||||
sizeof(asn_DEF_playerIds_tags_4)
|
||||
/sizeof(asn_DEF_playerIds_tags_4[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_playerIds_4,
|
||||
1, /* Single element */
|
||||
&asn_SPC_playerIds_specs_4 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameListNew_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameMode),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
|
||||
0,
|
||||
&asn_DEF_GameMode,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameMode"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListNew, isPrivate),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
|
||||
0,
|
||||
&asn_DEF_BOOLEAN,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"isPrivate"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListNew, playerIds),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_playerIds_4,
|
||||
memb_playerIds_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerIds"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListNew, adminPlayerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"adminPlayerId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListNew, gameInfo),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_GameInfo,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameInfo"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameListNew_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameListNew_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* isPrivate at 147 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* adminPlayerId at 149 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* gameMode at 146 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* playerIds at 148 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 0 } /* gameInfo at 151 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameListNew_specs_1 = {
|
||||
sizeof(struct GameListNew),
|
||||
offsetof(struct GameListNew, _asn_ctx),
|
||||
asn_MAP_GameListNew_tag2el_1,
|
||||
5, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
4, /* Start extensions */
|
||||
6 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameListNew = {
|
||||
"GameListNew",
|
||||
"GameListNew",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameListNew_tags_1,
|
||||
sizeof(asn_DEF_GameListNew_tags_1)
|
||||
/sizeof(asn_DEF_GameListNew_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameListNew_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameListNew_tags_1)
|
||||
/sizeof(asn_DEF_GameListNew_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameListNew_1,
|
||||
5, /* Elements count */
|
||||
&asn_SPC_GameListNew_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameListNew_H_
|
||||
#define _GameListNew_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "GameMode.h"
|
||||
#include <BOOLEAN.h>
|
||||
#include "NonZeroId.h"
|
||||
#include "GameInfo.h"
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GameListNew */
|
||||
typedef struct GameListNew {
|
||||
GameMode_t gameMode;
|
||||
BOOLEAN_t isPrivate;
|
||||
struct playerIds {
|
||||
A_SEQUENCE_OF(NonZeroId_t) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} playerIds;
|
||||
NonZeroId_t adminPlayerId;
|
||||
GameInfo_t gameInfo;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameListNew_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameListNew;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameListNew_H_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameListPlayerJoined.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameListPlayerJoined_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListPlayerJoined, playerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameListPlayerJoined_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameListPlayerJoined_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 159 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameListPlayerJoined_specs_1 = {
|
||||
sizeof(struct GameListPlayerJoined),
|
||||
offsetof(struct GameListPlayerJoined, _asn_ctx),
|
||||
asn_MAP_GameListPlayerJoined_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameListPlayerJoined = {
|
||||
"GameListPlayerJoined",
|
||||
"GameListPlayerJoined",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameListPlayerJoined_tags_1,
|
||||
sizeof(asn_DEF_GameListPlayerJoined_tags_1)
|
||||
/sizeof(asn_DEF_GameListPlayerJoined_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameListPlayerJoined_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameListPlayerJoined_tags_1)
|
||||
/sizeof(asn_DEF_GameListPlayerJoined_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameListPlayerJoined_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_GameListPlayerJoined_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameListPlayerJoined_H_
|
||||
#define _GameListPlayerJoined_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GameListPlayerJoined */
|
||||
typedef struct GameListPlayerJoined {
|
||||
NonZeroId_t playerId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameListPlayerJoined_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameListPlayerJoined;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameListPlayerJoined_H_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameListPlayerLeft.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameListPlayerLeft_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListPlayerLeft, playerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameListPlayerLeft_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameListPlayerLeft_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 163 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameListPlayerLeft_specs_1 = {
|
||||
sizeof(struct GameListPlayerLeft),
|
||||
offsetof(struct GameListPlayerLeft, _asn_ctx),
|
||||
asn_MAP_GameListPlayerLeft_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameListPlayerLeft = {
|
||||
"GameListPlayerLeft",
|
||||
"GameListPlayerLeft",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameListPlayerLeft_tags_1,
|
||||
sizeof(asn_DEF_GameListPlayerLeft_tags_1)
|
||||
/sizeof(asn_DEF_GameListPlayerLeft_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameListPlayerLeft_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameListPlayerLeft_tags_1)
|
||||
/sizeof(asn_DEF_GameListPlayerLeft_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameListPlayerLeft_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_GameListPlayerLeft_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameListPlayerLeft_H_
|
||||
#define _GameListPlayerLeft_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GameListPlayerLeft */
|
||||
typedef struct GameListPlayerLeft {
|
||||
NonZeroId_t playerId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameListPlayerLeft_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameListPlayerLeft;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameListPlayerLeft_H_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameListUpdate.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameListUpdate_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameListUpdate, gameMode),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
|
||||
0,
|
||||
&asn_DEF_GameMode,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameMode"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameListUpdate_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameListUpdate_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* gameMode at 155 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameListUpdate_specs_1 = {
|
||||
sizeof(struct GameListUpdate),
|
||||
offsetof(struct GameListUpdate, _asn_ctx),
|
||||
asn_MAP_GameListUpdate_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameListUpdate = {
|
||||
"GameListUpdate",
|
||||
"GameListUpdate",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameListUpdate_tags_1,
|
||||
sizeof(asn_DEF_GameListUpdate_tags_1)
|
||||
/sizeof(asn_DEF_GameListUpdate_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameListUpdate_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameListUpdate_tags_1)
|
||||
/sizeof(asn_DEF_GameListUpdate_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameListUpdate_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_GameListUpdate_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameListUpdate_H_
|
||||
#define _GameListUpdate_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "GameMode.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GameListUpdate */
|
||||
typedef struct GameListUpdate {
|
||||
GameMode_t gameMode;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameListUpdate_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameListUpdate;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameListUpdate_H_ */
|
||||
Vendored
+128
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameMode.h"
|
||||
|
||||
int
|
||||
GameMode_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeEnumerated,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
GameMode_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
|
||||
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
|
||||
td->elements = asn_DEF_NativeEnumerated.elements;
|
||||
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
|
||||
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
|
||||
}
|
||||
|
||||
void
|
||||
GameMode_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
GameMode_1_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
int
|
||||
GameMode_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
GameMode_1_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
GameMode_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
GameMode_1_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
GameMode_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
GameMode_1_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
GameMode_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
GameMode_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
GameMode_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
GameMode_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_INTEGER_enum_map_t asn_MAP_GameMode_value2enum_1[] = {
|
||||
{ 1, 11, "gameCreated" },
|
||||
{ 2, 11, "gameStarted" },
|
||||
{ 3, 10, "gameClosed" }
|
||||
};
|
||||
static unsigned int asn_MAP_GameMode_enum2value_1[] = {
|
||||
2, /* gameClosed(3) */
|
||||
0, /* gameCreated(1) */
|
||||
1 /* gameStarted(2) */
|
||||
};
|
||||
static asn_INTEGER_specifics_t asn_SPC_GameMode_specs_1 = {
|
||||
asn_MAP_GameMode_value2enum_1, /* "tag" => N; sorted by tag */
|
||||
asn_MAP_GameMode_enum2value_1, /* N => "tag"; sorted by N */
|
||||
3, /* Number of elements in the maps */
|
||||
0, /* Enumeration is not extensible */
|
||||
1, /* Strict enumeration */
|
||||
0, /* Native long size */
|
||||
0
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameMode_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameMode = {
|
||||
"GameMode",
|
||||
"GameMode",
|
||||
GameMode_free,
|
||||
GameMode_print,
|
||||
GameMode_constraint,
|
||||
GameMode_decode_ber,
|
||||
GameMode_encode_der,
|
||||
GameMode_decode_xer,
|
||||
GameMode_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameMode_tags_1,
|
||||
sizeof(asn_DEF_GameMode_tags_1)
|
||||
/sizeof(asn_DEF_GameMode_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameMode_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameMode_tags_1)
|
||||
/sizeof(asn_DEF_GameMode_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* Defined elsewhere */
|
||||
&asn_SPC_GameMode_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameMode_H_
|
||||
#define _GameMode_H_
|
||||
|
||||
|
||||
#include <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_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GamePlayerJoined.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GamePlayerJoined_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GamePlayerJoined, playerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GamePlayerJoined_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GamePlayerJoined_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 279 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerJoined_specs_1 = {
|
||||
sizeof(struct GamePlayerJoined),
|
||||
offsetof(struct GamePlayerJoined, _asn_ctx),
|
||||
asn_MAP_GamePlayerJoined_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GamePlayerJoined = {
|
||||
"GamePlayerJoined",
|
||||
"GamePlayerJoined",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GamePlayerJoined_tags_1,
|
||||
sizeof(asn_DEF_GamePlayerJoined_tags_1)
|
||||
/sizeof(asn_DEF_GamePlayerJoined_tags_1[0]), /* 1 */
|
||||
asn_DEF_GamePlayerJoined_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GamePlayerJoined_tags_1)
|
||||
/sizeof(asn_DEF_GamePlayerJoined_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GamePlayerJoined_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_GamePlayerJoined_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GamePlayerJoined_H_
|
||||
#define _GamePlayerJoined_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GamePlayerJoined */
|
||||
typedef struct GamePlayerJoined {
|
||||
NonZeroId_t playerId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GamePlayerJoined_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GamePlayerJoined;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GamePlayerJoined_H_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GamePlayerLeft.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GamePlayerLeft_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GamePlayerLeft, playerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GamePlayerLeft_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GamePlayerLeft_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 283 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerLeft_specs_1 = {
|
||||
sizeof(struct GamePlayerLeft),
|
||||
offsetof(struct GamePlayerLeft, _asn_ctx),
|
||||
asn_MAP_GamePlayerLeft_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GamePlayerLeft = {
|
||||
"GamePlayerLeft",
|
||||
"GamePlayerLeft",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GamePlayerLeft_tags_1,
|
||||
sizeof(asn_DEF_GamePlayerLeft_tags_1)
|
||||
/sizeof(asn_DEF_GamePlayerLeft_tags_1[0]), /* 1 */
|
||||
asn_DEF_GamePlayerLeft_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GamePlayerLeft_tags_1)
|
||||
/sizeof(asn_DEF_GamePlayerLeft_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GamePlayerLeft_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_GamePlayerLeft_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GamePlayerLeft_H_
|
||||
#define _GamePlayerLeft_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GamePlayerLeft */
|
||||
typedef struct GamePlayerLeft {
|
||||
NonZeroId_t playerId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GamePlayerLeft_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GamePlayerLeft;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GamePlayerLeft_H_ */
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GamePlayerMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_gamePlayerNotification_3[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gamePlayerNotification, choice.gamePlayerJoined),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_GamePlayerJoined,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gamePlayerJoined"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gamePlayerNotification, choice.gamePlayerLeft),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_GamePlayerLeft,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gamePlayerLeft"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gamePlayerNotification, choice.gameAdminChanged),
|
||||
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_GameAdminChanged,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameAdminChanged"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct gamePlayerNotification, choice.removedFromGame),
|
||||
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_RemovedFromGame,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"removedFromGame"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_gamePlayerNotification_tag2el_3[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gamePlayerJoined at 270 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gamePlayerLeft at 271 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gameAdminChanged at 272 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* removedFromGame at 274 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_gamePlayerNotification_specs_3 = {
|
||||
sizeof(struct gamePlayerNotification),
|
||||
offsetof(struct gamePlayerNotification, _asn_ctx),
|
||||
offsetof(struct gamePlayerNotification, present),
|
||||
sizeof(((struct gamePlayerNotification *)0)->present),
|
||||
asn_MAP_gamePlayerNotification_tag2el_3,
|
||||
4, /* Count of tags in the map */
|
||||
0,
|
||||
4 /* Extensions start */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_gamePlayerNotification_3 = {
|
||||
"gamePlayerNotification",
|
||||
"gamePlayerNotification",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
0, /* No tags (count) */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_gamePlayerNotification_3,
|
||||
4, /* Elements count */
|
||||
&asn_SPC_gamePlayerNotification_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GamePlayerMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GamePlayerMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GamePlayerMessage, gamePlayerNotification),
|
||||
-1 /* Ambiguous tag (CHOICE?) */,
|
||||
0,
|
||||
&asn_DEF_gamePlayerNotification_3,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gamePlayerNotification"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GamePlayerMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (10 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GamePlayerMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 268 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gamePlayerJoined at 270 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gamePlayerLeft at 271 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* gameAdminChanged at 272 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* removedFromGame at 274 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GamePlayerMessage_specs_1 = {
|
||||
sizeof(struct GamePlayerMessage),
|
||||
offsetof(struct GamePlayerMessage, _asn_ctx),
|
||||
asn_MAP_GamePlayerMessage_tag2el_1,
|
||||
5, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GamePlayerMessage = {
|
||||
"GamePlayerMessage",
|
||||
"GamePlayerMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GamePlayerMessage_tags_1,
|
||||
sizeof(asn_DEF_GamePlayerMessage_tags_1)
|
||||
/sizeof(asn_DEF_GamePlayerMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_GamePlayerMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GamePlayerMessage_tags_1)
|
||||
/sizeof(asn_DEF_GamePlayerMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GamePlayerMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_GamePlayerMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GamePlayerMessage_H_
|
||||
#define _GamePlayerMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "GamePlayerJoined.h"
|
||||
#include "GamePlayerLeft.h"
|
||||
#include "GameAdminChanged.h"
|
||||
#include "RemovedFromGame.h"
|
||||
#include <constr_CHOICE.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum gamePlayerNotification_PR {
|
||||
gamePlayerNotification_PR_NOTHING, /* No components present */
|
||||
gamePlayerNotification_PR_gamePlayerJoined,
|
||||
gamePlayerNotification_PR_gamePlayerLeft,
|
||||
gamePlayerNotification_PR_gameAdminChanged,
|
||||
gamePlayerNotification_PR_removedFromGame,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} gamePlayerNotification_PR;
|
||||
|
||||
/* GamePlayerMessage */
|
||||
typedef struct GamePlayerMessage {
|
||||
NonZeroId_t gameId;
|
||||
struct gamePlayerNotification {
|
||||
gamePlayerNotification_PR present;
|
||||
union GamePlayerMessage__gamePlayerNotification_u {
|
||||
GamePlayerJoined_t gamePlayerJoined;
|
||||
GamePlayerLeft_t gamePlayerLeft;
|
||||
GameAdminChanged_t gameAdminChanged;
|
||||
RemovedFromGame_t removedFromGame;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} gamePlayerNotification;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GamePlayerMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GamePlayerMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GamePlayerMessage_H_ */
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameStartMessage.h"
|
||||
|
||||
static int
|
||||
memb_playerSeats_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Determine the number of elements */
|
||||
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
|
||||
|
||||
if((size >= 2 && size <= 10)) {
|
||||
/* Perform validation of the inner elements */
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_playerSeats_4[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_playerSeats_tags_4[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_playerSeats_specs_4 = {
|
||||
sizeof(struct playerSeats),
|
||||
offsetof(struct playerSeats, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_playerSeats_4 = {
|
||||
"playerSeats",
|
||||
"playerSeats",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_playerSeats_tags_4,
|
||||
sizeof(asn_DEF_playerSeats_tags_4)
|
||||
/sizeof(asn_DEF_playerSeats_tags_4[0]), /* 1 */
|
||||
asn_DEF_playerSeats_tags_4, /* Same as above */
|
||||
sizeof(asn_DEF_playerSeats_tags_4)
|
||||
/sizeof(asn_DEF_playerSeats_tags_4[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_playerSeats_4,
|
||||
1, /* Single element */
|
||||
&asn_SPC_playerSeats_specs_4 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_GameStartMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameStartMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameStartMessage, startDealerPlayerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"startDealerPlayerId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct GameStartMessage, playerSeats),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_playerSeats_4,
|
||||
memb_playerSeats_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"playerSeats"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameStartMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (15 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_GameStartMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 318 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* startDealerPlayerId at 319 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* playerSeats at 321 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_GameStartMessage_specs_1 = {
|
||||
sizeof(struct GameStartMessage),
|
||||
offsetof(struct GameStartMessage, _asn_ctx),
|
||||
asn_MAP_GameStartMessage_tag2el_1,
|
||||
3, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
2, /* Start extensions */
|
||||
4 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameStartMessage = {
|
||||
"GameStartMessage",
|
||||
"GameStartMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameStartMessage_tags_1,
|
||||
sizeof(asn_DEF_GameStartMessage_tags_1)
|
||||
/sizeof(asn_DEF_GameStartMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_GameStartMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameStartMessage_tags_1)
|
||||
/sizeof(asn_DEF_GameStartMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_GameStartMessage_1,
|
||||
3, /* Elements count */
|
||||
&asn_SPC_GameStartMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameStartMessage_H_
|
||||
#define _GameStartMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GameStartMessage */
|
||||
typedef struct GameStartMessage {
|
||||
NonZeroId_t gameId;
|
||||
NonZeroId_t startDealerPlayerId;
|
||||
struct playerSeats {
|
||||
A_SEQUENCE_OF(NonZeroId_t) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} playerSeats;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} GameStartMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GameStartMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GameStartMessage_H_ */
|
||||
Vendored
+134
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "GameState.h"
|
||||
|
||||
int
|
||||
GameState_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeEnumerated,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
GameState_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
|
||||
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
|
||||
td->elements = asn_DEF_NativeEnumerated.elements;
|
||||
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
|
||||
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
|
||||
}
|
||||
|
||||
void
|
||||
GameState_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
GameState_1_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
int
|
||||
GameState_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
GameState_1_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
GameState_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
GameState_1_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
GameState_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
GameState_1_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
GameState_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
GameState_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
GameState_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
GameState_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_INTEGER_enum_map_t asn_MAP_GameState_value2enum_1[] = {
|
||||
{ 0, 12, "statePreflop" },
|
||||
{ 1, 9, "stateFlop" },
|
||||
{ 2, 9, "stateTurn" },
|
||||
{ 3, 10, "stateRiver" },
|
||||
{ 4, 22, "statePreflopSmallBlind" },
|
||||
{ 5, 20, "statePreflopBigBlind" }
|
||||
};
|
||||
static unsigned int asn_MAP_GameState_enum2value_1[] = {
|
||||
1, /* stateFlop(1) */
|
||||
0, /* statePreflop(0) */
|
||||
5, /* statePreflopBigBlind(5) */
|
||||
4, /* statePreflopSmallBlind(4) */
|
||||
3, /* stateRiver(3) */
|
||||
2 /* stateTurn(2) */
|
||||
};
|
||||
static asn_INTEGER_specifics_t asn_SPC_GameState_specs_1 = {
|
||||
asn_MAP_GameState_value2enum_1, /* "tag" => N; sorted by tag */
|
||||
asn_MAP_GameState_enum2value_1, /* N => "tag"; sorted by N */
|
||||
6, /* Number of elements in the maps */
|
||||
0, /* Enumeration is not extensible */
|
||||
1, /* Strict enumeration */
|
||||
0, /* Native long size */
|
||||
0
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_GameState_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GameState = {
|
||||
"GameState",
|
||||
"GameState",
|
||||
GameState_free,
|
||||
GameState_print,
|
||||
GameState_constraint,
|
||||
GameState_decode_ber,
|
||||
GameState_encode_der,
|
||||
GameState_decode_xer,
|
||||
GameState_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_GameState_tags_1,
|
||||
sizeof(asn_DEF_GameState_tags_1)
|
||||
/sizeof(asn_DEF_GameState_tags_1[0]), /* 1 */
|
||||
asn_DEF_GameState_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_GameState_tags_1)
|
||||
/sizeof(asn_DEF_GameState_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* Defined elsewhere */
|
||||
&asn_SPC_GameState_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _GameState_H_
|
||||
#define _GameState_H_
|
||||
|
||||
|
||||
#include <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_ */
|
||||
Vendored
+131
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "Guid.h"
|
||||
|
||||
int
|
||||
Guid_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
unsigned long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const unsigned long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 4294967295)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeInteger,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
Guid_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeInteger.free_struct;
|
||||
td->print_struct = asn_DEF_NativeInteger.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeInteger.per_constraints;
|
||||
td->elements = asn_DEF_NativeInteger.elements;
|
||||
td->elements_count = asn_DEF_NativeInteger.elements_count;
|
||||
/* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
|
||||
}
|
||||
|
||||
void
|
||||
Guid_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
Guid_1_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
int
|
||||
Guid_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Guid_1_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
Guid_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
Guid_1_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
Guid_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Guid_1_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
Guid_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
Guid_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
Guid_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Guid_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_INTEGER_specifics_t asn_SPC_Guid_specs_1 = {
|
||||
0, 0, 0, 0, 0,
|
||||
0, /* Native long size */
|
||||
1 /* Unsigned representation */
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_Guid_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_Guid = {
|
||||
"Guid",
|
||||
"Guid",
|
||||
Guid_free,
|
||||
Guid_print,
|
||||
Guid_constraint,
|
||||
Guid_decode_ber,
|
||||
Guid_encode_der,
|
||||
Guid_decode_xer,
|
||||
Guid_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Guid_tags_1,
|
||||
sizeof(asn_DEF_Guid_tags_1)
|
||||
/sizeof(asn_DEF_Guid_tags_1[0]), /* 1 */
|
||||
asn_DEF_Guid_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_Guid_tags_1)
|
||||
/sizeof(asn_DEF_Guid_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* No members */
|
||||
&asn_SPC_Guid_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _Guid_H_
|
||||
#define _Guid_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <NativeInteger.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Guid */
|
||||
typedef unsigned long Guid_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_Guid;
|
||||
asn_struct_free_f Guid_free;
|
||||
asn_struct_print_f Guid_print;
|
||||
asn_constr_check_f Guid_constraint;
|
||||
ber_type_decoder_f Guid_decode_ber;
|
||||
der_type_encoder_f Guid_encode_der;
|
||||
xer_type_decoder_f Guid_decode_xer;
|
||||
xer_type_encoder_f Guid_encode_xer;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Guid_H_ */
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "HandStartMessage.h"
|
||||
|
||||
static int
|
||||
memb_yourCards_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Determine the number of elements */
|
||||
size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
|
||||
|
||||
if((size == 2)) {
|
||||
/* Perform validation of the inner elements */
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
memb_smallBlind_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 1 && value <= 20001)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_yourCards_3[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_Card,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_yourCards_tags_3[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_yourCards_specs_3 = {
|
||||
sizeof(struct yourCards),
|
||||
offsetof(struct yourCards, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_yourCards_3 = {
|
||||
"yourCards",
|
||||
"yourCards",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_yourCards_tags_3,
|
||||
sizeof(asn_DEF_yourCards_tags_3)
|
||||
/sizeof(asn_DEF_yourCards_tags_3[0]), /* 1 */
|
||||
asn_DEF_yourCards_tags_3, /* Same as above */
|
||||
sizeof(asn_DEF_yourCards_tags_3)
|
||||
/sizeof(asn_DEF_yourCards_tags_3[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_yourCards_3,
|
||||
1, /* Single element */
|
||||
&asn_SPC_yourCards_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_HandStartMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct HandStartMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct HandStartMessage, yourCards),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_yourCards_3,
|
||||
memb_yourCards_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"yourCards"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct HandStartMessage, smallBlind),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_smallBlind_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"smallBlind"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_HandStartMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (16 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_HandStartMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 324 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 0 }, /* smallBlind at 326 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* yourCards at 325 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_HandStartMessage_specs_1 = {
|
||||
sizeof(struct HandStartMessage),
|
||||
offsetof(struct HandStartMessage, _asn_ctx),
|
||||
asn_MAP_HandStartMessage_tag2el_1,
|
||||
3, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
2, /* Start extensions */
|
||||
4 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_HandStartMessage = {
|
||||
"HandStartMessage",
|
||||
"HandStartMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_HandStartMessage_tags_1,
|
||||
sizeof(asn_DEF_HandStartMessage_tags_1)
|
||||
/sizeof(asn_DEF_HandStartMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_HandStartMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_HandStartMessage_tags_1)
|
||||
/sizeof(asn_DEF_HandStartMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_HandStartMessage_1,
|
||||
3, /* Elements count */
|
||||
&asn_SPC_HandStartMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _HandStartMessage_H_
|
||||
#define _HandStartMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <NativeInteger.h>
|
||||
#include "Card.h"
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* HandStartMessage */
|
||||
typedef struct HandStartMessage {
|
||||
NonZeroId_t gameId;
|
||||
struct yourCards {
|
||||
A_SEQUENCE_OF(Card_t) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} yourCards;
|
||||
long smallBlind;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} HandStartMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_HandStartMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _HandStartMessage_H_ */
|
||||
+1
@@ -0,0 +1 @@
|
||||
/opt/local/share/asn1c/INTEGER.c
|
||||
+1
@@ -0,0 +1 @@
|
||||
/opt/local/share/asn1c/INTEGER.h
|
||||
Vendored
+124
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "Id.h"
|
||||
|
||||
int
|
||||
Id_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
unsigned long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const unsigned long *)sptr;
|
||||
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeInteger,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
Id_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeInteger.free_struct;
|
||||
td->print_struct = asn_DEF_NativeInteger.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeInteger.per_constraints;
|
||||
td->elements = asn_DEF_NativeInteger.elements;
|
||||
td->elements_count = asn_DEF_NativeInteger.elements_count;
|
||||
/* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
|
||||
}
|
||||
|
||||
void
|
||||
Id_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
Id_1_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
int
|
||||
Id_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Id_1_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
Id_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
Id_1_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
Id_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Id_1_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
Id_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
Id_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
Id_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
Id_1_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_INTEGER_specifics_t asn_SPC_Id_specs_1 = {
|
||||
0, 0, 0, 0, 0,
|
||||
0, /* Native long size */
|
||||
1 /* Unsigned representation */
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_Id_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_Id = {
|
||||
"Id",
|
||||
"Id",
|
||||
Id_free,
|
||||
Id_print,
|
||||
Id_constraint,
|
||||
Id_decode_ber,
|
||||
Id_encode_der,
|
||||
Id_decode_xer,
|
||||
Id_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Id_tags_1,
|
||||
sizeof(asn_DEF_Id_tags_1)
|
||||
/sizeof(asn_DEF_Id_tags_1[0]), /* 1 */
|
||||
asn_DEF_Id_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_Id_tags_1)
|
||||
/sizeof(asn_DEF_Id_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* No members */
|
||||
&asn_SPC_Id_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _Id_H_
|
||||
#define _Id_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <NativeInteger.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Id */
|
||||
typedef unsigned long Id_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_Id;
|
||||
asn_struct_free_f Id_free;
|
||||
asn_struct_print_f Id_print;
|
||||
asn_constr_check_f Id_constraint;
|
||||
ber_type_decoder_f Id_decode_ber;
|
||||
der_type_encoder_f Id_encode_der;
|
||||
xer_type_decoder_f Id_decode_xer;
|
||||
xer_type_encoder_f Id_encode_xer;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Id_H_ */
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "InitAckMessage.h"
|
||||
|
||||
static int
|
||||
memb_latestBetaRevision_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 0 && value <= 65535)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_InitAckMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct InitAckMessage, latestGameVersion),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_Version,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"latestGameVersion"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct InitAckMessage, latestBetaRevision),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_latestBetaRevision_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"latestBetaRevision"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct InitAckMessage, yourSessionId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_Guid,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"yourSessionId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct InitAckMessage, yourPlayerId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"yourPlayerId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_InitAckMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (1 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_InitAckMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 2 }, /* latestBetaRevision at 91 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* yourSessionId at 92 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -2, 0 }, /* yourPlayerId at 94 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* latestGameVersion at 90 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_InitAckMessage_specs_1 = {
|
||||
sizeof(struct InitAckMessage),
|
||||
offsetof(struct InitAckMessage, _asn_ctx),
|
||||
asn_MAP_InitAckMessage_tag2el_1,
|
||||
4, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
3, /* Start extensions */
|
||||
5 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_InitAckMessage = {
|
||||
"InitAckMessage",
|
||||
"InitAckMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_InitAckMessage_tags_1,
|
||||
sizeof(asn_DEF_InitAckMessage_tags_1)
|
||||
/sizeof(asn_DEF_InitAckMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_InitAckMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_InitAckMessage_tags_1)
|
||||
/sizeof(asn_DEF_InitAckMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_InitAckMessage_1,
|
||||
4, /* Elements count */
|
||||
&asn_SPC_InitAckMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _InitAckMessage_H_
|
||||
#define _InitAckMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "Version.h"
|
||||
#include <NativeInteger.h>
|
||||
#include "Guid.h"
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* InitAckMessage */
|
||||
typedef struct InitAckMessage {
|
||||
Version_t latestGameVersion;
|
||||
long latestBetaRevision;
|
||||
Guid_t yourSessionId;
|
||||
NonZeroId_t yourPlayerId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} InitAckMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_InitAckMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _InitAckMessage_H_ */
|
||||
Vendored
+140
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "InitMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_login_3[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct login, choice.anonymousLogin),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_AnonymousLogin,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"anonymousLogin"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct login, choice.authenticatedLogin),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_AuthenticatedLogin,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"authenticatedLogin"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct login, choice.statisticsLogin),
|
||||
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_StatisticsLogin,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"statisticsLogin"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_login_tag2el_3[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* anonymousLogin at 64 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* authenticatedLogin at 65 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* statisticsLogin at 67 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_login_specs_3 = {
|
||||
sizeof(struct login),
|
||||
offsetof(struct login, _asn_ctx),
|
||||
offsetof(struct login, present),
|
||||
sizeof(((struct login *)0)->present),
|
||||
asn_MAP_login_tag2el_3,
|
||||
3, /* Count of tags in the map */
|
||||
0,
|
||||
3 /* Extensions start */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_login_3 = {
|
||||
"login",
|
||||
"login",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
0, /* No tags (count) */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_login_3,
|
||||
3, /* Elements count */
|
||||
&asn_SPC_login_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_InitMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct InitMessage, requestedVersion),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_Version,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"requestedVersion"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct InitMessage, login),
|
||||
-1 /* Ambiguous tag (CHOICE?) */,
|
||||
0,
|
||||
&asn_DEF_login_3,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"login"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_InitMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (0 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_InitMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* requestedVersion at 62 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* anonymousLogin at 64 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* authenticatedLogin at 65 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* statisticsLogin at 67 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_InitMessage_specs_1 = {
|
||||
sizeof(struct InitMessage),
|
||||
offsetof(struct InitMessage, _asn_ctx),
|
||||
asn_MAP_InitMessage_tag2el_1,
|
||||
4, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_InitMessage = {
|
||||
"InitMessage",
|
||||
"InitMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_InitMessage_tags_1,
|
||||
sizeof(asn_DEF_InitMessage_tags_1)
|
||||
/sizeof(asn_DEF_InitMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_InitMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_InitMessage_tags_1)
|
||||
/sizeof(asn_DEF_InitMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_InitMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_InitMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _InitMessage_H_
|
||||
#define _InitMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "Version.h"
|
||||
#include "AnonymousLogin.h"
|
||||
#include "AuthenticatedLogin.h"
|
||||
#include "StatisticsLogin.h"
|
||||
#include <constr_CHOICE.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum login_PR {
|
||||
login_PR_NOTHING, /* No components present */
|
||||
login_PR_anonymousLogin,
|
||||
login_PR_authenticatedLogin,
|
||||
login_PR_statisticsLogin,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} login_PR;
|
||||
|
||||
/* InitMessage */
|
||||
typedef struct InitMessage {
|
||||
Version_t requestedVersion;
|
||||
struct login {
|
||||
login_PR present;
|
||||
union InitMessage__login_u {
|
||||
AnonymousLogin_t anonymousLogin;
|
||||
AuthenticatedLogin_t authenticatedLogin;
|
||||
StatisticsLogin_t statisticsLogin;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} login;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} InitMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_InitMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _InitMessage_H_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "JoinExistingGame.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_JoinExistingGame_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct JoinExistingGame, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_JoinExistingGame_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_JoinExistingGame_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 219 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_JoinExistingGame_specs_1 = {
|
||||
sizeof(struct JoinExistingGame),
|
||||
offsetof(struct JoinExistingGame, _asn_ctx),
|
||||
asn_MAP_JoinExistingGame_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_JoinExistingGame = {
|
||||
"JoinExistingGame",
|
||||
"JoinExistingGame",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_JoinExistingGame_tags_1,
|
||||
sizeof(asn_DEF_JoinExistingGame_tags_1)
|
||||
/sizeof(asn_DEF_JoinExistingGame_tags_1[0]), /* 1 */
|
||||
asn_DEF_JoinExistingGame_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_JoinExistingGame_tags_1)
|
||||
/sizeof(asn_DEF_JoinExistingGame_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_JoinExistingGame_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_JoinExistingGame_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _JoinExistingGame_H_
|
||||
#define _JoinExistingGame_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* JoinExistingGame */
|
||||
typedef struct JoinExistingGame {
|
||||
NonZeroId_t gameId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} JoinExistingGame_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_JoinExistingGame;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _JoinExistingGame_H_ */
|
||||
Vendored
+70
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "JoinGameAck.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_JoinGameAck_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct JoinGameAck, areYouAdmin),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
|
||||
0,
|
||||
&asn_DEF_BOOLEAN,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"areYouAdmin"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct JoinGameAck, gameInfo),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_GameInfo,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameInfo"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_JoinGameAck_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_JoinGameAck_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* areYouAdmin at 234 */
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* gameInfo at 236 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_JoinGameAck_specs_1 = {
|
||||
sizeof(struct JoinGameAck),
|
||||
offsetof(struct JoinGameAck, _asn_ctx),
|
||||
asn_MAP_JoinGameAck_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_JoinGameAck = {
|
||||
"JoinGameAck",
|
||||
"JoinGameAck",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_JoinGameAck_tags_1,
|
||||
sizeof(asn_DEF_JoinGameAck_tags_1)
|
||||
/sizeof(asn_DEF_JoinGameAck_tags_1[0]), /* 1 */
|
||||
asn_DEF_JoinGameAck_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_JoinGameAck_tags_1)
|
||||
/sizeof(asn_DEF_JoinGameAck_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_JoinGameAck_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_JoinGameAck_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _JoinGameAck_H_
|
||||
#define _JoinGameAck_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <BOOLEAN.h>
|
||||
#include "GameInfo.h"
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* JoinGameAck */
|
||||
typedef struct JoinGameAck {
|
||||
BOOLEAN_t areYouAdmin;
|
||||
GameInfo_t gameInfo;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} JoinGameAck_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_JoinGameAck;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _JoinGameAck_H_ */
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "JoinGameFailed.h"
|
||||
|
||||
static int
|
||||
joinGameFailureReason_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* This type is implemented using NativeEnumerated,
|
||||
* so here we adjust the DEF accordingly.
|
||||
*/
|
||||
static void
|
||||
joinGameFailureReason_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
|
||||
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
|
||||
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
|
||||
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
|
||||
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
|
||||
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
|
||||
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
|
||||
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
|
||||
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
|
||||
if(!td->per_constraints)
|
||||
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
|
||||
td->elements = asn_DEF_NativeEnumerated.elements;
|
||||
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
|
||||
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
|
||||
}
|
||||
|
||||
static void
|
||||
joinGameFailureReason_2_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
joinGameFailureReason_2_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
static int
|
||||
joinGameFailureReason_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
joinGameFailureReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_dec_rval_t
|
||||
joinGameFailureReason_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const void *bufptr, size_t size, int tag_mode) {
|
||||
joinGameFailureReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
static asn_enc_rval_t
|
||||
joinGameFailureReason_2_encode_der(asn_TYPE_descriptor_t *td,
|
||||
void *structure, int tag_mode, ber_tlv_tag_t tag,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
joinGameFailureReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_dec_rval_t
|
||||
joinGameFailureReason_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
|
||||
joinGameFailureReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
static asn_enc_rval_t
|
||||
joinGameFailureReason_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
joinGameFailureReason_2_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_INTEGER_enum_map_t asn_MAP_joinGameFailureReason_value2enum_2[] = {
|
||||
{ 1, 11, "invalidGame" },
|
||||
{ 2, 10, "gameIsFull" },
|
||||
{ 3, 13, "gameIsRunning" },
|
||||
{ 4, 15, "invalidPassword" }
|
||||
};
|
||||
static unsigned int asn_MAP_joinGameFailureReason_enum2value_2[] = {
|
||||
1, /* gameIsFull(2) */
|
||||
2, /* gameIsRunning(3) */
|
||||
0, /* invalidGame(1) */
|
||||
3 /* invalidPassword(4) */
|
||||
};
|
||||
static asn_INTEGER_specifics_t asn_SPC_joinGameFailureReason_specs_2 = {
|
||||
asn_MAP_joinGameFailureReason_value2enum_2, /* "tag" => N; sorted by tag */
|
||||
asn_MAP_joinGameFailureReason_enum2value_2, /* N => "tag"; sorted by N */
|
||||
4, /* Number of elements in the maps */
|
||||
0, /* Enumeration is not extensible */
|
||||
1, /* Strict enumeration */
|
||||
0, /* Native long size */
|
||||
0
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_joinGameFailureReason_tags_2[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_joinGameFailureReason_2 = {
|
||||
"joinGameFailureReason",
|
||||
"joinGameFailureReason",
|
||||
joinGameFailureReason_2_free,
|
||||
joinGameFailureReason_2_print,
|
||||
joinGameFailureReason_2_constraint,
|
||||
joinGameFailureReason_2_decode_ber,
|
||||
joinGameFailureReason_2_encode_der,
|
||||
joinGameFailureReason_2_decode_xer,
|
||||
joinGameFailureReason_2_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_joinGameFailureReason_tags_2,
|
||||
sizeof(asn_DEF_joinGameFailureReason_tags_2)
|
||||
/sizeof(asn_DEF_joinGameFailureReason_tags_2[0]), /* 1 */
|
||||
asn_DEF_joinGameFailureReason_tags_2, /* Same as above */
|
||||
sizeof(asn_DEF_joinGameFailureReason_tags_2)
|
||||
/sizeof(asn_DEF_joinGameFailureReason_tags_2[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* Defined elsewhere */
|
||||
&asn_SPC_joinGameFailureReason_specs_2 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_JoinGameFailed_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct JoinGameFailed, joinGameFailureReason),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
|
||||
0,
|
||||
&asn_DEF_joinGameFailureReason_2,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"joinGameFailureReason"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_JoinGameFailed_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_JoinGameFailed_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* joinGameFailureReason at 240 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_JoinGameFailed_specs_1 = {
|
||||
sizeof(struct JoinGameFailed),
|
||||
offsetof(struct JoinGameFailed, _asn_ctx),
|
||||
asn_MAP_JoinGameFailed_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_JoinGameFailed = {
|
||||
"JoinGameFailed",
|
||||
"JoinGameFailed",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_JoinGameFailed_tags_1,
|
||||
sizeof(asn_DEF_JoinGameFailed_tags_1)
|
||||
/sizeof(asn_DEF_JoinGameFailed_tags_1[0]), /* 1 */
|
||||
asn_DEF_JoinGameFailed_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_JoinGameFailed_tags_1)
|
||||
/sizeof(asn_DEF_JoinGameFailed_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_JoinGameFailed_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_JoinGameFailed_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _JoinGameFailed_H_
|
||||
#define _JoinGameFailed_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <NativeEnumerated.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum joinGameFailureReason {
|
||||
joinGameFailureReason_invalidGame = 1,
|
||||
joinGameFailureReason_gameIsFull = 2,
|
||||
joinGameFailureReason_gameIsRunning = 3,
|
||||
joinGameFailureReason_invalidPassword = 4
|
||||
} e_joinGameFailureReason;
|
||||
|
||||
/* JoinGameFailed */
|
||||
typedef struct JoinGameFailed {
|
||||
long joinGameFailureReason;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} JoinGameFailed_t;
|
||||
|
||||
/* Implementation */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_joinGameFailureReason_2; // (Use -fall-defs-global to expose) */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_JoinGameFailed;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _JoinGameFailed_H_ */
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "JoinGameReplyMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_joinGameResult_3[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct joinGameResult, choice.joinGameAck),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_JoinGameAck,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"joinGameAck"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct joinGameResult, choice.joinGameFailed),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_JoinGameFailed,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"joinGameFailed"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_joinGameResult_tag2el_3[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinGameAck at 228 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinGameFailed at 230 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_joinGameResult_specs_3 = {
|
||||
sizeof(struct joinGameResult),
|
||||
offsetof(struct joinGameResult, _asn_ctx),
|
||||
offsetof(struct joinGameResult, present),
|
||||
sizeof(((struct joinGameResult *)0)->present),
|
||||
asn_MAP_joinGameResult_tag2el_3,
|
||||
2, /* Count of tags in the map */
|
||||
0,
|
||||
2 /* Extensions start */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_joinGameResult_3 = {
|
||||
"joinGameResult",
|
||||
"joinGameResult",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
0, /* No tags (count) */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_joinGameResult_3,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_joinGameResult_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_JoinGameReplyMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct JoinGameReplyMessage, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NonZeroId,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct JoinGameReplyMessage, joinGameResult),
|
||||
-1 /* Ambiguous tag (CHOICE?) */,
|
||||
0,
|
||||
&asn_DEF_joinGameResult_3,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"joinGameResult"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_JoinGameReplyMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (9 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_JoinGameReplyMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* gameId at 226 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* joinGameAck at 228 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinGameFailed at 230 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_JoinGameReplyMessage_specs_1 = {
|
||||
sizeof(struct JoinGameReplyMessage),
|
||||
offsetof(struct JoinGameReplyMessage, _asn_ctx),
|
||||
asn_MAP_JoinGameReplyMessage_tag2el_1,
|
||||
3, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_JoinGameReplyMessage = {
|
||||
"JoinGameReplyMessage",
|
||||
"JoinGameReplyMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_JoinGameReplyMessage_tags_1,
|
||||
sizeof(asn_DEF_JoinGameReplyMessage_tags_1)
|
||||
/sizeof(asn_DEF_JoinGameReplyMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_JoinGameReplyMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_JoinGameReplyMessage_tags_1)
|
||||
/sizeof(asn_DEF_JoinGameReplyMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_JoinGameReplyMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_JoinGameReplyMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _JoinGameReplyMessage_H_
|
||||
#define _JoinGameReplyMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "NonZeroId.h"
|
||||
#include "JoinGameAck.h"
|
||||
#include "JoinGameFailed.h"
|
||||
#include <constr_CHOICE.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum joinGameResult_PR {
|
||||
joinGameResult_PR_NOTHING, /* No components present */
|
||||
joinGameResult_PR_joinGameAck,
|
||||
joinGameResult_PR_joinGameFailed,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} joinGameResult_PR;
|
||||
|
||||
/* JoinGameReplyMessage */
|
||||
typedef struct JoinGameReplyMessage {
|
||||
NonZeroId_t gameId;
|
||||
struct joinGameResult {
|
||||
joinGameResult_PR present;
|
||||
union JoinGameReplyMessage__joinGameResult_u {
|
||||
JoinGameAck_t joinGameAck;
|
||||
JoinGameFailed_t joinGameFailed;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} joinGameResult;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} JoinGameReplyMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_JoinGameReplyMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _JoinGameReplyMessage_H_ */
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "JoinGameRequestMessage.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_joinGameAction_2[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct joinGameAction, choice.joinExistingGame),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_JoinExistingGame,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"joinExistingGame"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct joinGameAction, choice.joinNewGame),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_JoinNewGame,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"joinNewGame"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_joinGameAction_tag2el_2[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinExistingGame at 211 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* joinNewGame at 213 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_joinGameAction_specs_2 = {
|
||||
sizeof(struct joinGameAction),
|
||||
offsetof(struct joinGameAction, _asn_ctx),
|
||||
offsetof(struct joinGameAction, present),
|
||||
sizeof(((struct joinGameAction *)0)->present),
|
||||
asn_MAP_joinGameAction_tag2el_2,
|
||||
2, /* Count of tags in the map */
|
||||
0,
|
||||
2 /* Extensions start */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_joinGameAction_2 = {
|
||||
"joinGameAction",
|
||||
"joinGameAction",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
0, /* No tags (count) */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_joinGameAction_2,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_joinGameAction_specs_2 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_JoinGameRequestMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct JoinGameRequestMessage, joinGameAction),
|
||||
-1 /* Ambiguous tag (CHOICE?) */,
|
||||
0,
|
||||
&asn_DEF_joinGameAction_2,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"joinGameAction"
|
||||
},
|
||||
{ ATF_POINTER, 1, offsetof(struct JoinGameRequestMessage, password),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
0,
|
||||
&asn_DEF_UTF8String,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"password"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_JoinGameRequestMessage_tags_1[] = {
|
||||
(ASN_TAG_CLASS_APPLICATION | (8 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_JoinGameRequestMessage_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* password at 214 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* joinExistingGame at 211 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 } /* joinNewGame at 213 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_JoinGameRequestMessage_specs_1 = {
|
||||
sizeof(struct JoinGameRequestMessage),
|
||||
offsetof(struct JoinGameRequestMessage, _asn_ctx),
|
||||
asn_MAP_JoinGameRequestMessage_tag2el_1,
|
||||
3, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
1, /* Start extensions */
|
||||
3 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_JoinGameRequestMessage = {
|
||||
"JoinGameRequestMessage",
|
||||
"JoinGameRequestMessage",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_JoinGameRequestMessage_tags_1,
|
||||
sizeof(asn_DEF_JoinGameRequestMessage_tags_1)
|
||||
/sizeof(asn_DEF_JoinGameRequestMessage_tags_1[0]) - 1, /* 1 */
|
||||
asn_DEF_JoinGameRequestMessage_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_JoinGameRequestMessage_tags_1)
|
||||
/sizeof(asn_DEF_JoinGameRequestMessage_tags_1[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_JoinGameRequestMessage_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_JoinGameRequestMessage_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#ifndef _JoinGameRequestMessage_H_
|
||||
#define _JoinGameRequestMessage_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <UTF8String.h>
|
||||
#include "JoinExistingGame.h"
|
||||
#include "JoinNewGame.h"
|
||||
#include <constr_CHOICE.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum joinGameAction_PR {
|
||||
joinGameAction_PR_NOTHING, /* No components present */
|
||||
joinGameAction_PR_joinExistingGame,
|
||||
joinGameAction_PR_joinNewGame,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} joinGameAction_PR;
|
||||
|
||||
/* JoinGameRequestMessage */
|
||||
typedef struct JoinGameRequestMessage {
|
||||
struct joinGameAction {
|
||||
joinGameAction_PR present;
|
||||
union JoinGameRequestMessage__joinGameAction_u {
|
||||
JoinExistingGame_t joinExistingGame;
|
||||
JoinNewGame_t joinNewGame;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} joinGameAction;
|
||||
UTF8String_t *password /* OPTIONAL */;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} JoinGameRequestMessage_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_JoinGameRequestMessage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _JoinGameRequestMessage_H_ */
|
||||
Vendored
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "POKERTH-PROTOCOL"
|
||||
* found in "../../../docs/pokerth.asn1"
|
||||
*/
|
||||
|
||||
#include <asn_internal.h>
|
||||
|
||||
#include "JoinNewGame.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_JoinNewGame_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct JoinNewGame, gameInfo),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
0,
|
||||
&asn_DEF_GameInfo,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameInfo"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_JoinNewGame_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_JoinNewGame_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* gameInfo at 223 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_JoinNewGame_specs_1 = {
|
||||
sizeof(struct JoinNewGame),
|
||||
offsetof(struct JoinNewGame, _asn_ctx),
|
||||
asn_MAP_JoinNewGame_tag2el_1,
|
||||
1, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
0, /* Start extensions */
|
||||
2 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_JoinNewGame = {
|
||||
"JoinNewGame",
|
||||
"JoinNewGame",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_JoinNewGame_tags_1,
|
||||
sizeof(asn_DEF_JoinNewGame_tags_1)
|
||||
/sizeof(asn_DEF_JoinNewGame_tags_1[0]), /* 1 */
|
||||
asn_DEF_JoinNewGame_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_JoinNewGame_tags_1)
|
||||
/sizeof(asn_DEF_JoinNewGame_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_JoinNewGame_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_JoinNewGame_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user