Added ODR encode in search and scen bend request structures.
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 5 Sep 1997 15:26:43 +0000 (15:26 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 5 Sep 1997 15:26:43 +0000 (15:26 +0000)
Fixed a few enums that caused trouble with C++.

include/backend.h
server/seshigh.c

index dafafad..d9c5fc6 100644 (file)
@@ -58,6 +58,7 @@ typedef struct bend_searchrequest
     int num_bases;             /* number of databases in list */
     char **basenames;          /* databases to search */
     Z_Query *query;            /* query structure */
+    ODR stream;                /* encoding stream */
 } bend_searchrequest;
 
 typedef struct bend_searchresult
@@ -103,22 +104,25 @@ typedef struct bend_scanrequest
     Z_AttributesPlusTerm *term;
     int term_position;  /* desired index of term in result list */
     int num_entries;    /* number of entries requested */
+    ODR stream;         /* encoding stream - memory source if required */
 } bend_scanrequest;
 
+struct scan_entry {
+    char *term;
+    int occurrences;
+};
+
+typedef enum {
+    BEND_SCAN_SUCCESS,   /* ok */
+    BEND_SCAN_PARTIAL   /* not all entries could be found */
+} bend_scan_status;
+
 typedef struct bend_scanresult
 {
     int num_entries;
-    struct scan_entry
-    {
-       char *term;
-       int occurrences;
-    } *entries;
+    struct scan_entry *entries;
     int term_position;
-    enum
-    {
-       BEND_SCAN_SUCCESS,   /* ok */
-       BEND_SCAN_PARTIAL   /* not all entries could be found */
-    } status;
+    bend_scan_status status;
     int errcode;
     char *errstring;
 } bend_scanresult;
index 94c4d45..c74de0c 100644 (file)
@@ -4,7 +4,11 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: seshigh.c,v $
- * Revision 1.65  1997-09-01 08:53:01  adam
+ * Revision 1.66  1997-09-05 15:26:44  adam
+ * Added ODR encode in search and scen bend request structures.
+ * Fixed a few enums that caused trouble with C++.
+ *
+ * Revision 1.65  1997/09/01 08:53:01  adam
  * New windows NT/95 port using MSV5.0. The test server 'ztest' was
  * moved a separate directory. MSV5.0 project server.dsp created.
  * As an option, the server can now operate as an NT service.
@@ -1024,6 +1028,7 @@ static Z_APDU *process_searchRequest(association *assoc, request *reqb,
     bsrq.num_bases = req->num_databaseNames;
     bsrq.basenames = req->databaseNames;
     bsrq.query = req->query;
+    bsrq.stream = assoc->encode;
 
     if (!(bsrt = bend_search(assoc->backend, &bsrq, fd)))
        return 0;
@@ -1244,6 +1249,7 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd)
        srq.basenames = req->databaseNames;
        srq.num_entries = *req->numberOfTermsRequested;
        srq.term = req->termListAndStartPoint;
+       srq.stream = assoc->encode;
        if (!(attset = oid_getentbyoid(req->attributeSet)) ||
            attset->oclass != CLASS_RECSYN)
            srq.attributeset = VAL_NONE;