X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fprt-esp.h;h=5608213446203e741538b23531ba56c487337c02;hb=0d9eca26da6a9369bb00efd75a9472380526f547;hp=26e947bf9d8e9be30e077765a3d04b23f8eb248c;hpb=a3fb25600e5a7366e761b46c419462080fc13f73;p=yaz-moved-to-github.git diff --git a/include/prt-esp.h b/include/prt-esp.h index 26e947b..5608213 100644 --- a/include/prt-esp.h +++ b/include/prt-esp.h @@ -30,6 +30,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct Z_OccurValues { int *start; @@ -38,12 +42,10 @@ typedef struct Z_OccurValues typedef struct Z_Occurrences { - enum - { - Z_Occurrences_all, - Z_Occurrences_last, - Z_Occurrences_values - } which; + int which; +#define Z_Occurrences_all 0 +#define Z_Occurrences_last 1 +#define Z_Occurrences_values 2 union { Odr_null *all; @@ -54,6 +56,7 @@ typedef struct Z_Occurrences typedef struct Z_SpecificTag { + Odr_oid *schemaId; /* OPTIONAL */ int *tagType; /* OPTIONAL */ Z_StringOrNumeric *tagValue; Z_Occurrences *occurrences; /* OPTIONAL */ @@ -61,12 +64,10 @@ typedef struct Z_SpecificTag typedef struct Z_ETagUnit { - enum - { - Z_ETagUnit_specificTag, - Z_ETagUnit_wildThing, - Z_ETagUnit_wildPath - } which; + int which; +#define Z_ETagUnit_specificTag 0 +#define Z_ETagUnit_wildThing 1 +#define Z_ETagUnit_wildPath 2 union { Z_SpecificTag *specificTag; @@ -101,11 +102,9 @@ typedef struct Z_CompoSpecs typedef struct Z_CompositeElement { - enum - { - Z_CompoElement_primitives, - Z_CompoElement_specs - } which; + int which; +#define Z_CompoElement_primitives 0 +#define Z_CompoElement_specs 1 union { Z_CompoPrimitives *primitives; @@ -117,11 +116,9 @@ typedef struct Z_CompositeElement typedef struct Z_ElementRequest { - enum - { - Z_ERequest_simpleElement, - Z_ERequest_compositeElement - } which; + int which; +#define Z_ERequest_simpleElement 0 +#define Z_ERequest_compositeElement 1 union { Z_SimpleElement *simpleElement; @@ -140,6 +137,10 @@ typedef struct Z_Espec1 Z_ElementRequest **elements; /* OPTIONAL */ } Z_Espec1; -int z_Espec1(ODR o, Z_Espec1 **p, int opt); +YAZ_EXPORT int z_Espec1(ODR o, Z_Espec1 **p, int opt); + +#ifdef __cplusplus +} +#endif #endif