Regenerating protocol code.
This commit is contained in:
+65
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "CHATCLEANER-PROTOCOL"
|
||||
* found in "../../../docs/chatcleaner.asn1"
|
||||
* `asn1c -fskeletons-copy`
|
||||
*/
|
||||
|
||||
#include "CleanerChatType.h"
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_CleanerChatType_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct CleanerChatType, choice.cleanerChatTypeLobby),
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_CleanerChatTypeLobby,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"cleanerChatTypeLobby"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct CleanerChatType, choice.cleanerChatTypeGame),
|
||||
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
|
||||
-1, /* IMPLICIT tag at current level */
|
||||
&asn_DEF_CleanerChatTypeGame,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"cleanerChatTypeGame"
|
||||
},
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_CleanerChatType_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cleanerChatTypeLobby at 44 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cleanerChatTypeGame at 46 */
|
||||
};
|
||||
static asn_CHOICE_specifics_t asn_SPC_CleanerChatType_specs_1 = {
|
||||
sizeof(struct CleanerChatType),
|
||||
offsetof(struct CleanerChatType, _asn_ctx),
|
||||
offsetof(struct CleanerChatType, present),
|
||||
sizeof(((struct CleanerChatType *)0)->present),
|
||||
asn_MAP_CleanerChatType_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0,
|
||||
2 /* Extensions start */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_CleanerChatType = {
|
||||
"CleanerChatType",
|
||||
"CleanerChatType",
|
||||
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_CleanerChatType_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_CleanerChatType_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "CHATCLEANER-PROTOCOL"
|
||||
* found in "../../../docs/chatcleaner.asn1"
|
||||
* `asn1c -fskeletons-copy`
|
||||
*/
|
||||
|
||||
#ifndef _CleanerChatType_H_
|
||||
#define _CleanerChatType_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include "CleanerChatTypeLobby.h"
|
||||
#include "CleanerChatTypeGame.h"
|
||||
#include <constr_CHOICE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum CleanerChatType_PR {
|
||||
CleanerChatType_PR_NOTHING, /* No components present */
|
||||
CleanerChatType_PR_cleanerChatTypeLobby,
|
||||
CleanerChatType_PR_cleanerChatTypeGame,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} CleanerChatType_PR;
|
||||
|
||||
/* CleanerChatType */
|
||||
typedef struct CleanerChatType {
|
||||
CleanerChatType_PR present;
|
||||
union CleanerChatType_u {
|
||||
CleanerChatTypeLobby_t cleanerChatTypeLobby;
|
||||
CleanerChatTypeGame_t cleanerChatTypeGame;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
} choice;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} CleanerChatType_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_CleanerChatType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CleanerChatType_H_ */
|
||||
#include <asn_internal.h>
|
||||
+206
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "CHATCLEANER-PROTOCOL"
|
||||
* found in "../../../docs/chatcleaner.asn1"
|
||||
* `asn1c -fskeletons-copy`
|
||||
*/
|
||||
|
||||
#include "CleanerChatTypeGame.h"
|
||||
|
||||
static int
|
||||
gameId_2_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
|
||||
gameId_2_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 */
|
||||
}
|
||||
|
||||
static void
|
||||
gameId_2_free(asn_TYPE_descriptor_t *td,
|
||||
void *struct_ptr, int contents_only) {
|
||||
gameId_2_inherit_TYPE_descriptor(td);
|
||||
td->free_struct(td, struct_ptr, contents_only);
|
||||
}
|
||||
|
||||
static int
|
||||
gameId_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
|
||||
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
gameId_2_inherit_TYPE_descriptor(td);
|
||||
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_dec_rval_t
|
||||
gameId_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) {
|
||||
gameId_2_inherit_TYPE_descriptor(td);
|
||||
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
|
||||
}
|
||||
|
||||
static asn_enc_rval_t
|
||||
gameId_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) {
|
||||
gameId_2_inherit_TYPE_descriptor(td);
|
||||
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
|
||||
}
|
||||
|
||||
static asn_dec_rval_t
|
||||
gameId_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) {
|
||||
gameId_2_inherit_TYPE_descriptor(td);
|
||||
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
|
||||
}
|
||||
|
||||
static asn_enc_rval_t
|
||||
gameId_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) {
|
||||
gameId_2_inherit_TYPE_descriptor(td);
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static int
|
||||
memb_gameId_constraint_1(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;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_INTEGER_specifics_t asn_SPC_gameId_specs_2 = {
|
||||
0, 0, 0, 0, 0,
|
||||
0, /* Native long size */
|
||||
1 /* Unsigned representation */
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_gameId_tags_2[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_gameId_2 = {
|
||||
"gameId",
|
||||
"gameId",
|
||||
gameId_2_free,
|
||||
gameId_2_print,
|
||||
gameId_2_constraint,
|
||||
gameId_2_decode_ber,
|
||||
gameId_2_encode_der,
|
||||
gameId_2_decode_xer,
|
||||
gameId_2_encode_xer,
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_gameId_tags_2,
|
||||
sizeof(asn_DEF_gameId_tags_2)
|
||||
/sizeof(asn_DEF_gameId_tags_2[0]), /* 1 */
|
||||
asn_DEF_gameId_tags_2, /* Same as above */
|
||||
sizeof(asn_DEF_gameId_tags_2)
|
||||
/sizeof(asn_DEF_gameId_tags_2[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* No members */
|
||||
&asn_SPC_gameId_specs_2 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_CleanerChatTypeGame_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct CleanerChatTypeGame, gameId),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_gameId_2,
|
||||
memb_gameId_constraint_1,
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"gameId"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_CleanerChatTypeGame_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_CleanerChatTypeGame_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 52 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_CleanerChatTypeGame_specs_1 = {
|
||||
sizeof(struct CleanerChatTypeGame),
|
||||
offsetof(struct CleanerChatTypeGame, _asn_ctx),
|
||||
asn_MAP_CleanerChatTypeGame_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_CleanerChatTypeGame = {
|
||||
"CleanerChatTypeGame",
|
||||
"CleanerChatTypeGame",
|
||||
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_CleanerChatTypeGame_tags_1,
|
||||
sizeof(asn_DEF_CleanerChatTypeGame_tags_1)
|
||||
/sizeof(asn_DEF_CleanerChatTypeGame_tags_1[0]), /* 1 */
|
||||
asn_DEF_CleanerChatTypeGame_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_CleanerChatTypeGame_tags_1)
|
||||
/sizeof(asn_DEF_CleanerChatTypeGame_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_CleanerChatTypeGame_1,
|
||||
1, /* Elements count */
|
||||
&asn_SPC_CleanerChatTypeGame_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "CHATCLEANER-PROTOCOL"
|
||||
* found in "../../../docs/chatcleaner.asn1"
|
||||
* `asn1c -fskeletons-copy`
|
||||
*/
|
||||
|
||||
#ifndef _CleanerChatTypeGame_H_
|
||||
#define _CleanerChatTypeGame_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <NativeInteger.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* CleanerChatTypeGame */
|
||||
typedef struct CleanerChatTypeGame {
|
||||
unsigned long gameId;
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} CleanerChatTypeGame_t;
|
||||
|
||||
/* Implementation */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_gameId_2; // (Use -fall-defs-global to expose) */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_CleanerChatTypeGame;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CleanerChatTypeGame_H_ */
|
||||
#include <asn_internal.h>
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "CHATCLEANER-PROTOCOL"
|
||||
* found in "../../../docs/chatcleaner.asn1"
|
||||
* `asn1c -fskeletons-copy`
|
||||
*/
|
||||
|
||||
#include "CleanerChatTypeLobby.h"
|
||||
|
||||
static ber_tlv_tag_t asn_DEF_CleanerChatTypeLobby_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_CleanerChatTypeLobby_specs_1 = {
|
||||
sizeof(struct CleanerChatTypeLobby),
|
||||
offsetof(struct CleanerChatTypeLobby, _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_CleanerChatTypeLobby = {
|
||||
"CleanerChatTypeLobby",
|
||||
"CleanerChatTypeLobby",
|
||||
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_CleanerChatTypeLobby_tags_1,
|
||||
sizeof(asn_DEF_CleanerChatTypeLobby_tags_1)
|
||||
/sizeof(asn_DEF_CleanerChatTypeLobby_tags_1[0]), /* 1 */
|
||||
asn_DEF_CleanerChatTypeLobby_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_CleanerChatTypeLobby_tags_1)
|
||||
/sizeof(asn_DEF_CleanerChatTypeLobby_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
0, 0, /* No members */
|
||||
&asn_SPC_CleanerChatTypeLobby_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
|
||||
* From ASN.1 module "CHATCLEANER-PROTOCOL"
|
||||
* found in "../../../docs/chatcleaner.asn1"
|
||||
* `asn1c -fskeletons-copy`
|
||||
*/
|
||||
|
||||
#ifndef _CleanerChatTypeLobby_H_
|
||||
#define _CleanerChatTypeLobby_H_
|
||||
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
/* Including external dependencies */
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* CleanerChatTypeLobby */
|
||||
typedef struct CleanerChatTypeLobby {
|
||||
/*
|
||||
* This type is extensible,
|
||||
* possible extensions are below.
|
||||
*/
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} CleanerChatTypeLobby_t;
|
||||
|
||||
/* Implementation */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_CleanerChatTypeLobby;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CleanerChatTypeLobby_H_ */
|
||||
#include <asn_internal.h>
|
||||
Reference in New Issue
Block a user