Restructured header files. Now zebra_perl.h contains definitions which are
authorpop <pop>
Mon, 18 Nov 2002 13:20:31 +0000 (13:20 +0000)
committerpop <pop>
Mon, 18 Nov 2002 13:20:31 +0000 (13:20 +0000)
going to be shadowed by swig also. Other definitions in zebra_api_ext.h are
just used internally.

perl/zebra_api_ext.h
perl/zebra_perl.h

index aef0398..a946b48 100644 (file)
@@ -1,24 +1,16 @@
-int zebra_insert_record (ZebraHandle zh, 
-                        const char *database,
-                        const char *buf, int len,
-                        char *match);
+#ifndef ZEBRA_API_EXT_H
+#define ZEBRA_API_EXT_H
 
+#include "zebraapi.h"
 
-int zebra_delete_record_by_sysno (ZebraHandle zh, 
-                                  const char *database,
-                                  int sysno);
+void api_records_retrieve (ZebraHandle zh, ODR stream,
+                          const char *setname, Z_RecordComposition *comp,
+                          oid_value input_format, int num_recs,
+                          ZebraRetrievalRecord *recs);
+typedef struct {
+  char *buf;           /* record buffer (void pointer really) */
+  int len;             /* length */
+} RetrievalRecordBuf;
 
-int zebra_delete_records_by_match (ZebraHandle zh, 
-                                  const char *database,
-                                  char *match);
-
-int zebra_update_record_by_sysno (ZebraHandle zh, 
-                                 const char *database,
-                                 const char *buf, int len,
-                                 int sysno);
-
-int zebra_update_records_by_match (ZebraHandle zh, 
-                                  const char *database,
-                                  const char *buf, int len,
-                                  char *match);
 
+#endif
index 40ba726..aadc620 100644 (file)
@@ -1,5 +1,42 @@
+#ifndef ZEBRA_PERL_H
+#define ZEBRA_PERL_H
 
-#include <zebraapi.h>
-#include <data1.h>
+#include "zebraapi.h"
 #include "zebra_api_ext.h"
 
+typedef struct {
+    char  *groupName;
+    char  *databaseName;
+    char  *path;
+    char  *recordId;
+    char  *recordType;
+    int   flagStoreData;
+    int   flagStoreKeys;
+    int   flagRw;
+    int   fileVerboseLimit;
+    int   databaseNamePath;
+    int   explainDatabase;
+    int   followLinks;
+} recordGroup;
+
+typedef struct {
+  int noOfRecords;
+  ZebraRetrievalRecord *records;
+} RetrievalObj;
+
+typedef struct {
+  int  errCode;        /* non-zero if error when fetching this */
+  char *errString;     /* error string */
+  int  position;       /* position of record in result set (1,2,..) */
+  char *base; 
+  oid_value format;    /* record syntax */
+  RetrievalRecordBuf *buf;
+} RetrievalRecord;
+
+/* Scan Term Descriptor */
+typedef struct {
+    int occurrences;     /* scan term occurrences */
+    char *term;          /* scan term string */
+} ScanEntry;
+
+#endif