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

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

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

  ~switch_xml() {
    Dispose();
  }

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

  public string name {
    set {
      freeswitchPINVOKE.switch_xml_name_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_xml_name_get(swigCPtr);
      return ret;
    } 
  }

  public SWIGTYPE_p_p_char attr {
    set {
      freeswitchPINVOKE.switch_xml_attr_set(swigCPtr, SWIGTYPE_p_p_char.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_xml_attr_get(swigCPtr);
      SWIGTYPE_p_p_char ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_p_char(cPtr, false);
      return ret;
    } 
  }

  public string txt {
    set {
      freeswitchPINVOKE.switch_xml_txt_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_xml_txt_get(swigCPtr);
      return ret;
    } 
  }

  public string free_path {
    set {
      freeswitchPINVOKE.switch_xml_free_path_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_xml_free_path_get(swigCPtr);
      return ret;
    } 
  }

  public SWIGTYPE_p_switch_size_t off {
    set {
      freeswitchPINVOKE.switch_xml_off_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_xml_off_get(swigCPtr), true);
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

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

  public switch_xml sibling {
    set {
      freeswitchPINVOKE.switch_xml_sibling_set(swigCPtr, switch_xml.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_xml_sibling_get(swigCPtr);
      switch_xml ret = (cPtr == IntPtr.Zero) ? null : new switch_xml(cPtr, false);
      return ret;
    } 
  }

  public switch_xml ordered {
    set {
      freeswitchPINVOKE.switch_xml_ordered_set(swigCPtr, switch_xml.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_xml_ordered_get(swigCPtr);
      switch_xml ret = (cPtr == IntPtr.Zero) ? null : new switch_xml(cPtr, false);
      return ret;
    } 
  }

  public switch_xml child {
    set {
      freeswitchPINVOKE.switch_xml_child_set(swigCPtr, switch_xml.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_xml_child_get(swigCPtr);
      switch_xml ret = (cPtr == IntPtr.Zero) ? null : new switch_xml(cPtr, false);
      return ret;
    } 
  }

  public switch_xml parent {
    set {
      freeswitchPINVOKE.switch_xml_parent_set(swigCPtr, switch_xml.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_xml_parent_get(swigCPtr);
      switch_xml ret = (cPtr == IntPtr.Zero) ? null : new switch_xml(cPtr, false);
      return ret;
    } 
  }

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

  public switch_xml() : this(freeswitchPINVOKE.new_switch_xml(), true) {
  }

}

}
