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

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

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

  ~switch_event_node() {
    Dispose();
  }

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

  public string id {
    set {
      freeswitchPINVOKE.switch_event_node_id_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_event_node_id_get(swigCPtr);
      return ret;
    } 
  }

  public switch_event_types_t event_id {
    set {
      freeswitchPINVOKE.switch_event_node_event_id_set(swigCPtr, (int)value);
    } 
    get {
      switch_event_types_t ret = (switch_event_types_t)freeswitchPINVOKE.switch_event_node_event_id_get(swigCPtr);
      return ret;
    } 
  }

  public switch_event_subclass subclass {
    set {
      freeswitchPINVOKE.switch_event_node_subclass_set(swigCPtr, switch_event_subclass.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_event_node_subclass_get(swigCPtr);
      switch_event_subclass ret = (cPtr == IntPtr.Zero) ? null : new switch_event_subclass(cPtr, false);
      return ret;
    } 
  }

  public SWIGTYPE_p_f_p_switch_event__void callback {
    set {
      freeswitchPINVOKE.switch_event_node_callback_set(swigCPtr, SWIGTYPE_p_f_p_switch_event__void.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_event_node_callback_get(swigCPtr);
      SWIGTYPE_p_f_p_switch_event__void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_f_p_switch_event__void(cPtr, false);
      return ret;
    } 
  }

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

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

  public switch_event_node() : this(freeswitchPINVOKE.new_switch_event_node(), true) {
  }

}

}
