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

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

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

  ~switch_caller_extension() {
    Dispose();
  }

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

  public string extension_name {
    set {
      freeswitchPINVOKE.switch_caller_extension_extension_name_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_caller_extension_extension_name_get(swigCPtr);
      return ret;
    } 
  }

  public string extension_number {
    set {
      freeswitchPINVOKE.switch_caller_extension_extension_number_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_caller_extension_extension_number_get(swigCPtr);
      return ret;
    } 
  }

  public switch_caller_application current_application {
    set {
      freeswitchPINVOKE.switch_caller_extension_current_application_set(swigCPtr, switch_caller_application.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_caller_extension_current_application_get(swigCPtr);
      switch_caller_application ret = (cPtr == IntPtr.Zero) ? null : new switch_caller_application(cPtr, false);
      return ret;
    } 
  }

  public switch_caller_application last_application {
    set {
      freeswitchPINVOKE.switch_caller_extension_last_application_set(swigCPtr, switch_caller_application.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_caller_extension_last_application_get(swigCPtr);
      switch_caller_application ret = (cPtr == IntPtr.Zero) ? null : new switch_caller_application(cPtr, false);
      return ret;
    } 
  }

  public switch_caller_application applications {
    set {
      freeswitchPINVOKE.switch_caller_extension_applications_set(swigCPtr, switch_caller_application.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_caller_extension_applications_get(swigCPtr);
      switch_caller_application ret = (cPtr == IntPtr.Zero) ? null : new switch_caller_application(cPtr, false);
      return ret;
    } 
  }

  public switch_caller_profile children {
    set {
      freeswitchPINVOKE.switch_caller_extension_children_set(swigCPtr, switch_caller_profile.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_caller_extension_children_get(swigCPtr);
      switch_caller_profile ret = (cPtr == IntPtr.Zero) ? null : new switch_caller_profile(cPtr, false);
      return ret;
    } 
  }

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

  public switch_caller_extension() : this(freeswitchPINVOKE.new_switch_caller_extension(), true) {
  }

}

}
