X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=perl%2FIDZebra.i;h=61a8c6155ea35d2d0512f39ac033ae900ce0b233;hb=e035737c20ac0caf47e9e48e3b11f006e9132e9c;hp=7f5e063ba3c5058520b3ecb059985fc9c9aafe02;hpb=fc9684841bbfad0b625e7365b99bae7b7df737df;p=idzebra-moved-to-github.git diff --git a/perl/IDZebra.i b/perl/IDZebra.i index 7f5e063..61a8c61 100644 --- a/perl/IDZebra.i +++ b/perl/IDZebra.i @@ -1,6 +1,7 @@ %module "IDZebra" %include typemaps.i // Load the typemaps librayr + %{ #include "zebraapi.h" #include "zebra_perl.h" @@ -11,8 +12,6 @@ /* == Typemaps ============================================================= */ -/* RetrievalRecordBuff is a special construct, to allow to map a char * buf - to non-null terminated perl string scalar value (SVpv). */ %typemap(in) int * { int i; if (!SvIOK($input)) @@ -27,6 +26,8 @@ argvi++; } +/* RetrievalRecordBuff is a special construct, to allow to map a char * buf + to non-null terminated perl string scalar value (SVpv). */ %typemap(out) RetrievalRecordBuf * { if ($1->len) { $result = newSVpv($1->buf,$1->len); @@ -85,7 +86,52 @@ /* == Structures for shadow classes ======================================= */ -%include "zebra_perl.h" + +/*%include "zebra_perl.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; + int sysno; + int score; + char *format; /* record syntax */ + RetrievalRecordBuf *buf; +} RetrievalRecord; + +/* Scan Term Descriptor */ +typedef struct { + int occurrences; /* scan term occurrences */ + char *term; /* scan term string */ +} scanEntry; + +typedef struct { + int num_entries; + int position; + int is_partial; + scanEntry *entries; +} ScanObj; + typedef struct { int processed; @@ -97,6 +143,8 @@ typedef struct { } ZebraTransactionStatus; + + /* == Module initialization and cleanup (zebra_perl.c) ===================== */ void init (void);