aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/asn_codecs_prim.h
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2005-03-09 22:19:25 +0000
committerLev Walkin <vlm@lionet.info>2005-03-09 22:19:25 +0000
commit0fab1a6fedfed87f5ebf182c771a4ce7269f4e9c (patch)
tree2a397ddc9a85ec53409b25bca0bb689bb6072128 /skeletons/asn_codecs_prim.h
parent9a0f8fad2f4d5ffb02d3fef8f6d3428755ee01a3 (diff)
relaxed XER processing rules for whitespace
Diffstat (limited to 'skeletons/asn_codecs_prim.h')
-rw-r--r--skeletons/asn_codecs_prim.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/skeletons/asn_codecs_prim.h b/skeletons/asn_codecs_prim.h
index 7a6723d3..ceadf511 100644
--- a/skeletons/asn_codecs_prim.h
+++ b/skeletons/asn_codecs_prim.h
@@ -17,6 +17,20 @@ ber_type_decoder_f ber_decode_primitive;
der_type_encoder_f der_encode_primitive;
/*
+ * A callback specification for the xer_decode_primitive() function below.
+ */
+enum xer_pbd_rval {
+ XPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */
+ XPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */
+ XPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */
+ XPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */
+ XPBD_BODY_CONSUMED, /* Body is recognized and consumed */
+};
+typedef enum xer_pbd_rval (xer_primitive_body_decoder_f)
+ (asn_TYPE_descriptor_t *td, void *struct_ptr,
+ const void *chunk_buf, size_t chunk_size);
+
+/*
* Specific function to decode simple primitive types.
* Also see xer_decode_general() in xer_decoder.h
*/
@@ -25,8 +39,7 @@ asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx,
void **struct_ptr, size_t struct_size,
const char *opt_mname,
void *buf_ptr, size_t size,
- ssize_t (*prim_body_decode)(asn_TYPE_descriptor_t *td,
- void *struct_ptr, void *chunk_buf, size_t chunk_size)
- );
+ xer_primitive_body_decoder_f *prim_body_decoder
+);
#endif /* ASN_CODECS_PRIM_H */