Renamed ASN.1 compiler to yaz-comp (used to be yc.tcl).
[yaz-moved-to-github.git] / include / yaz / z-grs.h
1 /* Generated automatically by the YAZ ASN.1 Compiler 0.3 */
2 /* Module-H RecordSyntax-generic */
3
4 #ifndef z_grs_H
5 #define z_grs_H
6
7 #include <yaz/odr.h>
8 #include <yaz/z-core.h>
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 typedef struct Z_GenericRecord Z_GenericRecord;
14 YAZ_EXPORT int z_GenericRecord (ODR o, Z_GenericRecord **p, int opt, const char *name);
15
16 typedef struct Z_TaggedElement Z_TaggedElement;
17 YAZ_EXPORT int z_TaggedElement (ODR o, Z_TaggedElement **p, int opt, const char *name);
18
19 typedef struct Z_ElementData Z_ElementData;
20 YAZ_EXPORT int z_ElementData (ODR o, Z_ElementData **p, int opt, const char *name);
21
22 typedef struct Z_ElementMetaData Z_ElementMetaData;
23 YAZ_EXPORT int z_ElementMetaData (ODR o, Z_ElementMetaData **p, int opt, const char *name);
24
25 typedef struct Z_TagPath_s Z_TagPath_s;
26 YAZ_EXPORT int z_TagPath_s (ODR o, Z_TagPath_s **p, int opt, const char *name);
27
28 typedef struct Z_TagPath Z_TagPath;
29 YAZ_EXPORT int z_TagPath (ODR o, Z_TagPath **p, int opt, const char *name);
30
31 typedef struct Z_Order Z_Order;
32 YAZ_EXPORT int z_Order (ODR o, Z_Order **p, int opt, const char *name);
33
34 typedef struct Z_Usage Z_Usage;
35 YAZ_EXPORT int z_Usage (ODR o, Z_Usage **p, int opt, const char *name);
36
37 typedef struct Z_HitVector Z_HitVector;
38 YAZ_EXPORT int z_HitVector (ODR o, Z_HitVector **p, int opt, const char *name);
39
40 typedef struct Z_Triple Z_Triple;
41 YAZ_EXPORT int z_Triple (ODR o, Z_Triple **p, int opt, const char *name);
42
43 typedef struct Z_Variant Z_Variant;
44 YAZ_EXPORT int z_Variant (ODR o, Z_Variant **p, int opt, const char *name);
45 #ifdef __cplusplus
46 }
47 #endif
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 struct Z_GenericRecord {
52         int num_elements;
53         Z_TaggedElement **elements;
54 };
55
56 struct Z_TaggedElement {
57         int *tagType; /* OPT */
58         Z_StringOrNumeric *tagValue;
59         int *tagOccurrence; /* OPT */
60         Z_ElementData *content;
61         Z_ElementMetaData *metaData; /* OPT */
62         Z_Variant *appliedVariant; /* OPT */
63 };
64
65 struct Z_ElementData {
66         int which;
67         union {
68                 Odr_oct *octets;
69                 int *numeric;
70                 char *date;
71                 Z_External *ext;
72                 Z_InternationalString *string;
73                 bool_t *trueOrFalse;
74                 Odr_oid *oid;
75                 Z_IntUnit *intUnit;
76                 Odr_null *elementNotThere;
77                 Odr_null *elementEmpty;
78                 Odr_null *noDataRequested;
79                 Z_External *diagnostic;
80                 Z_GenericRecord *subtree;
81 #define Z_ElementData_octets 1
82 #define Z_ElementData_numeric 2
83 #define Z_ElementData_date 3
84 #define Z_ElementData_ext 4
85 #define Z_ElementData_string 5
86 #define Z_ElementData_trueOrFalse 6
87 #define Z_ElementData_oid 7
88 #define Z_ElementData_intUnit 8
89 #define Z_ElementData_elementNotThere 9
90 #define Z_ElementData_elementEmpty 10
91 #define Z_ElementData_noDataRequested 11
92 #define Z_ElementData_diagnostic 12
93 #define Z_ElementData_subtree 13
94         } u;
95 };
96
97 struct Z_ElementMetaData {
98         Z_Order *seriesOrder; /* OPT */
99         Z_Usage *usageRight; /* OPT */
100         int num_hits;
101         Z_HitVector **hits; /* OPT */
102         Z_InternationalString *displayName; /* OPT */
103         int num_supportedVariants;
104         Z_Variant **supportedVariants; /* OPT */
105         Z_InternationalString *message; /* OPT */
106         Odr_oct *elementDescriptor; /* OPT */
107         Z_TagPath *surrogateFor; /* OPT */
108         Z_TagPath *surrogateElement; /* OPT */
109         Z_External *other; /* OPT */
110 };
111
112 struct Z_TagPath_s {
113         int *tagType; /* OPT */
114         Z_StringOrNumeric *tagValue;
115         int *tagOccurrence; /* OPT */
116 };
117
118 struct Z_TagPath {
119         int num;
120         Z_TagPath_s **elements;
121 };
122
123 struct Z_Order {
124         bool_t *ascending;
125         int *order;
126 };
127
128 struct Z_Usage {
129 #define Z_Usage_redistributable 1
130 #define Z_Usage_restricted 2
131 #define Z_Usage_licensePointer 3
132         int *type;
133         Z_InternationalString *restriction; /* OPT */
134 };
135
136 struct Z_HitVector {
137         Z_Term *satisfier; /* OPT */
138         Z_IntUnit *offsetIntoElement; /* OPT */
139         Z_IntUnit *length; /* OPT */
140         int *hitRank; /* OPT */
141         Odr_oct *targetToken; /* OPT */
142 };
143
144 struct Z_Triple {
145         Odr_oid *variantSetId; /* OPT */
146         int *zclass;
147         int *type;
148         int which;
149         union {
150                 int *integer;
151                 Z_InternationalString *internationalString;
152                 Odr_oct *octetString;
153                 Odr_oid *objectIdentifier;
154                 bool_t *boolean;
155                 Odr_null *null;
156                 Z_Unit *unit;
157                 Z_IntUnit *valueAndUnit;
158 #define Z_Triple_integer 1
159 #define Z_Triple_internationalString 2
160 #define Z_Triple_octetString 3
161 #define Z_Triple_objectIdentifier 4
162 #define Z_Triple_boolean 5
163 #define Z_Triple_null 6
164 #define Z_Triple_unit 7
165 #define Z_Triple_valueAndUnit 8
166         } value;
167 };
168
169 struct Z_Variant {
170         Odr_oid *globalVariantSetId; /* OPT */
171         int num_triples;
172         Z_Triple **triples;
173 };
174
175 #ifdef __cplusplus
176 }
177 #endif
178 #endif