Adding initial code jy.oak@samsung.com
[ric-app/kpimon.git] / asn1c_defs / all-defs / per_decoder.h
diff --git a/asn1c_defs/all-defs/per_decoder.h b/asn1c_defs/all-defs/per_decoder.h
new file mode 100755 (executable)
index 0000000..bbf589e
--- /dev/null
@@ -0,0 +1,82 @@
+/*-\r
+ * Copyright (c) 2005-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.\r
+ * Redistribution and modifications are permitted subject to BSD license.\r
+ */\r
+#ifndef        _PER_DECODER_H_\r
+#define        _PER_DECODER_H_\r
+\r
+#include <asn_application.h>\r
+#include <per_support.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+struct asn_TYPE_descriptor_s;  /* Forward declaration */\r
+\r
+/*\r
+ * Unaligned PER decoder of a "complete encoding" as per X.691 (08/2015) #11.1.\r
+ * On success, this call always returns (.consumed >= 1), as per #11.1.3.\r
+ */\r
+asn_dec_rval_t uper_decode_complete(\r
+    const struct asn_codec_ctx_s *opt_codec_ctx,\r
+    const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */\r
+    void **struct_ptr,  /* Pointer to a target structure's pointer */\r
+    const void *buffer, /* Data to be decoded */\r
+    size_t size         /* Size of data buffer */\r
+);\r
+\r
+/*\r
+ * Unaligned PER decoder of any ASN.1 type. May be invoked by the application.\r
+ * WARNING: This call returns the number of BITS read from the stream. Beware.\r
+ */\r
+asn_dec_rval_t uper_decode(\r
+    const struct asn_codec_ctx_s *opt_codec_ctx,\r
+    const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */\r
+    void **struct_ptr,  /* Pointer to a target structure's pointer */\r
+    const void *buffer, /* Data to be decoded */\r
+    size_t size,        /* Size of the input data buffer, in bytes */\r
+    int skip_bits,      /* Number of unused leading bits, 0..7 */\r
+    int unused_bits     /* Number of unused tailing bits, 0..7 */\r
+);\r
+\r
+/*\r
+ * Aligned PER decoder of a "complete encoding" as per X.691#10.1.\r
+ * On success, this call always returns (.consumed >= 1), in BITS, as per X.691#10.1.3.\r
+ */\r
+asn_dec_rval_t aper_decode_complete(\r
+       const struct asn_codec_ctx_s *opt_codec_ctx,\r
+       const struct asn_TYPE_descriptor_s *type_descriptor,    /* Type to decode */\r
+       void **struct_ptr,      /* Pointer to a target structure's pointer */\r
+       const void *buffer,     /* Data to be decoded */\r
+       size_t size             /* Size of data buffer */\r
+                                                                       );\r
+\r
+/*\r
+ * Aligned PER decoder of any ASN.1 type. May be invoked by the application.\r
+ * WARNING: This call returns the number of BITS read from the stream. Beware.\r
+ */\r
+asn_dec_rval_t aper_decode(\r
+      const struct asn_codec_ctx_s *opt_codec_ctx,\r
+      const struct asn_TYPE_descriptor_s *type_descriptor,     /* Type to decode */\r
+      void **struct_ptr,       /* Pointer to a target structure's pointer */\r
+      const void *buffer,      /* Data to be decoded */\r
+      size_t size,             /* Size of data buffer */\r
+      int skip_bits,           /* Number of unused leading bits, 0..7 */\r
+      int unused_bits          /* Number of unused tailing bits, 0..7 */\r
+      );\r
+\r
+/*\r
+ * Type of the type-specific PER decoder function.\r
+ */\r
+typedef asn_dec_rval_t(per_type_decoder_f)(\r
+    const asn_codec_ctx_t *opt_codec_ctx,\r
+    const struct asn_TYPE_descriptor_s *type_descriptor,\r
+    const asn_per_constraints_t *constraints, void **struct_ptr,\r
+    asn_per_data_t *per_data);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* _PER_DECODER_H_ */\r