projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added forward functions to rsbool, and a few tests for them.
[idzebra-moved-to-github.git]
/
perl
/
IDZebra.i
diff --git
a/perl/IDZebra.i
b/perl/IDZebra.i
index
61a8c61
..
8cd8382
100644
(file)
--- a/
perl/IDZebra.i
+++ b/
perl/IDZebra.i
@@
-142,9
+142,6
@@
typedef struct {
long stime;
} ZebraTransactionStatus;
long stime;
} ZebraTransactionStatus;
-
-
-
/* == Module initialization and cleanup (zebra_perl.c) ===================== */
void init (void);
/* == Module initialization and cleanup (zebra_perl.c) ===================== */
void init (void);
@@
-152,10
+149,21
@@
void DESTROY (void);
/* == Logging facilities (yaz/log.h) ======================================= */
/* == Logging facilities (yaz/log.h) ======================================= */
-void logLevel (int level);
-void logFile (const char *fname);
+%name(logLevel)
+void yaz_log_init_level (int level);
+
+%name(logFile)
+void yaz_log_init_file (const char *fname);
+
+%name(logMsg)
void logMsg (int level, const char *message);
void logMsg (int level, const char *message);
+%name(logPrefix)
+void yaz_log_init_prefix (const char *prefix);
+
+%name(logPrefix2)
+void yaz_log_init_prefix2 (const char *prefix);
+
#define LOG_FATAL 0x0001
#define LOG_DEBUG 0x0002
#define LOG_WARN 0x0004
#define LOG_FATAL 0x0001
#define LOG_DEBUG 0x0002
#define LOG_WARN 0x0004
@@
-235,7
+243,7
@@
int zebra_select_databases (ZebraHandle zh, int num_bases,
/* begin transaction (add write lock) (zebraapi.c) */
%name(begin_trans)
/* begin transaction (add write lock) (zebraapi.c) */
%name(begin_trans)
-void zebra_begin_trans (ZebraHandle zh);
+int zebra_begin_trans (ZebraHandle zh, int rw);
/* end transaction (remove write lock) (zebraapi.c) */
%name(end_trans)
/* end transaction (remove write lock) (zebraapi.c) */
%name(end_trans)
@@
-244,13
+252,6
@@
void zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *stat);
%name(trans_no)
int zebra_trans_no (ZebraHandle zh);
%name(trans_no)
int zebra_trans_no (ZebraHandle zh);
-%name(begin_read)
-int zebra_begin_read (ZebraHandle zh);
-
-/* end retrieval (remove read lock) (zebraapi.c) */
-%name(end_read)
-void zebra_end_read (ZebraHandle zh);
-
/* commit changes from shadow (zebraapi.c) */
%name(commit)
int zebra_commit (ZebraHandle zh);
/* commit changes from shadow (zebraapi.c) */
%name(commit)
int zebra_commit (ZebraHandle zh);
@@
-288,34
+289,49
@@
void zebra_repository_show (ZebraHandle zh);
If not, and match_criteria is provided, then sysno is guessed
If not, and a record is provided, then sysno is got from there */
If not, and match_criteria is provided, then sysno is guessed
If not, and a record is provided, then sysno is got from there */
+%apply int *REFERENCE { int *sysno };
+%name(insert_record)
+int zebra_insert_record (ZebraHandle zh,
+ recordGroup *rGroup,
+ const char *recordType,
+ int *sysno,
+ const char *match,
+ const char *fname,
+ const char *buf,
+ int buf_size,
+ int force_update);
+
%name(update_record)
int zebra_update_record (ZebraHandle zh,
recordGroup *rGroup,
const char *recordType,
%name(update_record)
int zebra_update_record (ZebraHandle zh,
recordGroup *rGroup,
const char *recordType,
- int sysno,
+ int *sysno,
const char *match,
const char *fname,
const char *buf,
const char *match,
const char *fname,
const char *buf,
- int buf_size);
+ int buf_size,
+ int force_update);
%name(delete_record)
int zebra_delete_record (ZebraHandle zh,
recordGroup *rGroup,
const char *recordType,
%name(delete_record)
int zebra_delete_record (ZebraHandle zh,
recordGroup *rGroup,
const char *recordType,
- int sysno,
+ int *sysno,
const char *match,
const char *fname,
const char *buf,
const char *match,
const char *fname,
const char *buf,
- int buf_size);
+ int buf_size,
+ int force_update);
-/* == Search (zebra_api_ext.c) ============================================= */
+/* == Search (zebraapi.c) ================================================== */
+%include "typemaps.i"
+%apply int *REFERENCE { int *hits };
%name(search_PQF)
int zebra_search_PQF (ZebraHandle zh,
%name(search_PQF)
int zebra_search_PQF (ZebraHandle zh,
- ODR odr_input, ODR odr_output,
const char *pqf_query,
const char *pqf_query,
- const char *setname);
-
+ const char *setname,
+ int *hits);
/* == YAZ - query tools ==================================================== */
/* == YAZ - query tools ==================================================== */
@@
-357,8
+373,15
@@
int zebra_deleleResultSet(ZebraHandle zh, int function,
int *statuses);
int *statuses);
+/* Resultset terms */
+%name(resultSetTerms)
+int zebra_resultSetTerms (ZebraHandle zh, const char *setname,
+ int no, int *REFERENCE,
+ int *REFERENCE, char *out, int *REFERENCE);
+
/* == Sort ================================================================= */
/* == Sort ================================================================= */
-int sort (ZebraHandle zh,
+%name(sort)
+int zebra_sort_by_specstr (ZebraHandle zh,
ODR stream,
const char *sort_spec,
const char *output_setname,
ODR stream,
const char *sort_spec,
const char *output_setname,
@@
-374,6
+397,10
@@
void zebra_scan_PQF (ZebraHandle zh,
scanEntry *getScanEntry(ScanObj *so, int pos);
scanEntry *getScanEntry(ScanObj *so, int pos);
+%typemap(in) int * (int dvalue);
+%typemap(argout) int *;
+
+
/* Admin functionality */
/*
%name(admin_start) void zebra_admin_start (ZebraHandle zh);
/* Admin functionality */
/*
%name(admin_start) void zebra_admin_start (ZebraHandle zh);