00001
00007 #ifndef z_espec1_H
00008 #define z_espec1_H
00009
00010 #include <yaz/odr.h>
00011 #include <yaz/z-grs.h>
00012 #include <yaz/z-core.h>
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016
00017 typedef struct Z_Espec1 Z_Espec1;
00018 YAZ_EXPORT int z_Espec1 (ODR o, Z_Espec1 **p, int opt, const char *name);
00019
00020 typedef struct Z_ElementRequestCompositeElementPrimitives Z_ElementRequestCompositeElementPrimitives;
00021 YAZ_EXPORT int z_ElementRequestCompositeElementPrimitives (ODR o, Z_ElementRequestCompositeElementPrimitives **p, int opt, const char *name);
00022
00023 typedef struct Z_ElementRequestCompositeElementSpecs Z_ElementRequestCompositeElementSpecs;
00024 YAZ_EXPORT int z_ElementRequestCompositeElementSpecs (ODR o, Z_ElementRequestCompositeElementSpecs **p, int opt, const char *name);
00025
00026 typedef struct Z_ElementRequestCompositeElement Z_ElementRequestCompositeElement;
00027 YAZ_EXPORT int z_ElementRequestCompositeElement (ODR o, Z_ElementRequestCompositeElement **p, int opt, const char *name);
00028
00029 typedef struct Z_ElementRequest Z_ElementRequest;
00030 YAZ_EXPORT int z_ElementRequest (ODR o, Z_ElementRequest **p, int opt, const char *name);
00031
00032 typedef struct Z_SimpleElement Z_SimpleElement;
00033 YAZ_EXPORT int z_SimpleElement (ODR o, Z_SimpleElement **p, int opt, const char *name);
00034
00035 typedef struct Z_SpecificTag Z_SpecificTag;
00036 YAZ_EXPORT int z_SpecificTag (ODR o, Z_SpecificTag **p, int opt, const char *name);
00037
00038 typedef struct Z_ETagUnit Z_ETagUnit;
00039 YAZ_EXPORT int z_ETagUnit (ODR o, Z_ETagUnit **p, int opt, const char *name);
00040
00041 typedef struct Z_ETagPath Z_ETagPath;
00042 YAZ_EXPORT int z_ETagPath (ODR o, Z_ETagPath **p, int opt, const char *name);
00043
00044 typedef struct Z_OccurValues Z_OccurValues;
00045 YAZ_EXPORT int z_OccurValues (ODR o, Z_OccurValues **p, int opt, const char *name);
00046
00047 typedef struct Z_Occurrences Z_Occurrences;
00048 YAZ_EXPORT int z_Occurrences (ODR o, Z_Occurrences **p, int opt, const char *name);
00049 #ifdef __cplusplus
00050 }
00051 #endif
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055 struct Z_Espec1 {
00056 int num_elementSetNames;
00057 Z_InternationalString **elementSetNames;
00058 Odr_oid *defaultVariantSetId;
00059 Z_Variant *defaultVariantRequest;
00060 int *defaultTagType;
00061 int num_elements;
00062 Z_ElementRequest **elements;
00063 };
00064
00065 struct Z_ElementRequestCompositeElementPrimitives {
00066 int num;
00067 Z_InternationalString **elements;
00068 };
00069
00070 struct Z_ElementRequestCompositeElementSpecs {
00071 int num;
00072 Z_SimpleElement **elements;
00073 };
00074
00075 struct Z_ElementRequestCompositeElement {
00076 int which;
00077 union {
00078 Z_ElementRequestCompositeElementPrimitives *primitives;
00079 Z_ElementRequestCompositeElementSpecs *specs;
00080 #define Z_ElementRequestCompositeElement_primitives 1
00081 #define Z_ElementRequestCompositeElement_specs 2
00082 } u;
00083 Z_ETagPath *deliveryTag;
00084 Z_Variant *variantRequest;
00085 };
00086
00087 struct Z_ElementRequest {
00088 int which;
00089 union {
00090 Z_SimpleElement *simpleElement;
00091 Z_ElementRequestCompositeElement *compositeElement;
00092 #define Z_ERequest_simpleElement 1
00093 #define Z_ERequest_compositeElement 2
00094 } u;
00095 };
00096
00097 struct Z_SimpleElement {
00098 Z_ETagPath *path;
00099 Z_Variant *variantRequest;
00100 };
00101
00102 struct Z_SpecificTag {
00103 int *tagType;
00104 Z_StringOrNumeric *tagValue;
00105 Z_Occurrences *occurrences;
00106 };
00107
00108 struct Z_ETagUnit {
00109 int which;
00110 union {
00111 Z_SpecificTag *specificTag;
00112 Z_Occurrences *wildThing;
00113 Odr_null *wildPath;
00114 #define Z_ETagUnit_specificTag 1
00115 #define Z_ETagUnit_wildThing 2
00116 #define Z_ETagUnit_wildPath 3
00117 } u;
00118 };
00119
00120 struct Z_ETagPath {
00121 int num_tags;
00122 Z_ETagUnit **tags;
00123 };
00124
00125 struct Z_OccurValues {
00126 int *start;
00127 int *howMany;
00128 };
00129
00130 struct Z_Occurrences {
00131 int which;
00132 union {
00133 Odr_null *all;
00134 Odr_null *last;
00135 Z_OccurValues *values;
00136 #define Z_Occurrences_all 1
00137 #define Z_Occurrences_last 2
00138 #define Z_Occurrences_values 3
00139 } u;
00140 };
00141
00142 #ifdef __cplusplus
00143 }
00144 #endif
00145 #endif