Added prettier client.
[yaz-moved-to-github.git] / include / proto.h
index 1f659cd..549d524 100644 (file)
@@ -1,10 +1,43 @@
 /*
- * Copyright (C) 1994, Index Data I/S 
- * All rights reserved.
- * Sebastian Hammer, Adam Dickmeiss
+ * Copyright (c) 1995, 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,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
  *
  * $Log: proto.h,v $
- * Revision 1.4  1995-04-10 10:22:47  quinn
+ * Revision 1.8  1995-05-17 08:41:35  quinn
+ * Added delete to proto & other little things.
+ * Relaying auth info to backend.
+ *
+ * Revision 1.7  1995/05/16  08:50:37  quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.6  1995/05/15  11:55:55  quinn
+ * Work on asynchronous activity.
+ *
+ * Revision 1.5  1995/04/17  11:28:18  quinn
+ * Smallish
+ *
+ * Revision 1.4  1995/04/10  10:22:47  quinn
  * Added SCAN
  *
  * Revision 1.3  1995/03/30  12:18:09  quinn
@@ -62,6 +95,37 @@ typedef char Z_ResultSetId;
 typedef Odr_oct Z_ResultsetId;
 typedef Odr_external Z_UserInformationField;
 
+typedef struct Z_InfoCategory
+{
+    Odr_oid *categoryTypeId;         /* OPTIONAL */
+    int *categoryValue;
+} Z_InfoCategory;
+
+typedef struct Z_OtherInformationUnit
+{
+    Z_InfoCategory *category;        /* OPTIONAL */
+    enum
+    {
+       Z_OtherInfo_characterInfo,
+       Z_OtherInfo_binaryInfo,
+       Z_OtherInfo_externallyDefinedInfo,
+       Z_OtherInfo_oid
+    } which;
+    union
+    {
+       char *characterInfo; 
+       Odr_oct *binaryInfo;
+       Odr_external *externallyDefinedInfo;
+       Odr_oid *oid;
+    } u;
+} Z_OtherInformationUnit;
+
+typedef struct Z_OtherInformation
+{
+    int num_elements;
+    Z_OtherInformationUnit **list;
+} Z_OtherInformation;
+
 /* ----------------- INIT SERVICE  ----------------*/
 
 typedef struct
@@ -562,6 +626,54 @@ typedef struct Z_PresentResponse
     Z_Records *records;
 } Z_PresentResponse;
 
+/* ------------------------ DELETE -------------------------- */
+
+#define Z_DeleteStatus_success                          0
+#define Z_DeleteStatus_resultSetDidNotExist             1
+#define Z_DeleteStatus_previouslyDeletedByTarget        2
+#define Z_DeleteStatus_systemProblemAtTarget            3
+#define Z_DeleteStatus_accessNotAllowed                 4
+#define Z_DeleteStatus_resourceControlAtOrigin          5
+#define Z_DeleteStatus_resourceControlAtTarget          6
+#define Z_DeleteStatus_bulkDeleteNotSupported           7
+#define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte  8
+#define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
+#define Z_DeleteStatus_resultSetInUse                  10
+
+typedef struct Z_ListStatus
+{
+    Z_ResultSetId *id;
+    int *status;
+} Z_ListStatus;
+
+typedef struct Z_DeleteResultSetRequest
+{
+    Z_ReferenceId *referenceId;        /* OPTIONAL */
+    int *deleteFunction;
+#define Z_DeleteRequest_list    0
+#define Z_DeleteRequest_all     1
+    int num_ids;
+    Z_ResultSetId **resultSetList;      /* OPTIONAL */
+#ifdef Z_OTHERINFO
+    Z_OtherInformation *otherInfo;
+#endif
+} Z_DeleteResultSetRequest;
+
+typedef struct Z_DeleteResultSetResponse
+{
+    Z_ReferenceId *referenceId;        /* OPTIONAL */
+    int *deleteOperationStatus;
+    int num_statuses;
+    Z_ListStatus *deleteListStatuses;  /* OPTIONAL */
+    int *numberNotDeleted;             /* OPTIONAL */
+    int num_bulkStatuses;
+    Z_ListStatus *bulkStatuses;        /* OPTIONAL */
+    char *deleteMessage;               /* OPTIONAL */
+#ifdef Z_OTHERINFO
+    Z_OtherInformation *otherInfo;
+#endif
+} Z_DeleteResultSetResponse;
+
 /* ------------------------ APDU ---------------------------- */
 
 typedef struct Z_APDU
@@ -574,6 +686,11 @@ typedef struct Z_APDU
        Z_APDU_searchResponse,
        Z_APDU_presentRequest,
        Z_APDU_presentResponse,
+       Z_APDU_deleteResultSetRequest,
+       Z_APDU_deleteResultSetResponse,
+       Z_APDU_resourceControlRequest,
+       Z_APDU_resourceControlResponse,
+       Z_APDU_triggerResourceControlRequest,
        Z_APDU_scanRequest,
        Z_APDU_scanResponse
     } which;
@@ -585,6 +702,11 @@ typedef struct Z_APDU
        Z_SearchResponse *searchResponse;
        Z_PresentRequest *presentRequest;
        Z_PresentResponse *presentResponse;
+       Z_DeleteResultSetRequest *deleteResultSetRequest;
+       Z_DeleteResultSetResponse *deleteResultSetResponse;
+       Z_ResourceControlRequest *resourceControlRequest;
+       Z_ResourceControlResponse *resourceControlResponse;
+       Z_TriggerResourceControlRequest *triggerResourceControlRequest;
        Z_ScanRequest *scanRequest;
        Z_ScanResponse *scanResponse;
     } u;