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

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

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

  ~switch_event() {
    Dispose();
  }

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

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

  public switch_priority_t priority {
    set {
      freeswitchPINVOKE.switch_event_priority_set(swigCPtr, (int)value);
    } 
    get {
      switch_priority_t ret = (switch_priority_t)freeswitchPINVOKE.switch_event_priority_get(swigCPtr);
      return ret;
    } 
  }

  public string owner {
    set {
      freeswitchPINVOKE.switch_event_owner_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_event_owner_get(swigCPtr);
      return ret;
    } 
  }

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

  public switch_event_header headers {
    set {
      freeswitchPINVOKE.switch_event_headers_set(swigCPtr, switch_event_header.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_event_headers_get(swigCPtr);
      switch_event_header ret = (cPtr == IntPtr.Zero) ? null : new switch_event_header(cPtr, false);
      return ret;
    } 
  }

  public switch_event_header last_header {
    set {
      freeswitchPINVOKE.switch_event_last_header_set(swigCPtr, switch_event_header.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_event_last_header_get(swigCPtr);
      switch_event_header ret = (cPtr == IntPtr.Zero) ? null : new switch_event_header(cPtr, false);
      return ret;
    } 
  }

  public string body {
    set {
      freeswitchPINVOKE.switch_event_body_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_event_body_get(swigCPtr);
      return ret;
    } 
  }

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

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

  public uint key {
    set {
      freeswitchPINVOKE.switch_event_key_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_event_key_get(swigCPtr);
      return ret;
    } 
  }

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

  public switch_event() : this(freeswitchPINVOKE.new_switch_event(), true) {
  }

}

}
