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

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

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

  ~IvrMenu() {
    Dispose();
  }

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

  public IvrMenu(IvrMenu main, string name, string greeting_sound, string short_greeting_sound, string invalid_sound, string exit_sound, string confirm_macro, string confirm_key, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures) : this(freeswitchPINVOKE.new_IvrMenu(IvrMenu.getCPtr(main), name, greeting_sound, short_greeting_sound, invalid_sound, exit_sound, confirm_macro, confirm_key, confirm_attempts, inter_timeout, digit_len, timeout, max_failures), true) {
  }

  public void bindAction(string action, string arg, string bind) {
    freeswitchPINVOKE.IvrMenu_bindAction(swigCPtr, action, arg, bind);
  }

  public void Execute(CoreSession session, string name) {
    freeswitchPINVOKE.IvrMenu_Execute(swigCPtr, CoreSession.getCPtr(session), name);
  }

}

}
