• 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_LOCK : IDisposable {
15  private HandleRef swigCPtr;
16  protected bool swigCMemOwn;
17
18  internal DB_LOCK(IntPtr cPtr, bool cMemoryOwn) {
19    swigCMemOwn = cMemoryOwn;
20    swigCPtr = new HandleRef(this, cPtr);
21  }
22
23  internal static HandleRef getCPtr(DB_LOCK obj) {
24    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
25  }
26
27  ~DB_LOCK() {
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_LOCK(swigCPtr);
36      }
37      swigCPtr = new HandleRef(null, IntPtr.Zero);
38      GC.SuppressFinalize(this);
39    }
40  }
41
42  internal uint off {
43    set {
44      libdb_csharpPINVOKE.DB_LOCK_off_set(swigCPtr, value);
45    }
46    get {
47      uint ret = libdb_csharpPINVOKE.DB_LOCK_off_get(swigCPtr);
48      return ret;
49    }
50  }
51
52  internal uint ndx {
53    set {
54      libdb_csharpPINVOKE.DB_LOCK_ndx_set(swigCPtr, value);
55    }
56    get {
57      uint ret = libdb_csharpPINVOKE.DB_LOCK_ndx_get(swigCPtr);
58      return ret;
59    }
60  }
61
62  internal uint gen {
63    set {
64      libdb_csharpPINVOKE.DB_LOCK_gen_set(swigCPtr, value);
65    }
66    get {
67      uint ret = libdb_csharpPINVOKE.DB_LOCK_gen_get(swigCPtr);
68      return ret;
69    }
70  }
71
72  internal db_lockmode_t mode {
73    set {
74      libdb_csharpPINVOKE.DB_LOCK_mode_set(swigCPtr, (int)value);
75    }
76    get {
77      db_lockmode_t ret = (db_lockmode_t)libdb_csharpPINVOKE.DB_LOCK_mode_get(swigCPtr);
78      return ret;
79    }
80  }
81
82  internal DB_LOCK() : this(libdb_csharpPINVOKE.new_DB_LOCK(), true) {
83  }
84
85}
86
87}
88