X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fprt-grs.h;h=808ceaef6729541da0d4a4cbd29332be4e560d1c;hp=c97c7dfe20e69f0d802673cd99129851870b2af9;hb=a807bde38544a7aa45dd2988e504a1acb3fd30c0;hpb=63cafe41a93427118959a74201b3e331169a71d9 diff --git a/include/prt-grs.h b/include/prt-grs.h index c97c7df..808ceae 100644 --- a/include/prt-grs.h +++ b/include/prt-grs.h @@ -30,27 +30,29 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct Z_GenericRecord; typedef struct Z_GenericRecord Z_GenericRecord; typedef struct Z_ElementData { - enum - { - Z_ElementData_octets, - Z_ElementData_numeric, - Z_ElementData_date, - Z_ElementData_ext, - Z_ElementData_string, - Z_ElementData_trueOrFalse, - Z_ElementData_oid, - Z_ElementData_intUnit, - Z_ElementData_elementNotThere, - Z_ElementData_elementEmpty, - Z_ElementData_noDataRequested, - Z_ElementData_diagnostic, - Z_ElementData_subtree - } which; + int which; +#define Z_ElementData_octets 0 +#define Z_ElementData_numeric 1 +#define Z_ElementData_date 2 +#define Z_ElementData_ext 3 +#define Z_ElementData_string 4 +#define Z_ElementData_trueOrFalse 5 +#define Z_ElementData_oid 6 +#define Z_ElementData_intUnit 7 +#define Z_ElementData_elementNotThere 8 +#define Z_ElementData_elementEmpty 9 +#define Z_ElementData_noDataRequested 10 +#define Z_ElementData_diagnostic 11 +#define Z_ElementData_subtree 12 union { Odr_oct *octets; @@ -96,19 +98,17 @@ typedef struct Z_HitVector typedef struct Z_Triple { Odr_oid *variantSetId; /* OPTIONAL */ - int *class; + int *zclass; int *type; - enum - { - Z_Triple_integer, - Z_Triple_internationalString, - Z_Triple_octetString, - Z_Triple_oid, - Z_Triple_boolean, - Z_Triple_null, - Z_Triple_unit, - Z_Triple_valueAndUnit - } which; + int which; +#define Z_Triple_integer 0 +#define Z_Triple_internationalString 1 +#define Z_Triple_octetString 2 +#define Z_Triple_oid 3 +#define Z_Triple_boolean 4 +#define Z_Triple_null 5 +#define Z_Triple_unit 6 +#define Z_Triple_valueAndUnit 7 union { int *integer; @@ -174,6 +174,11 @@ struct Z_GenericRecord Z_TaggedElement **elements; }; -int z_GenericRecord(ODR o, Z_GenericRecord **p, int opt); +YAZ_EXPORT int z_GenericRecord(ODR o, Z_GenericRecord **p, int opt); +YAZ_EXPORT int z_Variant(ODR o, Z_Variant **p, int opt); + +#ifdef __cplusplus +} +#endif #endif