/* ----------------------------------------------------------------------------
 * 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_timer : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

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

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

  ~switch_timer() {
    Dispose();
  }

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

  public int interval {
    set {
      freeswitchPINVOKE.switch_timer_interval_set(swigCPtr, value);
    } 
    get {
      int ret = freeswitchPINVOKE.switch_timer_interval_get(swigCPtr);
      return ret;
    } 
  }

  public uint flags {
    set {
      freeswitchPINVOKE.switch_timer_flags_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_timer_flags_get(swigCPtr);
      return ret;
    } 
  }

  public uint samples {
    set {
      freeswitchPINVOKE.switch_timer_samples_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_timer_samples_get(swigCPtr);
      return ret;
    } 
  }

  public uint samplecount {
    set {
      freeswitchPINVOKE.switch_timer_samplecount_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_timer_samplecount_get(swigCPtr);
      return ret;
    } 
  }

  public switch_timer_interface timer_interface {
    set {
      freeswitchPINVOKE.switch_timer_timer_interface_set(swigCPtr, switch_timer_interface.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_timer_timer_interface_get(swigCPtr);
      switch_timer_interface ret = (cPtr == IntPtr.Zero) ? null : new switch_timer_interface(cPtr, false);
      return ret;
    } 
  }

  public SWIGTYPE_p_apr_pool_t memory_pool {
    set {
      freeswitchPINVOKE.switch_timer_memory_pool_set(swigCPtr, SWIGTYPE_p_apr_pool_t.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_timer_memory_pool_get(swigCPtr);
      SWIGTYPE_p_apr_pool_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_apr_pool_t(cPtr, false);
      return ret;
    } 
  }

  public SWIGTYPE_p_void private_info {
    set {
      freeswitchPINVOKE.switch_timer_private_info_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_timer_private_info_get(swigCPtr);
      SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
      return ret;
    } 
  }

  public SWIGTYPE_p_switch_size_t diff {
    set {
      freeswitchPINVOKE.switch_timer_diff_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value));
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_timer_diff_get(swigCPtr), true);
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public SWIGTYPE_p_switch_size_t tick {
    set {
      freeswitchPINVOKE.switch_timer_tick_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value));
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_timer_tick_get(swigCPtr), true);
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public switch_timer() : this(freeswitchPINVOKE.new_switch_timer(), true) {
  }

}

}
