• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/csharp/Internal/
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 1.3.38
4 *
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9namespace BerkeleyDB.Internal {
10
11using System;
12using System.Runtime.InteropServices;
13
14internal class DB_PREPLIST : IDisposable {
15  private HandleRef swigCPtr;
16  protected bool swigCMemOwn;
17
18  internal DB_PREPLIST(IntPtr cPtr, bool cMemoryOwn) {
19    swigCMemOwn = cMemoryOwn;
20    swigCPtr = new HandleRef(this, cPtr);
21  }
22
23  internal static HandleRef getCPtr(DB_PREPLIST obj) {
24    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
25  }
26
27  ~DB_PREPLIST() {
28    Dispose();
29  }
30
31  public virtual void Dispose() {
32    lock(this) {
33      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
34        swigCMemOwn = false;
35        libdb_csharpPINVOKE.delete_DB_PREPLIST(swigCPtr);
36      }
37      swigCPtr = new HandleRef(null, IntPtr.Zero);
38      GC.SuppressFinalize(this);
39    }
40  }
41
42  internal DB_TXN txn {
43    set {
44      libdb_csharpPINVOKE.DB_PREPLIST_txn_set(swigCPtr, DB_TXN.getCPtr(value));
45    }
46    get {
47      IntPtr cPtr = libdb_csharpPINVOKE.DB_PREPLIST_txn_get(swigCPtr);
48      DB_TXN ret = (cPtr == IntPtr.Zero) ? null : new DB_TXN(cPtr, false);
49      return ret;
50    }
51  }
52
53  internal byte[] gid {
54    set {
55      libdb_csharpPINVOKE.DB_PREPLIST_gid_set(swigCPtr, value);
56    }
57        get {
58          byte[] ret = new byte[DbConstants.DB_GID_SIZE];
59	  IntPtr cPtr = new IntPtr(swigCPtr.Handle.ToInt32() + IntPtr.Size);
60	  Marshal.Copy(cPtr, ret, 0, ret.Length);
61	  return ret;
62        }
63
64  }
65
66  internal DB_PREPLIST() : this(libdb_csharpPINVOKE.new_DB_PREPLIST(), true) {
67  }
68
69}
70
71}
72