Smallish
authorSebastian Hammer <quinn@indexdata.com>
Mon, 17 Apr 1995 11:28:17 +0000 (11:28 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Mon, 17 Apr 1995 11:28:17 +0000 (11:28 +0000)
include/comstack.h
include/proto.h
server/seshigh.c

index c7c12f1..9d13f2b 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: comstack.h,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: comstack.h,v $
- * Revision 1.1  1995-03-30 09:39:40  quinn
+ * Revision 1.2  1995-04-17 11:28:17  quinn
+ * Smallish
+ *
+ * Revision 1.1  1995/03/30  09:39:40  quinn
  * Moved .h files to include directory
  *
  * Revision 1.11  1995/03/27  08:36:05  quinn
  * Moved .h files to include directory
  *
  * Revision 1.11  1995/03/27  08:36:05  quinn
@@ -96,7 +99,6 @@ struct comstack
     int (*f_listen)(COMSTACK handle, char *addrp, int *addrlen);
     COMSTACK (*f_accept)(COMSTACK handle);
     int (*f_close)(COMSTACK handle);
     int (*f_listen)(COMSTACK handle, char *addrp, int *addrlen);
     COMSTACK (*f_accept)(COMSTACK handle);
     int (*f_close)(COMSTACK handle);
-    /* to add: commands for the server side (bind, listen, accept) */
 };
 
 #define cs_put(handle, buf, size) ((*(handle)->f_put)(handle, buf, size))
 };
 
 #define cs_put(handle, buf, size) ((*(handle)->f_put)(handle, buf, size))
index 1f659cd..c6757ed 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: proto.h,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: proto.h,v $
- * Revision 1.4  1995-04-10 10:22:47  quinn
+ * 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
  * Added SCAN
  *
  * Revision 1.3  1995/03/30  12:18:09  quinn
@@ -562,6 +565,51 @@ typedef struct Z_PresentResponse
     Z_Records *records;
 } Z_PresentResponse;
 
     Z_Records *records;
 } Z_PresentResponse;
 
+/* ------------------------ DELETE -------------------------- */
+
+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 */
+} Z_DeleteResultSetRequest;
+
+typedef enum Z_DeleteSetStatus
+{
+    Z_Delete_success = 0,
+    Z_Delete_resultSetDidNotExist,
+    Z_Delete_previouslyDeletedByTarget,
+    Z_Delete_systemProblemAtTarget,
+    Z_Delete_accessNotAllowed,
+    Z_Delete_resourceControlAtOrigin,
+    Z_Delete_resourceControlAtTarget,
+    Z_Delete_bulkDeleteNotSupported,
+    Z_Delete_notAllRsltSetsDeletedOnBulkDlte,
+    Z_Delete_notAllRequestedResultSetsDeleted,
+    Z_Delete_resultSetInUse
+} Z_DeleteSetStatus;
+
+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 */
+} Z_DeleteResultSetResponse;
+
 /* ------------------------ APDU ---------------------------- */
 
 typedef struct Z_APDU
 /* ------------------------ APDU ---------------------------- */
 
 typedef struct Z_APDU
index 2007f3e..0f7621b 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: seshigh.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: seshigh.c,v $
- * Revision 1.17  1995-04-10 10:23:36  quinn
+ * Revision 1.18  1995-04-17 11:28:25  quinn
+ * Smallish
+ *
+ * Revision 1.17  1995/04/10  10:23:36  quinn
  * Some work to add scan and other things.
  *
  * Revision 1.16  1995/03/31  09:18:55  quinn
  * Some work to add scan and other things.
  *
  * Revision 1.16  1995/03/31  09:18:55  quinn
@@ -162,6 +165,9 @@ void destroy_association(association *h)
     free(h);
 }
 
     free(h);
 }
 
+/*
+ * process events on the association
+ */
 void ir_session(IOCHAN h, int event)
 {
     int res;
 void ir_session(IOCHAN h, int event)
 {
     int res;
@@ -252,7 +258,7 @@ static int process_apdu(IOCHAN chan)
            logf(LOG_WARN, "Bad APDU");
            return -1;
     }
            logf(LOG_WARN, "Bad APDU");
            return -1;
     }
