Include RPM spec file in dist package.
[mod_auth_gssapi.git] / src / asn1c / Uint32.c
1 /*
2  * Generated by asn1c-0.9.27 (http://lionet.info/asn1c)
3  * From ASN.1 module "GssapiSessionModule"
4  *      found in "session.asn1"
5  *      `asn1c -fskeletons-copy`
6  */
7
8 #include "Uint32.h"
9
10 int
11 Uint32_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         
14         if(!sptr) {
15                 _ASN_CTFAIL(app_key, td, sptr,
16                         "%s: value not given (%s:%d)",
17                         td->name, __FILE__, __LINE__);
18                 return -1;
19         }
20         
21         
22         /* Constraint check succeeded */
23         return 0;
24 }
25
26 /*
27  * This type is implemented using NativeInteger,
28  * so here we adjust the DEF accordingly.
29  */
30 static void
31 Uint32_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
32         td->free_struct    = asn_DEF_NativeInteger.free_struct;
33         td->print_struct   = asn_DEF_NativeInteger.print_struct;
34         td->check_constraints = asn_DEF_NativeInteger.check_constraints;
35         td->ber_decoder    = asn_DEF_NativeInteger.ber_decoder;
36         td->der_encoder    = asn_DEF_NativeInteger.der_encoder;
37         td->xer_decoder    = asn_DEF_NativeInteger.xer_decoder;
38         td->xer_encoder    = asn_DEF_NativeInteger.xer_encoder;
39         td->uper_decoder   = asn_DEF_NativeInteger.uper_decoder;
40         td->uper_encoder   = asn_DEF_NativeInteger.uper_encoder;
41         if(!td->per_constraints)
42                 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
43         td->elements       = asn_DEF_NativeInteger.elements;
44         td->elements_count = asn_DEF_NativeInteger.elements_count;
45      /* td->specifics      = asn_DEF_NativeInteger.specifics;   // Defined explicitly */
46 }
47
48 void
49 Uint32_free(asn_TYPE_descriptor_t *td,
50                 void *struct_ptr, int contents_only) {
51         Uint32_1_inherit_TYPE_descriptor(td);
52         td->free_struct(td, struct_ptr, contents_only);
53 }
54
55 int
56 Uint32_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
57                 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
58         Uint32_1_inherit_TYPE_descriptor(td);
59         return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
60 }
61
62 asn_dec_rval_t
63 Uint32_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
64                 void **structure, const void *bufptr, size_t size, int tag_mode) {
65         Uint32_1_inherit_TYPE_descriptor(td);
66         return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
67 }
68
69 asn_enc_rval_t
70 Uint32_encode_der(asn_TYPE_descriptor_t *td,
71                 void *structure, int tag_mode, ber_tlv_tag_t tag,
72                 asn_app_consume_bytes_f *cb, void *app_key) {
73         Uint32_1_inherit_TYPE_descriptor(td);
74         return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
75 }
76
77 asn_dec_rval_t
78 Uint32_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
79                 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
80         Uint32_1_inherit_TYPE_descriptor(td);
81         return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
82 }
83
84 asn_enc_rval_t
85 Uint32_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
86                 int ilevel, enum xer_encoder_flags_e flags,
87                 asn_app_consume_bytes_f *cb, void *app_key) {
88         Uint32_1_inherit_TYPE_descriptor(td);
89         return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
90 }
91
92 static asn_INTEGER_specifics_t asn_SPC_Uint32_specs_1 = {
93         0,      0,      0,      0,      0,
94         0,      /* Native long size */
95         1       /* Unsigned representation */
96 };
97 static ber_tlv_tag_t asn_DEF_Uint32_tags_1[] = {
98         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
99 };
100 asn_TYPE_descriptor_t asn_DEF_Uint32 = {
101         "Uint32",
102         "Uint32",
103         Uint32_free,
104         Uint32_print,
105         Uint32_constraint,
106         Uint32_decode_ber,
107         Uint32_encode_der,
108         Uint32_decode_xer,
109         Uint32_encode_xer,
110         0, 0,   /* No PER support, use "-gen-PER" to enable */
111         0,      /* Use generic outmost tag fetcher */
112         asn_DEF_Uint32_tags_1,
113         sizeof(asn_DEF_Uint32_tags_1)
114                 /sizeof(asn_DEF_Uint32_tags_1[0]), /* 1 */
115         asn_DEF_Uint32_tags_1,  /* Same as above */
116         sizeof(asn_DEF_Uint32_tags_1)
117                 /sizeof(asn_DEF_Uint32_tags_1[0]), /* 1 */
118         0,      /* No PER visible constraints */
119         0, 0,   /* No members */
120         &asn_SPC_Uint32_specs_1 /* Additional specs */
121 };
122