summaryrefslogtreecommitdiff
path: root/lang/csharp/libdb_csharp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /lang/csharp/libdb_csharp
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'lang/csharp/libdb_csharp')
-rw-r--r--lang/csharp/libdb_csharp/db.i325
-rw-r--r--lang/csharp/libdb_csharp/db_csharp_wrap.c594
2 files changed, 842 insertions, 77 deletions
diff --git a/lang/csharp/libdb_csharp/db.i b/lang/csharp/libdb_csharp/db.i
index 8ad73bc2..dc6c5cb2 100644
--- a/lang/csharp/libdb_csharp/db.i
+++ b/lang/csharp/libdb_csharp/db.i
@@ -20,6 +20,7 @@ typedef uintptr_t roff_t;
typedef u_int32_t uintptr_t;
typedef int int32_t;
typedef int64_t db_seq_t;
+typedef int64_t db_off_t;
typedef int64_t off_t;
typedef long long int int64_t;
typedef u_int32_t DB_BACKUP_CONFIG;
@@ -79,22 +80,6 @@ typedef enum {
DB_TXN_PRINT=7 /* Public. */
} db_recops;
-struct __db; typedef struct __db DB;
-struct __db_channel; typedef struct __db_channel DB_CHANNEL;
-struct __db_compact; typedef struct __db_compact DB_COMPACT;
-struct __db_lock_u; typedef struct __db_lock_u DB_LOCK;
-struct __db_lsn; typedef struct __db_lsn DB_LSN;
-struct __db_preplist; typedef struct __db_preplist DB_PREPLIST;
-struct __db_repmgrsite; typedef struct __db_repmgrsite DB_REPMGR_SITE;
-struct __db_sequence; typedef struct __db_sequence DB_SEQUENCE;
-struct __db_site; typedef struct __db_site DB_SITE;
-struct __dbc; typedef struct __dbc DBC;
-struct __dbenv; typedef struct __dbenv DB_ENV;
-struct __dbt; typedef struct __dbt DBT;
-struct __dbtxn; typedef struct __dbtxn DB_TXN;
-struct __key_range; typedef struct __key_range DB_KEY_RANGE;
-struct __db_txn_token; typedef struct __db_txn_token DB_TXN_TOKEN;
-
%typemap(cstype) char ** "out IntPtr"
%typemap(imtype) char ** "out IntPtr"
%typemap(csin) char ** "out $csinput"
@@ -131,12 +116,21 @@ struct __db_txn_token; typedef struct __db_txn_token DB_TXN_TOKEN;
%typemap(cstype) db_seq_t * "ref Int64"
%typemap(imtype) db_seq_t * "ref Int64"
%typemap(csin) db_seq_t * "ref $csinput"
+%typemap(cstype) db_off_t "Int64"
+%typemap(imtype) db_off_t "Int64"
+%typemap(csin) db_off_t "$csinput"
+%typemap(cstype) db_off_t * "ref Int64"
+%typemap(imtype) db_off_t * "ref Int64"
+%typemap(csin) db_off_t * "ref $csinput"
%typemap(cstype) u_int8_t [DB_GID_SIZE] "byte[]"
%typemap(imtype) u_int8_t [DB_GID_SIZE] "byte[]"
%typemap(csin) u_int8_t [DB_GID_SIZE] "$csinput"
%typemap(cstype) u_int8_t * "byte[,]"
%typemap(imtype) u_int8_t * "byte[,]"
%typemap(csin) u_int8_t * "$csinput"
+%typemap(cstype) void * "IntPtr"
+%typemap(csin) void * "$csinput"
+%typemap(csout, excode=SWIGEXCODE) void * "{IntPtr res = $imcall; $excode; return res;}"
%typemap(cstype) DBT * "DatabaseEntry"
%typemap(csin, post=" GC.KeepAlive($csinput);") DBT * "$csclassname.getCPtr(DatabaseEntry.getDBT($csinput))"
@@ -199,7 +193,20 @@ struct __db_txn_token; typedef struct __db_txn_token DB_TXN_TOKEN;
return ret;
}
-
+
+%typemap(csout) DBT *get_partition_keys(u_int *countp, u_int *sizep, int *err) {
+ IntPtr cPtr = $imcall;
+ if (cPtr == IntPtr.Zero)
+ return null;
+
+ DatabaseEntry[] ret = new DatabaseEntry[countp - 1];
+ IntPtr val;
+ for (int i = 0; i < (countp - 1); i++) {
+ val = new IntPtr((IntPtr.Size == 4 ? cPtr.ToInt32() : cPtr.ToInt64()) + i * sizep);
+ ret[i] = DatabaseEntry.fromDBT(new DBT(val, false));
+ }
+ return ret;
+}
%typemap(csout) int is_transaction_applied{
return $imcall;
}
@@ -316,7 +323,7 @@ struct __db_txn_token; typedef struct __db_txn_token DB_TXN_TOKEN;
return ret;
}
-typedef struct __db_channel
+typedef struct
{
%extend {
int close(u_int32_t flags) {
@@ -347,7 +354,7 @@ typedef struct __db_channel
}
} DB_CHANNEL;
-typedef struct __db_compact {
+typedef struct {
/* Input Parameters. */
%typemap(csvarout) u_int32_t compact_fillpercent %{%}
u_int32_t compact_fillpercent; /* Desired fillfactor: 1-100 */
@@ -370,12 +377,20 @@ typedef struct __db_compact {
db_pgno_t compact_pages_truncated; /* Pages truncated to OS. */
} DB_COMPACT;
-typedef struct __db_lsn {
+typedef struct {
u_int32_t file;
u_int32_t offset;
} DB_LSN;
%typemap(cscode) DB %{
+ internal DatabaseEntry[] get_partition_keys() {
+ uint count = 0;
+ int err = 0;
+ uint size = 0;
+ DatabaseEntry[] ret = get_partition_keys(ref count, ref size, ref err);
+ DatabaseException.ThrowException(err);
+ return ret;
+ }
internal DBC cursor(DB_TXN txn, uint flags) {
int err = 0;
DBC ret = cursor(txn, flags, ref err);
@@ -423,6 +438,22 @@ typedef struct __db_lsn {
return ret;
}
+ internal int get_blob_dir(out string dir) {
+ int ret;
+ IntPtr dirp;
+ ret = get_blob_dir(out dirp);
+ dir = Marshal.PtrToStringAnsi(dirp);
+ return ret;
+ }
+
+ internal int get_blob_sub_dir(out string dir) {
+ int ret;
+ IntPtr dirp;
+ ret = get_blob_sub_dir(out dirp);
+ dir = Marshal.PtrToStringAnsi(dirp);
+ return ret;
+ }
+
internal int get_dbname(out string filenamep, out string dbnamep) {
int ret;
IntPtr fp, dp;
@@ -441,7 +472,7 @@ typedef struct __db_lsn {
return ret;
}
%}
-typedef struct __db
+typedef struct
{
%typemap(cstype) void *api_internal "BaseDatabase"
%typemap(imtype) void *api_internal "BaseDatabase"
@@ -583,10 +614,28 @@ typedef struct __db
return self->set_append_recno(self, callback);
}
- %typemap(cstype) int (*)(DB*, const DBT*, const DBT*) "BDB_CompareDelegate"
- %typemap(imtype) int (*)(DB*, const DBT*, const DBT*) "BDB_CompareDelegate"
- %typemap(csin) int (*callback)(DB *dbp, const DBT *dbt1, const DBT *dbt2) "callback"
- int set_bt_compare(int (*callback)(DB *dbp, const DBT *dbt1, const DBT *dbt2)) {
+ int get_blob_dir(const char **dir) {
+ return self->get_blob_dir(self, dir);
+ }
+ int set_blob_dir(const char *dir) {
+ return self->set_blob_dir(self, dir);
+ }
+
+ int get_blob_sub_dir(const char **dir) {
+ return self->get_blob_sub_dir(self, dir);
+ }
+
+ int get_blob_threshold(u_int32_t *bytes) {
+ return self->get_blob_threshold(self, bytes);
+ }
+ int set_blob_threshold(u_int32_t bytes, u_int32_t flags) {
+ return self->set_blob_threshold(self, bytes, flags);
+ }
+
+ %typemap(cstype) int (*)(DB*, const DBT*, const DBT*, size_t *) "BDB_CompareDelegate"
+ %typemap(imtype) int (*)(DB*, const DBT*, const DBT*, size_t *) "BDB_CompareDelegate"
+ %typemap(csin) int (*callback)(DB *dbp, const DBT *dbt1, const DBT *dbt2, size_t *locp) "callback"
+ int set_bt_compare(int (*callback)(DB *dbp, const DBT *dbt1, const DBT *dbt2, size_t *locp)) {
return self->set_bt_compare(self, callback);
}
@@ -621,7 +670,7 @@ typedef struct __db
return self->set_cachesize(self, gbytes, bytes, ncache);
}
- int set_dup_compare(int (*callback)(DB *dbp, const DBT *dbt1, const DBT *dbt2)) {
+ int set_dup_compare(int (*callback)(DB *dbp, const DBT *dbt1, const DBT *dbt2, size_t *locp)) {
return self->set_dup_compare(self, callback);
}
@@ -667,7 +716,7 @@ typedef struct __db
return self->set_heap_regionsize(self, npages);
}
- int set_h_compare(int (*callback)(DB *dbp, const DBT *dbt1, const DBT *dbt2)) {
+ int set_h_compare(int (*callback)(DB *dbp, const DBT *dbt1, const DBT *dbt2, size_t *locp)) {
return self->set_h_compare(self, callback);
}
@@ -712,6 +761,89 @@ typedef struct __db
int set_pagesize(u_int32_t pgsz) {
return self->set_pagesize(self, pgsz);
}
+
+ %typemap(cstype) void (*)(const DB_ENV *, const char *) "BDB_MsgcallDelegate"
+ %typemap(imtype) void (*)(const DB_ENV *, const char *) "BDB_MsgcallDelegate"
+ %typemap(csin) void (*db_msgcall_fcn)(const DB_ENV *dbenv, const char *msg) "db_msgcall_fcn"
+ void set_msgcall(void (*db_msgcall_fcn)(const DB_ENV *dbenv, const char *msg)) {
+ self->set_msgcall(self, db_msgcall_fcn);
+ }
+
+ int set_msgfile(char *msgfile) {
+ int ret;
+ FILE *fmsg;
+ ret = 0;
+ fmsg = NULL;
+ self->get_msgfile(self, &fmsg);
+ if (fmsg != NULL && fmsg != stdout && fmsg != stderr) {
+ fclose(fmsg);
+ fmsg = NULL;
+ }
+ if (strcmp(msgfile, "") == 0 || msgfile == NULL)
+ self->set_msgfile(self, NULL);
+ else if (strcmp(msgfile, "stdout") == 0)
+ self->set_msgfile(self, stdout);
+ else if (strcmp(msgfile, "stderr") == 0)
+ self->set_msgfile(self, stderr);
+ else {
+ fmsg = fopen(msgfile, "a");
+ if (fmsg != NULL) {
+ self->set_msgfile(self, fmsg);
+ }
+ else
+ ret = 1;
+ }
+ return ret;
+ }
+
+ %typemap(cstype) DBT *get_partition_keys "DatabaseEntry[]"
+ %typemap(imtype) DBT *get_partition_keys "IntPtr"
+ %csmethodmodifiers get_partition_keys "private"
+ DBT *get_partition_keys(u_int *countp, u_int32_t *sizep, int *err) {
+ DBT *keys = NULL;
+ *err = self->get_partition_keys(self, countp, &keys);
+ *sizep = sizeof(DBT);
+ return keys;
+ }
+ int get_partition_parts(u_int32_t *parts) {
+ int ret;
+ ret = self->get_partition_keys(self, parts, NULL);
+ if (*parts == 0)
+ ret = self->get_partition_callback(self, parts, NULL);
+ return ret;
+ }
+ %typemap(cstype) DBT *keys "IntPtr[]"
+ %typemap(imtype) DBT *keys "IntPtr[]"
+ %typemap(csin) DBT *keys "$csinput"
+ %typemap(cstype) u_int32_t (*)(DB *dbp, DBT *key) "BDB_PartitionDelegate"
+ %typemap(imtype) u_int32_t (*)(DB *dbp, DBT *key) "BDB_PartitionDelegate"
+ %typemap(csin) u_int32_t (*partition)(DB *dbp, DBT *key) "partition"
+ int set_partition(u_int32_t parts, DBT *keys, u_int32_t (*partition)(DB *dbp, DBT *key)) {
+ DBT *dbt;
+ DBT **ptr;
+ size_t dbt_size;
+ int i, ret;
+
+ i = 0;
+ dbt = NULL;
+ ptr = (DBT **)keys;
+ if (keys != NULL) {
+ dbt_size = sizeof(DBT);
+ if ((ret = __os_malloc(NULL, (parts - 1) * dbt_size, &dbt)) != 0)
+ return ret;
+ do {
+ if ((ret = __dbt_usercopy(self->env, ptr[i])) != 0)
+ goto err;
+ memcpy(&dbt[i], ptr[i], dbt_size);
+ } while (++i < (int)(parts - 1));
+ }
+ ret = self->set_partition(self, parts, dbt, partition);
+
+ err: while (--i >= 0)
+ __os_ufree(self->env, ptr[i]->data);
+ __os_free(NULL, dbt);
+ return ret;
+ }
int get_priority(DB_CACHE_PRIORITY *flags) {
return self->get_priority(self, flags);
@@ -805,8 +937,14 @@ typedef struct __db
DatabaseException.ThrowException(err);
return ret;
}
+ internal DB_STREAM db_stream(uint flags) {
+ int err = 0;
+ DB_STREAM ret = db_stream(flags, ref err);
+ DatabaseException.ThrowException(err);
+ return ret;
+ }
%}
-typedef struct __dbc
+typedef struct
{
%extend {
int close() {
@@ -825,6 +963,13 @@ typedef struct __dbc
return self->count(self, cnt, flags);
}
+ %csmethodmodifiers db_stream "private"
+ DB_STREAM *db_stream(u_int32_t flags, int *err) {
+ DB_STREAM *dbs = NULL;
+ *err = self->db_stream(self, &dbs, flags);
+ return dbs;
+ }
+
int del(u_int32_t flags) {
return self->del(self, flags);
}
@@ -865,11 +1010,12 @@ typedef struct __dbc
}
%}
-typedef struct __db_txn_token
+typedef struct
{
%typemap(cstype) u_int8_t [DB_TXN_TOKEN_SIZE] "byte[]"
%typemap(imtype, out = "IntPtr") u_int8_t [DB_TXN_TOKEN_SIZE] "byte[]"
%typemap(csin) u_int8_t [DB_TXN_TOKEN_SIZE] "$csinput"
+%typemap(csout, excode=SWIGEXCODE) u_int8_t [DB_TXN_TOKEN_SIZE] "{byte[] res = (byte [])($imcall); $excode; return res;}"
%typemap(csvarout) u_int8_t [DB_TXN_TOKEN_SIZE] %{
get {
byte[] ret = new byte[DbConstants.DB_TXN_TOKEN_SIZE];
@@ -891,7 +1037,7 @@ u_int8_t buf[DB_TXN_TOKEN_SIZE];
}
}
%}
-typedef struct __dbt
+typedef struct
{
u_int32_t dlen;
u_int32_t doff;
@@ -953,7 +1099,7 @@ typedef struct __dbt
}
%}
-typedef struct __db_site
+typedef struct
{
%extend {
int close() {
@@ -982,7 +1128,28 @@ typedef struct __db_site
}
} DB_SITE;
-typedef struct __db_repmgrsite
+typedef struct
+{
+%extend {
+ int close(u_int32_t flags) {
+ return self->close(self, flags);
+ }
+
+ int read(DBT *data, db_off_t offset, u_int32_t size, u_int32_t flags) {
+ return self->read(self, data, offset, size, flags);
+ }
+
+ int size(db_off_t *size, u_int32_t flags) {
+ return self->size(self, size, flags);
+ }
+
+ int write(DBT *data, db_off_t offset, u_int32_t flags) {
+ return self->write(self, data, offset, flags);
+ }
+}
+} DB_STREAM;
+
+typedef struct
{
%typemap(csvarin) int eid %{%}
int eid;
@@ -1006,7 +1173,7 @@ typedef struct __db_repmgrsite
}
%}
-typedef struct __dbtxn
+typedef struct
{
%extend {
int abort() {
@@ -1252,6 +1419,13 @@ typedef struct __dbtxn
return ret;
}
+ internal int get_blob_dir(out string dir) {
+ int ret;
+ IntPtr dirp;
+ ret = get_blob_dir(out dirp);
+ dir = Marshal.PtrToStringAnsi(dirp);
+ return ret;
+ }
internal int get_home(out string file) {
int ret;
IntPtr fp;
@@ -1292,7 +1466,7 @@ typedef struct __dbtxn
%typemap(csimports) DB_ENV "using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;"
-typedef struct __dbenv
+typedef struct
{
%typemap(cstype) void *api2_internal "DatabaseEnvironment"
@@ -1608,6 +1782,13 @@ typedef struct __dbenv
return self->repmgr_get_ack_policy(self, ack_policy);
}
+ int repmgr_get_incoming_queue_max(u_int32_t *gbytes, u_int32_t *bytes) {
+ return self->repmgr_get_incoming_queue_max(self, gbytes, bytes);
+ }
+ int repmgr_set_incoming_queue_max(u_int32_t gbytes, u_int32_t bytes) {
+ return self->repmgr_set_incoming_queue_max(self, gbytes, bytes);
+ }
+
DB_CHANNEL *repmgr_channel(int eid, u_int32_t flags, int *err) {
DB_CHANNEL *channel = NULL;
*err = self->repmgr_channel(self, eid, &channel, flags);
@@ -1751,6 +1932,13 @@ typedef struct __dbenv
return self->rep_set_transport(self, envid, send);
}
+ %typemap(cstype) int (*)(DB_ENV *, const char *, int *, u_int32_t) "BDB_ReplicationViewDelegate"
+ %typemap(imtype) int (*)(DB_ENV *, const char *, int *, u_int32_t) "BDB_ReplicationViewDelegate"
+ %typemap(csin) int (*f_repview)(DB_ENV *, const char *, int *, u_int32_t) "f_repview"
+ int rep_set_view(int (*f_repview)(DB_ENV *, const char *, int *, u_int32_t)) {
+ return self->rep_set_view(self, f_repview);
+ }
+
%typemap(cstype) int (*)(DB_ENV*, const char *dbname, void *handle) "BDB_BackupCloseDelegate"
%typemap(imtype) int (*)(DB_ENV*, const char *dbname, void *handle) "BDB_BackupCloseDelegate"
%typemap(csin) int (*close_func)(DB_ENV *, const char *dbname, void *handle) "close_func"
@@ -1771,6 +1959,20 @@ typedef struct __dbenv
return self->set_backup_config(self, cfg, value);
}
+ int get_blob_dir(const char **dirp) {
+ return self->get_blob_dir(self, dirp);
+ }
+ int set_blob_dir(const char *dir) {
+ return self->set_blob_dir(self, dir);
+ }
+
+ int get_blob_threshold(u_int32_t *bytes) {
+ return self->get_blob_threshold(self, bytes);
+ }
+ int set_blob_threshold(u_int32_t bytes, u_int32_t flags) {
+ return self->set_blob_threshold(self, bytes, flags);
+ }
+
int get_cachesize(u_int32_t *gbytes, u_int32_t *bytes, int *ncache) {
return self->get_cachesize(self, gbytes, bytes, ncache);
}
@@ -1848,7 +2050,7 @@ typedef struct __dbenv
%typemap(cstype) char ** "out IntPtr"
%typemap(imtype) char ** "out IntPtr"
%typemap(csin) char ** "out $csinput"
- %csmethodmodifiers get_data_dirs "private"
+ %csmethodmodifiers get_intermediate_dir_mode "private"
int get_intermediate_dir_mode(const char **mode) {
return self->get_intermediate_dir_mode(self, mode);
}
@@ -2005,6 +2207,40 @@ typedef struct __dbenv
int set_mp_mmapsize(size_t mp_mmapsize) {
return self->set_mp_mmapsize(self, mp_mmapsize);
}
+
+ %typemap(cstype) void (*)(const DB_ENV *, const char *) "BDB_MsgcallDelegate"
+ %typemap(imtype) void (*)(const DB_ENV *, const char *) "BDB_MsgcallDelegate"
+ %typemap(csin) void (*db_msgcall_fcn)(const DB_ENV *dbenv, const char *msg) "db_msgcall_fcn"
+ void set_msgcall(void (*db_msgcall_fcn)(const DB_ENV *dbenv, const char *msg)) {
+ self->set_msgcall(self, db_msgcall_fcn);
+ }
+
+ int set_msgfile(char *msgfile) {
+ int ret;
+ FILE *fmsg;
+ ret = 0;
+ fmsg = NULL;
+ self->get_msgfile(self, &fmsg);
+ if (fmsg != NULL && fmsg != stdout && fmsg != stderr) {
+ fclose(fmsg);
+ fmsg = NULL;
+ }
+ if (strcmp(msgfile, "") == 0 || msgfile == NULL)
+ self->set_msgfile(self, NULL);
+ else if (strcmp(msgfile, "stdout") == 0)
+ self->set_msgfile(self, stdout);
+ else if (strcmp(msgfile, "stderr") == 0)
+ self->set_msgfile(self, stderr);
+ else {
+ fmsg = fopen(msgfile, "a");
+ if (fmsg != NULL) {
+ self->set_msgfile(self, fmsg);
+ }
+ else
+ ret = 1;
+ }
+ return ret;
+ }
int get_thread_count(u_int32_t *count) {
return self->get_thread_count(self, count);
@@ -2213,7 +2449,7 @@ typedef struct __dbenv
}
} DB_ENV;
-typedef struct __key_range {
+typedef struct {
%typemap(csvarin) double less %{%}
double less;
%typemap(csvarin) double equal %{%}
@@ -2222,7 +2458,7 @@ typedef struct __key_range {
double greater;
} DB_KEY_RANGE;
-typedef struct __db_lock_u {
+typedef struct {
roff_t off; /* Offset of the lock in the region */
u_int32_t ndx; /* Index of the object referenced by
* this lock; used for locking. */
@@ -2230,7 +2466,7 @@ typedef struct __db_lock_u {
db_lockmode_t mode; /* mode of this lock. */
} DB_LOCK;
-typedef struct __db_lockreq {
+typedef struct {
db_lockop_t op; /* Operation. */
db_lockmode_t mode; /* Requested mode. */
db_timeout_t timeout; /* Time to expire lock. */
@@ -2285,7 +2521,10 @@ size_t alloc_dbt_arr(DB_ENV *dbenv, int num_dbt, void **ptr) {
-typedef struct __db_preplist {
+typedef struct {
+ %typemap(cstype) u_int8_t [DB_GID_SIZE] "byte[]"
+ %typemap(imtype) u_int8_t [DB_GID_SIZE] "byte[]"
+ %typemap(csout, excode=SWIGEXCODE) u_int8_t [DB_GID_SIZE] "{byte[] res = (byte [])($imcall); $excode; return res;}"
%typemap(csvarin) u_int8_t gid[DB_GID_SIZE] %{%}
%typemap(csvarout) u_int8_t gid[DB_GID_SIZE] %{
get {
@@ -2311,7 +2550,7 @@ typedef struct __db_preplist {
return ret;
}
%}
-typedef struct __db_sequence {
+typedef struct {
%extend {
DB_SEQUENCE(DB *dbp, u_int32_t flags) {
DB_SEQUENCE *seq = NULL;
@@ -2330,7 +2569,7 @@ typedef struct __db_sequence {
return self->close(self, flags);
}
- int get(DB_TXN *txn, int32_t delta, db_seq_t *retp, u_int32_t flags) {
+ int get(DB_TXN *txn, u_int32_t delta, db_seq_t *retp, u_int32_t flags) {
return self->get(self, txn, delta, retp, flags);
}
@@ -2357,10 +2596,10 @@ typedef struct __db_sequence {
return self->remove(self, txn, flags);
}
- int get_cachesize(int32_t *size) {
+ int get_cachesize(u_int32_t *size) {
return self->get_cachesize(self, size);
}
- int set_cachesize(int32_t size) {
+ int set_cachesize(u_int32_t size) {
return self->set_cachesize(self, size);
}
diff --git a/lang/csharp/libdb_csharp/db_csharp_wrap.c b/lang/csharp/libdb_csharp/db_csharp_wrap.c
index e2fc79cb..06c2ade0 100644
--- a/lang/csharp/libdb_csharp/db_csharp_wrap.c
+++ b/lang/csharp/libdb_csharp/db_csharp_wrap.c
@@ -1,12 +1,12 @@
#include "db_config.h"
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
- *
- * This file is not intended to be easily readable and contains a number of
+ * Version 2.0.12
+ *
+ * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG
- * interface file instead.
+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
* ----------------------------------------------------------------------------- */
#define SWIGCSHARP
@@ -42,28 +42,28 @@
#ifndef SWIGUNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-# define SWIGUNUSED __attribute__ ((__unused__))
+# define SWIGUNUSED __attribute__ ((__unused__))
# else
# define SWIGUNUSED
# endif
# elif defined(__ICC)
-# define SWIGUNUSED __attribute__ ((__unused__))
+# define SWIGUNUSED __attribute__ ((__unused__))
# else
-# define SWIGUNUSED
+# define SWIGUNUSED
# endif
#endif
#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif
+# endif
#endif
#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
# define SWIGUNUSEDPARM(p)
# else
-# define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif
@@ -106,7 +106,7 @@
# define SWIGSTDCALL __stdcall
# else
# define SWIGSTDCALL
-# endif
+# endif
#endif
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
@@ -246,7 +246,22 @@ SWIGINTERN int DB_rename(DB *self,char const *file,char const *database,char con
SWIGINTERN int DB_set_append_recno(DB *self,int (*callback)(DB *,DBT *,db_recno_t)){
return self->set_append_recno(self, callback);
}
-SWIGINTERN int DB_set_bt_compare(DB *self,int (*callback)(DB *,DBT const *,DBT const *)){
+SWIGINTERN int DB_get_blob_dir(DB *self,char const **dir){
+ return self->get_blob_dir(self, dir);
+ }
+SWIGINTERN int DB_set_blob_dir(DB *self,char const *dir){
+ return self->set_blob_dir(self, dir);
+ }
+SWIGINTERN int DB_get_blob_sub_dir(DB *self,char const **dir){
+ return self->get_blob_sub_dir(self, dir);
+ }
+SWIGINTERN int DB_get_blob_threshold(DB *self,u_int32_t *bytes){
+ return self->get_blob_threshold(self, bytes);
+ }
+SWIGINTERN int DB_set_blob_threshold(DB *self,u_int32_t bytes,u_int32_t flags){
+ return self->set_blob_threshold(self, bytes, flags);
+ }
+SWIGINTERN int DB_set_bt_compare(DB *self,int (*callback)(DB *,DBT const *,DBT const *,size_t *)){
return self->set_bt_compare(self, callback);
}
SWIGINTERN int DB_set_bt_compress(DB *self,int (*compress)(DB *,DBT const *,DBT const *,DBT const *,DBT const *,DBT *),int (*decompress)(DB *,DBT const *,DBT const *,DBT *,DBT *,DBT *)){
@@ -267,7 +282,7 @@ SWIGINTERN int DB_get_cachesize(DB *self,u_int32_t *gbytes,u_int32_t *bytes,int
SWIGINTERN int DB_set_cachesize(DB *self,u_int32_t gbytes,u_int32_t bytes,int ncache){
return self->set_cachesize(self, gbytes, bytes, ncache);
}
-SWIGINTERN int DB_set_dup_compare(DB *self,int (*callback)(DB *,DBT const *,DBT const *)){
+SWIGINTERN int DB_set_dup_compare(DB *self,int (*callback)(DB *,DBT const *,DBT const *,size_t *)){
return self->set_dup_compare(self, callback);
}
SWIGINTERN int DB_get_encrypt_flags(DB *self,u_int32_t *flags){
@@ -300,7 +315,7 @@ SWIGINTERN int DB_get_heap_regionsize(DB *self,u_int32_t *npages){
SWIGINTERN int DB_set_heap_regionsize(DB *self,u_int32_t npages){
return self->set_heap_regionsize(self, npages);
}
-SWIGINTERN int DB_set_h_compare(DB *self,int (*callback)(DB *,DBT const *,DBT const *)){
+SWIGINTERN int DB_set_h_compare(DB *self,int (*callback)(DB *,DBT const *,DBT const *,size_t *)){
return self->set_h_compare(self, callback);
}
SWIGINTERN int DB_get_h_ffactor(DB *self,u_int32_t *ffactor){
@@ -336,6 +351,74 @@ SWIGINTERN int DB_get_pagesize(DB *self,u_int32_t *pgsz){
SWIGINTERN int DB_set_pagesize(DB *self,u_int32_t pgsz){
return self->set_pagesize(self, pgsz);
}
+SWIGINTERN void DB_set_msgcall(DB *self,void (*db_msgcall_fcn)(DB_ENV const *,char const *)){
+ self->set_msgcall(self, db_msgcall_fcn);
+ }
+SWIGINTERN int DB_set_msgfile(DB *self,char *msgfile){
+ int ret;
+ FILE *fmsg;
+ ret = 0;
+ fmsg = NULL;
+ self->get_msgfile(self, &fmsg);
+ if (fmsg != NULL && fmsg != stdout && fmsg != stderr) {
+ fclose(fmsg);
+ fmsg = NULL;
+ }
+ if (strcmp(msgfile, "") == 0 || msgfile == NULL)
+ self->set_msgfile(self, NULL);
+ else if (strcmp(msgfile, "stdout") == 0)
+ self->set_msgfile(self, stdout);
+ else if (strcmp(msgfile, "stderr") == 0)
+ self->set_msgfile(self, stderr);
+ else {
+ fmsg = fopen(msgfile, "a");
+ if (fmsg != NULL) {
+ self->set_msgfile(self, fmsg);
+ }
+ else
+ ret = 1;
+ }
+ return ret;
+ }
+SWIGINTERN DBT *DB_get_partition_keys(DB *self,u_int *countp,u_int32_t *sizep,int *err){
+ DBT *keys = NULL;
+ *err = self->get_partition_keys(self, countp, &keys);
+ *sizep = sizeof(DBT);
+ return keys;
+ }
+SWIGINTERN int DB_get_partition_parts(DB *self,u_int32_t *parts){
+ int ret;
+ ret = self->get_partition_keys(self, parts, NULL);
+ if (*parts == 0)
+ ret = self->get_partition_callback(self, parts, NULL);
+ return ret;
+ }
+SWIGINTERN int DB_set_partition(DB *self,u_int32_t parts,DBT *keys,u_int32_t (*partition)(DB *,DBT *)){
+ DBT *dbt;
+ DBT **ptr;
+ size_t dbt_size;
+ int i, ret;
+
+ i = 0;
+ dbt = NULL;
+ ptr = (DBT **)keys;
+ if (keys != NULL) {
+ dbt_size = sizeof(DBT);
+ if ((ret = __os_malloc(NULL, (parts - 1) * dbt_size, &dbt)) != 0)
+ return ret;
+ do {
+ if ((ret = __dbt_usercopy(self->env, ptr[i])) != 0)
+ goto err;
+ memcpy(&dbt[i], ptr[i], dbt_size);
+ } while (++i < (int)(parts - 1));
+ }
+ ret = self->set_partition(self, parts, dbt, partition);
+
+ err: while (--i >= 0)
+ __os_ufree(self->env, ptr[i]->data);
+ __os_free(NULL, dbt);
+ return ret;
+ }
SWIGINTERN int DB_get_priority(DB *self,DB_CACHE_PRIORITY *flags){
return self->get_priority(self, flags);
}
@@ -408,6 +491,11 @@ SWIGINTERN int DBC_cmp(DBC *self,DBC *other_dbc,int *result,u_int32_t flags){
SWIGINTERN int DBC_count(DBC *self,db_recno_t *cnt,u_int32_t flags){
return self->count(self, cnt, flags);
}
+SWIGINTERN DB_STREAM *DBC_db_stream(DBC *self,u_int32_t flags,int *err){
+ DB_STREAM *dbs = NULL;
+ *err = self->db_stream(self, &dbs, flags);
+ return dbs;
+ }
SWIGINTERN int DBC_del(DBC *self,u_int32_t flags){
return self->del(self, flags);
}
@@ -432,7 +520,7 @@ SWIGINTERN int DBC_get_priority(DBC *self,DB_CACHE_PRIORITY *flags){
SWIGINTERN int DBC_set_priority(DBC *self,DB_CACHE_PRIORITY flags){
return self->set_priority(self, flags);
}
-SWIGINTERN DBT *new_DBT(){
+SWIGINTERN DBT *new_DBT(void){
DBT *self = NULL;
self = malloc(sizeof(DBT));
memset(self, 0, sizeof(DBT));
@@ -456,6 +544,18 @@ SWIGINTERN int DB_SITE_remove(DB_SITE *self){
SWIGINTERN int DB_SITE_set_config(DB_SITE *self,u_int32_t which,u_int32_t value){
return self->set_config(self, which, value);
}
+SWIGINTERN int DB_STREAM_close(DB_STREAM *self,u_int32_t flags){
+ return self->close(self, flags);
+ }
+SWIGINTERN int DB_STREAM_read(DB_STREAM *self,DBT *data,db_off_t offset,u_int32_t size,u_int32_t flags){
+ return self->read(self, data, offset, size, flags);
+ }
+SWIGINTERN int DB_STREAM_size(DB_STREAM *self,db_off_t *size,u_int32_t flags){
+ return self->size(self, size, flags);
+ }
+SWIGINTERN int DB_STREAM_write(DB_STREAM *self,DBT *data,db_off_t offset,u_int32_t flags){
+ return self->write(self, data, offset, flags);
+ }
SWIGINTERN int DB_TXN_abort(DB_TXN *self){
return self->abort(self);
}
@@ -724,6 +824,12 @@ SWIGINTERN int DB_ENV_repmgr_set_ack_policy(DB_ENV *self,int ack_policy){
SWIGINTERN int DB_ENV_repmgr_get_ack_policy(DB_ENV *self,int *ack_policy){
return self->repmgr_get_ack_policy(self, ack_policy);
}
+SWIGINTERN int DB_ENV_repmgr_get_incoming_queue_max(DB_ENV *self,u_int32_t *gbytes,u_int32_t *bytes){
+ return self->repmgr_get_incoming_queue_max(self, gbytes, bytes);
+ }
+SWIGINTERN int DB_ENV_repmgr_set_incoming_queue_max(DB_ENV *self,u_int32_t gbytes,u_int32_t bytes){
+ return self->repmgr_set_incoming_queue_max(self, gbytes, bytes);
+ }
SWIGINTERN DB_CHANNEL *DB_ENV_repmgr_channel(DB_ENV *self,int eid,u_int32_t flags,int *err){
DB_CHANNEL *channel = NULL;
*err = self->repmgr_channel(self, eid, &channel, flags);
@@ -830,6 +936,9 @@ SWIGINTERN int DB_ENV_rep_get_timeout(DB_ENV *self,int which,u_int32_t *timeoutp
SWIGINTERN int DB_ENV_rep_set_transport(DB_ENV *self,int envid,int (*send)(DB_ENV *,DBT const *,DBT const *,DB_LSN const *,int,u_int32_t)){
return self->rep_set_transport(self, envid, send);
}
+SWIGINTERN int DB_ENV_rep_set_view(DB_ENV *self,int (*f_repview)(DB_ENV *,char const *,int *,u_int32_t)){
+ return self->rep_set_view(self, f_repview);
+ }
SWIGINTERN int DB_ENV_set_backup_callbacks(DB_ENV *self,int (*open_func)(DB_ENV *,char const *,char const *,void **),int (*write_func)(DB_ENV *,u_int32_t,u_int32_t,u_int32_t,u_int8_t *,void *),int (*close_func)(DB_ENV *,char const *,void *)){
return self->set_backup_callbacks(self, open_func, write_func, close_func);
}
@@ -839,6 +948,18 @@ SWIGINTERN int DB_ENV_get_backup_config(DB_ENV *self,DB_BACKUP_CONFIG cfg,u_int3
SWIGINTERN int DB_ENV_set_backup_config(DB_ENV *self,DB_BACKUP_CONFIG cfg,u_int32_t value){
return self->set_backup_config(self, cfg, value);
}
+SWIGINTERN int DB_ENV_get_blob_dir(DB_ENV *self,char const **dirp){
+ return self->get_blob_dir(self, dirp);
+ }
+SWIGINTERN int DB_ENV_set_blob_dir(DB_ENV *self,char const *dir){
+ return self->set_blob_dir(self, dir);
+ }
+SWIGINTERN int DB_ENV_get_blob_threshold(DB_ENV *self,u_int32_t *bytes){
+ return self->get_blob_threshold(self, bytes);
+ }
+SWIGINTERN int DB_ENV_set_blob_threshold(DB_ENV *self,u_int32_t bytes,u_int32_t flags){
+ return self->set_blob_threshold(self, bytes, flags);
+ }
SWIGINTERN int DB_ENV_get_cachesize(DB_ENV *self,u_int32_t *gbytes,u_int32_t *bytes,int *ncache){
return self->get_cachesize(self, gbytes, bytes, ncache);
}
@@ -1022,6 +1143,35 @@ SWIGINTERN int DB_ENV_get_mp_mmapsize(DB_ENV *self,size_t *mp_mmapsize){
SWIGINTERN int DB_ENV_set_mp_mmapsize(DB_ENV *self,size_t mp_mmapsize){
return self->set_mp_mmapsize(self, mp_mmapsize);
}
+SWIGINTERN void DB_ENV_set_msgcall(DB_ENV *self,void (*db_msgcall_fcn)(DB_ENV const *,char const *)){
+ self->set_msgcall(self, db_msgcall_fcn);
+ }
+SWIGINTERN int DB_ENV_set_msgfile(DB_ENV *self,char *msgfile){
+ int ret;
+ FILE *fmsg;
+ ret = 0;
+ fmsg = NULL;
+ self->get_msgfile(self, &fmsg);
+ if (fmsg != NULL && fmsg != stdout && fmsg != stderr) {
+ fclose(fmsg);
+ fmsg = NULL;
+ }
+ if (strcmp(msgfile, "") == 0 || msgfile == NULL)
+ self->set_msgfile(self, NULL);
+ else if (strcmp(msgfile, "stdout") == 0)
+ self->set_msgfile(self, stdout);
+ else if (strcmp(msgfile, "stderr") == 0)
+ self->set_msgfile(self, stderr);
+ else {
+ fmsg = fopen(msgfile, "a");
+ if (fmsg != NULL) {
+ self->set_msgfile(self, fmsg);
+ }
+ else
+ ret = 1;
+ }
+ return ret;
+ }
SWIGINTERN int DB_ENV_get_thread_count(DB_ENV *self,u_int32_t *count){
return self->get_thread_count(self, count);
}
@@ -1239,7 +1389,7 @@ SWIGINTERN void delete_DB_SEQUENCE(DB_SEQUENCE *self){ }
SWIGINTERN int DB_SEQUENCE_close(DB_SEQUENCE *self,u_int32_t flags){
return self->close(self, flags);
}
-SWIGINTERN int DB_SEQUENCE_get(DB_SEQUENCE *self,DB_TXN *txn,int32_t delta,db_seq_t *retp,u_int32_t flags){
+SWIGINTERN int DB_SEQUENCE_get(DB_SEQUENCE *self,DB_TXN *txn,u_int32_t delta,db_seq_t *retp,u_int32_t flags){
return self->get(self, txn, delta, retp, flags);
}
SWIGINTERN DB *DB_SEQUENCE_get_db(DB_SEQUENCE *self){
@@ -1260,10 +1410,10 @@ SWIGINTERN int DB_SEQUENCE_open(DB_SEQUENCE *self,DB_TXN *txn,DBT *key,u_int32_t
SWIGINTERN int DB_SEQUENCE_remove(DB_SEQUENCE *self,DB_TXN *txn,u_int32_t flags){
return self->remove(self, txn, flags);
}
-SWIGINTERN int DB_SEQUENCE_get_cachesize(DB_SEQUENCE *self,int32_t *size){
+SWIGINTERN int DB_SEQUENCE_get_cachesize(DB_SEQUENCE *self,u_int32_t *size){
return self->get_cachesize(self, size);
}
-SWIGINTERN int DB_SEQUENCE_set_cachesize(DB_SEQUENCE *self,int32_t size){
+SWIGINTERN int DB_SEQUENCE_set_cachesize(DB_SEQUENCE *self,u_int32_t size){
return self->set_cachesize(self, size);
}
SWIGINTERN int DB_SEQUENCE_get_flags(DB_SEQUENCE *self,u_int32_t *flags){
@@ -2114,14 +2264,86 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_append_recno(void * jarg1, void * jarg2
}
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_get_blob_dir(void * jarg1, void * jarg2) {
+ int jresult ;
+ DB *arg1 = (DB *) 0 ;
+ char **arg2 = (char **) 0 ;
+ int result;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (char **)jarg2;
+ result = (int)DB_get_blob_dir(arg1,(char const **)arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_blob_dir(void * jarg1, char * jarg2) {
+ int jresult ;
+ DB *arg1 = (DB *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (char *)jarg2;
+ result = (int)DB_set_blob_dir(arg1,(char const *)arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_get_blob_sub_dir(void * jarg1, void * jarg2) {
+ int jresult ;
+ DB *arg1 = (DB *) 0 ;
+ char **arg2 = (char **) 0 ;
+ int result;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (char **)jarg2;
+ result = (int)DB_get_blob_sub_dir(arg1,(char const **)arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_get_blob_threshold(void * jarg1, void * jarg2) {
+ int jresult ;
+ DB *arg1 = (DB *) 0 ;
+ u_int32_t *arg2 = (u_int32_t *) 0 ;
+ int result;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (u_int32_t *)jarg2;
+ result = (int)DB_get_blob_threshold(arg1,arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_blob_threshold(void * jarg1, unsigned long jarg2, unsigned long jarg3) {
+ int jresult ;
+ DB *arg1 = (DB *) 0 ;
+ u_int32_t arg2 ;
+ u_int32_t arg3 ;
+ int result;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (u_int32_t)jarg2;
+ arg3 = (u_int32_t)jarg3;
+ result = (int)DB_set_blob_threshold(arg1,arg2,arg3);
+ jresult = result;
+ return jresult;
+}
+
+
SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_bt_compare(void * jarg1, void * jarg2) {
int jresult ;
DB *arg1 = (DB *) 0 ;
- int (*arg2)(DB *,DBT const *,DBT const *) = (int (*)(DB *,DBT const *,DBT const *)) 0 ;
+ int (*arg2)(DB *,DBT const *,DBT const *,size_t *) = (int (*)(DB *,DBT const *,DBT const *,size_t *)) 0 ;
int result;
arg1 = (DB *)jarg1;
- arg2 = (int (*)(DB *,DBT const *,DBT const *))jarg2;
+ arg2 = (int (*)(DB *,DBT const *,DBT const *,size_t *))jarg2;
result = (int)DB_set_bt_compare(arg1,arg2);
jresult = result;
return jresult;
@@ -2225,11 +2447,11 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_cachesize(void * jarg1, unsigned long j
SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_dup_compare(void * jarg1, void * jarg2) {
int jresult ;
DB *arg1 = (DB *) 0 ;
- int (*arg2)(DB *,DBT const *,DBT const *) = (int (*)(DB *,DBT const *,DBT const *)) 0 ;
+ int (*arg2)(DB *,DBT const *,DBT const *,size_t *) = (int (*)(DB *,DBT const *,DBT const *,size_t *)) 0 ;
int result;
arg1 = (DB *)jarg1;
- arg2 = (int (*)(DB *,DBT const *,DBT const *))jarg2;
+ arg2 = (int (*)(DB *,DBT const *,DBT const *,size_t *))jarg2;
result = (int)DB_set_dup_compare(arg1,arg2);
jresult = result;
return jresult;
@@ -2381,11 +2603,11 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_heap_regionsize(void * jarg1, unsigned
SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_h_compare(void * jarg1, void * jarg2) {
int jresult ;
DB *arg1 = (DB *) 0 ;
- int (*arg2)(DB *,DBT const *,DBT const *) = (int (*)(DB *,DBT const *,DBT const *)) 0 ;
+ int (*arg2)(DB *,DBT const *,DBT const *,size_t *) = (int (*)(DB *,DBT const *,DBT const *,size_t *)) 0 ;
int result;
arg1 = (DB *)jarg1;
- arg2 = (int (*)(DB *,DBT const *,DBT const *))jarg2;
+ arg2 = (int (*)(DB *,DBT const *,DBT const *,size_t *))jarg2;
result = (int)DB_set_h_compare(arg1,arg2);
jresult = result;
return jresult;
@@ -2548,6 +2770,80 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_pagesize(void * jarg1, unsigned long ja
}
+SWIGEXPORT void SWIGSTDCALL CSharp_DB_set_msgcall(void * jarg1, void * jarg2) {
+ DB *arg1 = (DB *) 0 ;
+ void (*arg2)(DB_ENV const *,char const *) = (void (*)(DB_ENV const *,char const *)) 0 ;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (void (*)(DB_ENV const *,char const *))jarg2;
+ DB_set_msgcall(arg1,arg2);
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_msgfile(void * jarg1, char * jarg2) {
+ int jresult ;
+ DB *arg1 = (DB *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (char *)jarg2;
+ result = (int)DB_set_msgfile(arg1,arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_DB_get_partition_keys(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {
+ void * jresult ;
+ DB *arg1 = (DB *) 0 ;
+ u_int *arg2 = (u_int *) 0 ;
+ u_int32_t *arg3 = (u_int32_t *) 0 ;
+ int *arg4 = (int *) 0 ;
+ DBT *result = 0 ;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (u_int *)jarg2;
+ arg3 = (u_int32_t *)jarg3;
+ arg4 = (int *)jarg4;
+ result = (DBT *)DB_get_partition_keys(arg1,arg2,arg3,arg4);
+ jresult = (void *)result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_get_partition_parts(void * jarg1, void * jarg2) {
+ int jresult ;
+ DB *arg1 = (DB *) 0 ;
+ u_int32_t *arg2 = (u_int32_t *) 0 ;
+ int result;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (u_int32_t *)jarg2;
+ result = (int)DB_get_partition_parts(arg1,arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_set_partition(void * jarg1, unsigned long jarg2, void * jarg3, void * jarg4) {
+ int jresult ;
+ DB *arg1 = (DB *) 0 ;
+ u_int32_t arg2 ;
+ DBT *arg3 = (DBT *) 0 ;
+ u_int32_t (*arg4)(DB *,DBT *) = (u_int32_t (*)(DB *,DBT *)) 0 ;
+ int result;
+
+ arg1 = (DB *)jarg1;
+ arg2 = (u_int32_t)jarg2;
+ arg3 = (DBT *)jarg3;
+ arg4 = (u_int32_t (*)(DB *,DBT *))jarg4;
+ result = (int)DB_set_partition(arg1,arg2,arg3,arg4);
+ jresult = result;
+ return jresult;
+}
+
+
SWIGEXPORT int SWIGSTDCALL CSharp_DB_get_priority(void * jarg1, void * jarg2) {
int jresult ;
DB *arg1 = (DB *) 0 ;
@@ -2864,6 +3160,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DBC_count(void * jarg1, void * jarg2, unsigned
}
+SWIGEXPORT void * SWIGSTDCALL CSharp_DBC_db_stream(void * jarg1, unsigned long jarg2, void * jarg3) {
+ void * jresult ;
+ DBC *arg1 = (DBC *) 0 ;
+ u_int32_t arg2 ;
+ int *arg3 = (int *) 0 ;
+ DB_STREAM *result = 0 ;
+
+ arg1 = (DBC *)jarg1;
+ arg2 = (u_int32_t)jarg2;
+ arg3 = (int *)jarg3;
+ result = (DB_STREAM *)DBC_db_stream(arg1,arg2,arg3);
+ jresult = (void *)result;
+ return jresult;
+}
+
+
SWIGEXPORT int SWIGSTDCALL CSharp_DBC_del(void * jarg1, unsigned long jarg2) {
int jresult ;
DBC *arg1 = (DBC *) 0 ;
@@ -3316,6 +3628,92 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_DB_SITE(void * jarg1) {
}
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_STREAM_close(void * jarg1, unsigned long jarg2) {
+ int jresult ;
+ DB_STREAM *arg1 = (DB_STREAM *) 0 ;
+ u_int32_t arg2 ;
+ int result;
+
+ arg1 = (DB_STREAM *)jarg1;
+ arg2 = (u_int32_t)jarg2;
+ result = (int)DB_STREAM_close(arg1,arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_STREAM_read(void * jarg1, void * jarg2, long long jarg3, unsigned long jarg4, unsigned long jarg5) {
+ int jresult ;
+ DB_STREAM *arg1 = (DB_STREAM *) 0 ;
+ DBT *arg2 = (DBT *) 0 ;
+ db_off_t arg3 ;
+ u_int32_t arg4 ;
+ u_int32_t arg5 ;
+ int result;
+
+ arg1 = (DB_STREAM *)jarg1;
+ arg2 = (DBT *)jarg2;
+ arg3 = (db_off_t)jarg3;
+ arg4 = (u_int32_t)jarg4;
+ arg5 = (u_int32_t)jarg5;
+ result = (int)DB_STREAM_read(arg1,arg2,arg3,arg4,arg5);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_STREAM_size(void * jarg1, void * jarg2, unsigned long jarg3) {
+ int jresult ;
+ DB_STREAM *arg1 = (DB_STREAM *) 0 ;
+ db_off_t *arg2 = (db_off_t *) 0 ;
+ u_int32_t arg3 ;
+ int result;
+
+ arg1 = (DB_STREAM *)jarg1;
+ arg2 = (db_off_t *)jarg2;
+ arg3 = (u_int32_t)jarg3;
+ result = (int)DB_STREAM_size(arg1,arg2,arg3);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_STREAM_write(void * jarg1, void * jarg2, long long jarg3, unsigned long jarg4) {
+ int jresult ;
+ DB_STREAM *arg1 = (DB_STREAM *) 0 ;
+ DBT *arg2 = (DBT *) 0 ;
+ db_off_t arg3 ;
+ u_int32_t arg4 ;
+ int result;
+
+ arg1 = (DB_STREAM *)jarg1;
+ arg2 = (DBT *)jarg2;
+ arg3 = (db_off_t)jarg3;
+ arg4 = (u_int32_t)jarg4;
+ result = (int)DB_STREAM_write(arg1,arg2,arg3,arg4);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_new_DB_STREAM() {
+ void * jresult ;
+ DB_STREAM *result = 0 ;
+
+ result = (DB_STREAM *)calloc(1, sizeof(DB_STREAM));
+ jresult = (void *)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_delete_DB_STREAM(void * jarg1) {
+ DB_STREAM *arg1 = (DB_STREAM *) 0 ;
+
+ arg1 = (DB_STREAM *)jarg1;
+ free((char *) arg1);
+}
+
+
SWIGEXPORT void SWIGSTDCALL CSharp_DB_REPMGR_SITE_eid_set(void * jarg1, int jarg2) {
DB_REPMGR_SITE *arg1 = (DB_REPMGR_SITE *) 0 ;
int arg2 ;
@@ -4019,7 +4417,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_log_file(void * jarg1, void * jarg2, ch
arg2 = (DB_LSN *)jarg2;
arg3 = (char *)jarg3;
arg4 = (size_t)jarg4;
- result = (int)DB_ENV_log_file(arg1,(struct __db_lsn const *)arg2,arg3,arg4);
+ result = (int)DB_ENV_log_file(arg1,(DB_LSN const *)arg2,arg3,arg4);
jresult = result;
return jresult;
}
@@ -4033,7 +4431,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_log_flush(void * jarg1, void * jarg2) {
arg1 = (DB_ENV *)jarg1;
arg2 = (DB_LSN *)jarg2;
- result = (int)DB_ENV_log_flush(arg1,(struct __db_lsn const *)arg2);
+ result = (int)DB_ENV_log_flush(arg1,(DB_LSN const *)arg2);
jresult = result;
return jresult;
}
@@ -4519,6 +4917,38 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_repmgr_get_ack_policy(void * jarg1, voi
}
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_repmgr_get_incoming_queue_max(void * jarg1, void * jarg2, void * jarg3) {
+ int jresult ;
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ u_int32_t *arg2 = (u_int32_t *) 0 ;
+ u_int32_t *arg3 = (u_int32_t *) 0 ;
+ int result;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (u_int32_t *)jarg2;
+ arg3 = (u_int32_t *)jarg3;
+ result = (int)DB_ENV_repmgr_get_incoming_queue_max(arg1,arg2,arg3);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_repmgr_set_incoming_queue_max(void * jarg1, unsigned long jarg2, unsigned long jarg3) {
+ int jresult ;
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ u_int32_t arg2 ;
+ u_int32_t arg3 ;
+ int result;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (u_int32_t)jarg2;
+ arg3 = (u_int32_t)jarg3;
+ result = (int)DB_ENV_repmgr_set_incoming_queue_max(arg1,arg2,arg3);
+ jresult = result;
+ return jresult;
+}
+
+
SWIGEXPORT void * SWIGSTDCALL CSharp_DB_ENV_repmgr_channel(void * jarg1, int jarg2, unsigned long jarg3, void * jarg4) {
void * jresult ;
DB_ENV *arg1 = (DB_ENV *) 0 ;
@@ -4995,6 +5425,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_rep_set_transport(void * jarg1, int jar
}
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_rep_set_view(void * jarg1, void * jarg2) {
+ int jresult ;
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ int (*arg2)(DB_ENV *,char const *,int *,u_int32_t) = (int (*)(DB_ENV *,char const *,int *,u_int32_t)) 0 ;
+ int result;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (int (*)(DB_ENV *,char const *,int *,u_int32_t))jarg2;
+ result = (int)DB_ENV_rep_set_view(arg1,arg2);
+ jresult = result;
+ return jresult;
+}
+
+
SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_set_backup_callbacks(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {
int jresult ;
DB_ENV *arg1 = (DB_ENV *) 0 ;
@@ -5045,6 +5489,64 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_set_backup_config(void * jarg1, unsigne
}
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_get_blob_dir(void * jarg1, void * jarg2) {
+ int jresult ;
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ char **arg2 = (char **) 0 ;
+ int result;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (char **)jarg2;
+ result = (int)DB_ENV_get_blob_dir(arg1,(char const **)arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_set_blob_dir(void * jarg1, char * jarg2) {
+ int jresult ;
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (char *)jarg2;
+ result = (int)DB_ENV_set_blob_dir(arg1,(char const *)arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_get_blob_threshold(void * jarg1, void * jarg2) {
+ int jresult ;
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ u_int32_t *arg2 = (u_int32_t *) 0 ;
+ int result;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (u_int32_t *)jarg2;
+ result = (int)DB_ENV_get_blob_threshold(arg1,arg2);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_set_blob_threshold(void * jarg1, unsigned long jarg2, unsigned long jarg3) {
+ int jresult ;
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ u_int32_t arg2 ;
+ u_int32_t arg3 ;
+ int result;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (u_int32_t)jarg2;
+ arg3 = (u_int32_t)jarg3;
+ result = (int)DB_ENV_set_blob_threshold(arg1,arg2,arg3);
+ jresult = result;
+ return jresult;
+}
+
+
SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_get_cachesize(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {
int jresult ;
DB_ENV *arg1 = (DB_ENV *) 0 ;
@@ -5865,6 +6367,30 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_set_mp_mmapsize(void * jarg1, unsigned
}
+SWIGEXPORT void SWIGSTDCALL CSharp_DB_ENV_set_msgcall(void * jarg1, void * jarg2) {
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ void (*arg2)(DB_ENV const *,char const *) = (void (*)(DB_ENV const *,char const *)) 0 ;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (void (*)(DB_ENV const *,char const *))jarg2;
+ DB_ENV_set_msgcall(arg1,arg2);
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_set_msgfile(void * jarg1, char * jarg2) {
+ int jresult ;
+ DB_ENV *arg1 = (DB_ENV *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+
+ arg1 = (DB_ENV *)jarg1;
+ arg2 = (char *)jarg2;
+ result = (int)DB_ENV_set_msgfile(arg1,arg2);
+ jresult = result;
+ return jresult;
+}
+
+
SWIGEXPORT int SWIGSTDCALL CSharp_DB_ENV_get_thread_count(void * jarg1, void * jarg2) {
int jresult ;
DB_ENV *arg1 = (DB_ENV *) 0 ;
@@ -6655,18 +7181,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_SEQUENCE_close(void * jarg1, unsigned long
}
-SWIGEXPORT int SWIGSTDCALL CSharp_DB_SEQUENCE_get(void * jarg1, void * jarg2, int jarg3, void * jarg4, unsigned long jarg5) {
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_SEQUENCE_get(void * jarg1, void * jarg2, unsigned long jarg3, void * jarg4, unsigned long jarg5) {
int jresult ;
DB_SEQUENCE *arg1 = (DB_SEQUENCE *) 0 ;
DB_TXN *arg2 = (DB_TXN *) 0 ;
- int32_t arg3 ;
+ u_int32_t arg3 ;
db_seq_t *arg4 = (db_seq_t *) 0 ;
u_int32_t arg5 ;
int result;
arg1 = (DB_SEQUENCE *)jarg1;
arg2 = (DB_TXN *)jarg2;
- arg3 = (int32_t)jarg3;
+ arg3 = (u_int32_t)jarg3;
arg4 = (db_seq_t *)jarg4;
arg5 = (u_int32_t)jarg5;
result = (int)DB_SEQUENCE_get(arg1,arg2,arg3,arg4,arg5);
@@ -6752,25 +7278,25 @@ SWIGEXPORT int SWIGSTDCALL CSharp_DB_SEQUENCE_remove(void * jarg1, void * jarg2,
SWIGEXPORT int SWIGSTDCALL CSharp_DB_SEQUENCE_get_cachesize(void * jarg1, void * jarg2) {
int jresult ;
DB_SEQUENCE *arg1 = (DB_SEQUENCE *) 0 ;
- int32_t *arg2 = (int32_t *) 0 ;
+ u_int32_t *arg2 = (u_int32_t *) 0 ;
int result;
arg1 = (DB_SEQUENCE *)jarg1;
- arg2 = (int32_t *)jarg2;
+ arg2 = (u_int32_t *)jarg2;
result = (int)DB_SEQUENCE_get_cachesize(arg1,arg2);
jresult = result;
return jresult;
}
-SWIGEXPORT int SWIGSTDCALL CSharp_DB_SEQUENCE_set_cachesize(void * jarg1, int jarg2) {
+SWIGEXPORT int SWIGSTDCALL CSharp_DB_SEQUENCE_set_cachesize(void * jarg1, unsigned long jarg2) {
int jresult ;
DB_SEQUENCE *arg1 = (DB_SEQUENCE *) 0 ;
- int32_t arg2 ;
+ u_int32_t arg2 ;
int result;
arg1 = (DB_SEQUENCE *)jarg1;
- arg2 = (int32_t)jarg2;
+ arg2 = (u_int32_t)jarg2;
result = (int)DB_SEQUENCE_set_cachesize(arg1,arg2);
jresult = result;
return jresult;