X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fprt-grs.h;h=808ceaef6729541da0d4a4cbd29332be4e560d1c;hp=d80ad09d073a866ffc480dd2cd7c8bcc6ba0e17e;hb=a807bde38544a7aa45dd2988e504a1acb3fd30c0;hpb=1c2df7a209b83db0b04700abff3512c0abf5d967 diff --git a/include/prt-grs.h b/include/prt-grs.h index d80ad09..808ceae 100644 --- a/include/prt-grs.h +++ b/include/prt-grs.h @@ -25,27 +25,34 @@ * */ +#ifndef PRT_GRS_H +#define PRT_GRS_H + +#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; @@ -91,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; @@ -169,4 +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