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