-    odr_reset(assoc->decode); /* release incopming APDU */
+    odr_reset(assoc->decode); /* release incoming APDU */
     odr_reset(assoc->encode); /* release stuff alloced before encoding */
     return res;
 }
     odr_reset(assoc->encode); /* release stuff alloced before encoding */
     return res;
 }
@@ -278,7 +284,7 @@ static int process_initRequest(IOCHAN client, Z_InitRequest *req)
     binitreq.configname = "default-config";
     if (!(binitres = bend_init(&binitreq)) || binitres->errcode)
     {
     binitreq.configname = "default-config";
     if (!(binitres = bend_init(&binitreq)) || binitres->errcode)
     {
-       logf(LOG_WARN, "Bad response from backend");
+       logf(LOG_WARN, "Negative response from backend");
        return -1;
     }
 
        return -1;
     }
 
@@ -292,10 +298,14 @@ static int process_initRequest(IOCHAN client, Z_InitRequest *req)
        ODR_MASK_SET(&options, Z_Options_search);
     if (ODR_MASK_GET(req->options, Z_Options_present))
        ODR_MASK_SET(&options, Z_Options_present);
        ODR_MASK_SET(&options, Z_Options_search);
     if (ODR_MASK_GET(req->options, Z_Options_present))
        ODR_MASK_SET(&options, Z_Options_present);
+#if 0
     if (ODR_MASK_GET(req->options, Z_Options_delSet))
        ODR_MASK_SET(&options, Z_Options_delSet);
     if (ODR_MASK_GET(req->options, Z_Options_delSet))
        ODR_MASK_SET(&options, Z_Options_delSet);
+#endif
     if (ODR_MASK_GET(req->options, Z_Options_namedResultSets))
        ODR_MASK_SET(&options, Z_Options_namedResultSets);
     if (ODR_MASK_GET(req->options, Z_Options_namedResultSets))
        ODR_MASK_SET(&options, Z_Options_namedResultSets);
+    if (ODR_MASK_GET(req->options, Z_Options_scan))
+       ODR_MASK_SET(&options, Z_Options_scan);
     resp.options = &options;
     ODR_MASK_ZERO(&protocolVersion);
     if (ODR_MASK_GET(req->protocolVersion, Z_ProtocolVersion_1))
     resp.options = &options;
     ODR_MASK_ZERO(&protocolVersion);
     if (ODR_MASK_GET(req->protocolVersion, Z_ProtocolVersion_1))
@@ -318,7 +328,7 @@ static int process_initRequest(IOCHAN client, Z_InitRequest *req)
     resp.result = &result;
     resp.implementationId = "YAZ";
     resp.implementationName = "Index Data/YAZ Generic Frontend Server";
     resp.result = &result;
     resp.implementationId = "YAZ";
     resp.implementationName = "Index Data/YAZ Generic Frontend Server";
-    resp.implementationVersion = "$Revision: 1.17 $";
+    resp.implementationVersion = "$Revision: 1.18 $";
     resp.userInformationField = 0;
     if (!z_APDU(assoc->encode, &apdup, 0))
     {
     resp.userInformationField = 0;
     if (!z_APDU(assoc->encode, &apdup, 0))
     {
@@ -727,7 +737,7 @@ static int process_scanRequest(IOCHAN client, Z_ScanRequest *req)
            if (srs->status == BEND_SCAN_PARTIAL)
                scanStatus = Z_Scan_partial_5;
            else
            if (srs->status == BEND_SCAN_PARTIAL)
                scanStatus = Z_Scan_partial_5;
            else
-               scanStatus = 1;  /* Z_Scan_success; */ /* assumption for now */
+               scanStatus = Z_Scan_success;
            ents.which = Z_ListEntries_entries;
            ents.u.entries = &list;
            list.entries = tab;
            ents.which = Z_ListEntries_entries;
            ents.u.entries = &list;
            list.entries = tab;