X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fprt-grs.h;h=97a2b030e1625755382c72a4b462233c48c690f6;hb=23cfa431fda52535722e4efdc3f462995937e863;hp=d80ad09d073a866ffc480dd2cd7c8bcc6ba0e17e;hpb=1c2df7a209b83db0b04700abff3512c0abf5d967;p=yaz-moved-to-github.git diff --git a/include/prt-grs.h b/include/prt-grs.h index d80ad09..97a2b03 100644 --- a/include/prt-grs.h +++ b/include/prt-grs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, Index Data. + * Copyright (c) 1995-1998, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -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,26 +98,24 @@ 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; char *internationalString; Odr_oct *octetString; Odr_oid *oid; - bool_t *boolean; + bool_t *zboolean; Odr_null *null; Z_Unit *unit; Z_IntUnit *valueAndUnit; @@ -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