Fixed CLOSE
[yaz-moved-to-github.git] / include / proto.h
index 23e06d6..48f63f9 100644 (file)
  * OF THIS SOFTWARE.
  *
  * $Log: proto.h,v $
- * Revision 1.10  1995-05-29 08:11:34  quinn
+ * Revision 1.14  1995-06-07 14:42:34  quinn
+ * Fixed CLOSE
+ *
+ * Revision 1.13  1995/06/07  14:36:47  quinn
+ * Added CLOSE
+ *
+ * Revision 1.12  1995/06/05  10:53:13  quinn
+ * Smallish.
+ *
+ * Revision 1.11  1995/06/02  09:49:47  quinn
+ * Add access control
+ *
+ * Revision 1.10  1995/05/29  08:11:34  quinn
  * Moved oid from odr/asn to util.
  *
  * Revision 1.9  1995/05/22  11:31:25  quinn
@@ -124,7 +136,7 @@ typedef struct Z_OtherInformationUnit
        Odr_oct *binaryInfo;
        Odr_external *externallyDefinedInfo;
        Odr_oid *oid;
-    } u;
+    } information;
 } Z_OtherInformationUnit;
 
 typedef struct Z_OtherInformation
@@ -133,6 +145,34 @@ typedef struct Z_OtherInformation
     Z_OtherInformationUnit **list;
 } Z_OtherInformation;
 
+typedef struct Z_StringOrNumeric
+{
+    enum
+    {
+       Z_StringOrNumeric_string,
+       Z_StringOrNumeric_numeric
+    } which;
+    union
+    {
+       char *string;
+       int *numeric;
+    } u;
+} Z_StringOrNumeric;
+
+typedef struct Z_Unit
+{
+    char *unitSystem;               /* OPTIONAL */
+    Z_StringOrNumeric *unitType;    /* OPTIONAL */
+    Z_StringOrNumeric *unit;        /* OPTIONAL */
+    int *scaleFactor;               /* OPTIONAL */
+} Z_Unit;
+
+typedef struct Z_IntUnit
+{
+    int *value;
+    Z_Unit *unitUsed;
+} Z_IntUnit;
+
 /* ----------------- INIT SERVICE  ----------------*/
 
 typedef struct
@@ -616,7 +656,6 @@ typedef struct Z_ScanRequest
     int num_databaseNames;
     char **databaseNames;
     Odr_oid *attributeSet;          /* OPTIONAL */
-    Odr_any *eatme1;
     Z_AttributesPlusTerm *termListAndStartPoint;
     int *stepSize;                    /* OPTIONAL */
     int *numberOfTermsRequested;
@@ -733,6 +772,30 @@ typedef struct Z_DeleteResultSetResponse
 #endif
 } Z_DeleteResultSetResponse;
 
+/* ------------------------ CLOSE SERVICE ------------------- */
+
+typedef struct Z_Close
+{
+    Z_ReferenceId *referenceId;         /* OPTIONAL */
+    int *closeReason;
+#define Z_Close_finished           0
+#define Z_Close_shutdown           1
+#define Z_Close_systemProblem      2
+#define Z_Close_costLimit          3
+#define Z_Close_resources          4
+#define Z_Close_securityViolation  5
+#define Z_Close_protocolError      6
+#define Z_Close_lackOfActivity     7
+#define Z_Close_peerAbort          8
+#define Z_Close_unspecified        9
+    char *diagnosticInformation;          /* OPTIONAL */
+    Odr_oid *resourceReportFormat;        /* OPTIONAL */
+    Odr_external *resourceReport;         /* OPTIONAL */
+#ifdef Z_OTHERINFO
+    Z_OtherInformation *otherInfo;        /* OPTIONAL */
+#endif
+} Z_Close;
+
 /* ------------------------ APDU ---------------------------- */
 
 typedef struct Z_APDU
@@ -751,7 +814,8 @@ typedef struct Z_APDU
        Z_APDU_resourceControlResponse,
        Z_APDU_triggerResourceControlRequest,
        Z_APDU_scanRequest,
-       Z_APDU_scanResponse
+       Z_APDU_scanResponse,
+       Z_APDU_close
     } which;
     union
     {
@@ -768,6 +832,7 @@ typedef struct Z_APDU
        Z_TriggerResourceControlRequest *triggerResourceControlRequest;
        Z_ScanRequest *scanRequest;
        Z_ScanResponse *scanResponse;
+       Z_Close *close;
     } u;
 } Z_APDU;
 
@@ -786,6 +851,10 @@ Z_ScanResponse *zget_ScanResponse(ODR o);
 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
+Z_Close *zget_Close(ODR o);
 Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which);
 
+#include <prt-rsc.h>
+#include <prt-acc.h>
+
 #endif