/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.35
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

namespace FreeSWITCH.Native {

using System;
using System.Runtime.InteropServices;

public class switch_bitpack_t : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal switch_bitpack_t(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(switch_bitpack_t obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~switch_bitpack_t() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        freeswitchPINVOKE.delete_switch_bitpack_t(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      GC.SuppressFinalize(this);
    }
  }

  public SWIGTYPE_p_unsigned_char buf {
    set {
      freeswitchPINVOKE.switch_bitpack_t_buf_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_bitpack_t_buf_get(swigCPtr);
      SWIGTYPE_p_unsigned_char ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
      return ret;
    } 
  }

  public uint buflen {
    set {
      freeswitchPINVOKE.switch_bitpack_t_buflen_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_bitpack_t_buflen_get(swigCPtr);
      return ret;
    } 
  }

  public SWIGTYPE_p_unsigned_char cur {
    set {
      freeswitchPINVOKE.switch_bitpack_t_cur_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_bitpack_t_cur_get(swigCPtr);
      SWIGTYPE_p_unsigned_char ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
      return ret;
    } 
  }

  public uint bytes {
    set {
      freeswitchPINVOKE.switch_bitpack_t_bytes_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_bitpack_t_bytes_get(swigCPtr);
      return ret;
    } 
  }

  public uint bits_tot {
    set {
      freeswitchPINVOKE.switch_bitpack_t_bits_tot_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_bitpack_t_bits_tot_get(swigCPtr);
      return ret;
    } 
  }

  public byte bits_cur {
    set {
      freeswitchPINVOKE.switch_bitpack_t_bits_cur_set(swigCPtr, value);
    } 
    get {
      byte ret = freeswitchPINVOKE.switch_bitpack_t_bits_cur_get(swigCPtr);
      return ret;
    } 
  }

  public byte bits_rem {
    set {
      freeswitchPINVOKE.switch_bitpack_t_bits_rem_set(swigCPtr, value);
    } 
    get {
      byte ret = freeswitchPINVOKE.switch_bitpack_t_bits_rem_get(swigCPtr);
      return ret;
    } 
  }

  public byte frame_bits {
    set {
      freeswitchPINVOKE.switch_bitpack_t_frame_bits_set(swigCPtr, value);
    } 
    get {
      byte ret = freeswitchPINVOKE.switch_bitpack_t_frame_bits_get(swigCPtr);
      return ret;
    } 
  }

  public byte shiftby {
    set {
      freeswitchPINVOKE.switch_bitpack_t_shiftby_set(swigCPtr, value);
    } 
    get {
      byte ret = freeswitchPINVOKE.switch_bitpack_t_shiftby_get(swigCPtr);
      return ret;
    } 
  }

  public byte this_byte {
    set {
      freeswitchPINVOKE.switch_bitpack_t_this_byte_set(swigCPtr, value);
    } 
    get {
      byte ret = freeswitchPINVOKE.switch_bitpack_t_this_byte_get(swigCPtr);
      return ret;
    } 
  }

  public byte under {
    set {
      freeswitchPINVOKE.switch_bitpack_t_under_set(swigCPtr, value);
    } 
    get {
      byte ret = freeswitchPINVOKE.switch_bitpack_t_under_get(swigCPtr);
      return ret;
    } 
  }

  public byte over {
    set {
      freeswitchPINVOKE.switch_bitpack_t_over_set(swigCPtr, value);
    } 
    get {
      byte ret = freeswitchPINVOKE.switch_bitpack_t_over_get(swigCPtr);
      return ret;
    } 
  }

  public switch_bitpack_mode_t mode {
    set {
      freeswitchPINVOKE.switch_bitpack_t_mode_set(swigCPtr, (int)value);
    } 
    get {
      switch_bitpack_mode_t ret = (switch_bitpack_mode_t)freeswitchPINVOKE.switch_bitpack_t_mode_get(swigCPtr);
      return ret;
    } 
  }

  public switch_bitpack_t() : this(freeswitchPINVOKE.new_switch_bitpack_t(), true) {
  }

}

}
