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

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

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

  ~switch_endpoint_interface() {
    Dispose();
  }

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

  public string interface_name {
    set {
      freeswitchPINVOKE.switch_endpoint_interface_interface_name_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_endpoint_interface_interface_name_get(swigCPtr);
      return ret;
    } 
  }

  public switch_io_routines io_routines {
    set {
      freeswitchPINVOKE.switch_endpoint_interface_io_routines_set(swigCPtr, switch_io_routines.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_endpoint_interface_io_routines_get(swigCPtr);
      switch_io_routines ret = (cPtr == IntPtr.Zero) ? null : new switch_io_routines(cPtr, false);
      return ret;
    } 
  }

  public switch_state_handler_table state_handler {
    set {
      freeswitchPINVOKE.switch_endpoint_interface_state_handler_set(swigCPtr, switch_state_handler_table.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_endpoint_interface_state_handler_get(swigCPtr);
      switch_state_handler_table ret = (cPtr == IntPtr.Zero) ? null : new switch_state_handler_table(cPtr, false);
      return ret;
    } 
  }

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

  public switch_endpoint_interface next {
    set {
      freeswitchPINVOKE.switch_endpoint_interface_next_set(swigCPtr, switch_endpoint_interface.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_endpoint_interface_next_get(swigCPtr);
      switch_endpoint_interface ret = (cPtr == IntPtr.Zero) ? null : new switch_endpoint_interface(cPtr, false);
      return ret;
    } 
  }

  public switch_endpoint_interface() : this(freeswitchPINVOKE.new_switch_endpoint_interface(), true) {
  }

}

}
