| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef ASN_CODECS_PRIM_H |
| 6 |
#define ASN_CODECS_PRIM_H |
| 7 |
|
| 8 |
#include <asn_application.h> |
| 9 |
|
| 10 |
#ifdef __cplusplus |
| 11 |
extern "C" { |
| 12 |
#endif |
| 13 |
|
| 14 |
typedef struct ASN__PRIMITIVE_TYPE_s { |
| 15 |
uint8_t *buf; |
| 16 |
int size; |
| 17 |
} ASN__PRIMITIVE_TYPE_t; |
| 18 |
|
| 19 |
asn_struct_free_f ASN__PRIMITIVE_TYPE_free; |
| 20 |
ber_type_decoder_f ber_decode_primitive; |
| 21 |
der_type_encoder_f der_encode_primitive; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
enum xer_pbd_rval { |
| 27 |
XPBD_SYSTEM_FAILURE, |
| 28 |
XPBD_DECODER_LIMIT, |
| 29 |
XPBD_BROKEN_ENCODING, |
| 30 |
XPBD_NOT_BODY_IGNORE, |
| 31 |
XPBD_BODY_CONSUMED |
| 32 |
}; |
| 33 |
typedef enum xer_pbd_rval (xer_primitive_body_decoder_f) |
| 34 |
(asn_TYPE_descriptor_t *td, void *struct_ptr, |
| 35 |
const void *chunk_buf, size_t chunk_size); |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx, |
| 42 |
asn_TYPE_descriptor_t *type_descriptor, |
| 43 |
void **struct_ptr, size_t struct_size, |
| 44 |
const char *opt_mname, |
| 45 |
const void *buf_ptr, size_t size, |
| 46 |
xer_primitive_body_decoder_f *prim_body_decoder |
| 47 |
); |
| 48 |
|
| 49 |
#ifdef __cplusplus |
| 50 |
} |
| 51 |
#endif |
| 52 |
|
| 53 |
#endif |