Adding initial code jy.oak@samsung.com
[ric-app/kpimon.git] / asn1c_defs / all-defs / constr_CHOICE.h
diff --git a/asn1c_defs/all-defs/constr_CHOICE.h b/asn1c_defs/all-defs/constr_CHOICE.h
new file mode 100755 (executable)
index 0000000..8500927
--- /dev/null
@@ -0,0 +1,80 @@
+/*\r
+ * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.\r
+ * Redistribution and modifications are permitted subject to BSD license.\r
+ */\r
+#ifndef        _CONSTR_CHOICE_H_\r
+#define        _CONSTR_CHOICE_H_\r
+\r
+#include <asn_application.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+typedef struct asn_CHOICE_specifics_s {\r
+       /*\r
+        * Target structure description.\r
+        */\r
+       unsigned struct_size;       /* Size of the target structure. */\r
+       unsigned ctx_offset;        /* Offset of the asn_codec_ctx_t member */\r
+       unsigned pres_offset;       /* Identifier of the present member */\r
+       unsigned pres_size;         /* Size of the identifier (enum) */\r
+\r
+       /*\r
+        * Tags to members mapping table.\r
+        */\r
+       const asn_TYPE_tag2member_t *tag2el;\r
+       unsigned tag2el_count;\r
+\r
+       /* Canonical ordering of CHOICE elements, for PER */\r
+       const unsigned *to_canonical_order;\r
+       const unsigned *from_canonical_order;\r
+\r
+       /*\r
+        * Extensions-related stuff.\r
+        */\r
+       signed ext_start; /* First member of extensions, or -1 */\r
+} asn_CHOICE_specifics_t;\r
+\r
+/*\r
+ * A set specialized functions dealing with the CHOICE type.\r
+ */\r
+asn_struct_free_f CHOICE_free;\r
+asn_struct_print_f CHOICE_print;\r
+asn_struct_compare_f CHOICE_compare;\r
+asn_constr_check_f CHOICE_constraint;\r
+ber_type_decoder_f CHOICE_decode_ber;\r
+der_type_encoder_f CHOICE_encode_der;\r
+xer_type_decoder_f CHOICE_decode_xer;\r
+xer_type_encoder_f CHOICE_encode_xer;\r
+oer_type_decoder_f CHOICE_decode_oer;\r
+oer_type_encoder_f CHOICE_encode_oer;\r
+per_type_decoder_f CHOICE_decode_uper;\r
+per_type_encoder_f CHOICE_encode_uper;\r
+per_type_decoder_f CHOICE_decode_aper;\r
+per_type_encoder_f CHOICE_encode_aper;\r
+asn_outmost_tag_f CHOICE_outmost_tag;\r
+asn_random_fill_f CHOICE_random_fill;\r
+extern asn_TYPE_operation_t asn_OP_CHOICE;\r
+\r
+/*\r
+ * Return the 1-based choice variant presence index.\r
+ * Returns 0 in case of error.\r
+ */\r
+unsigned CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td,\r
+                                     const void *structure_ptr);\r
+\r
+/*\r
+ * Sets or resets the 1-based choice variant presence index.\r
+ * In case a previous index is not zero, the currently selected structure\r
+ * member is freed and zeroed-out first.\r
+ * Returns 0 on success and -1 on error.\r
+ */\r
+int CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td,\r
+                                void *structure_ptr, unsigned present);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* _CONSTR_CHOICE_H_ */\r