*** empty log message ***
[yaz-moved-to-github.git] / include / prt-grs.h
index c97c7df..97a2b03 100644 (file)
@@ -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,
 
 #include <yconfig.h>
 
+#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,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;
@@ -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