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

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

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

  ~switch_codec() {
    Dispose();
  }

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

  public switch_codec_interface codec_interface {
    set {
      freeswitchPINVOKE.switch_codec_codec_interface_set(swigCPtr, switch_codec_interface.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_codec_codec_interface_get(swigCPtr);
      switch_codec_interface ret = (cPtr == IntPtr.Zero) ? null : new switch_codec_interface(cPtr, false);
      return ret;
    } 
  }

  public switch_codec_implementation implementation {
    set {
      freeswitchPINVOKE.switch_codec_implementation_set(swigCPtr, switch_codec_implementation.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_codec_implementation_get(swigCPtr);
      switch_codec_implementation ret = (cPtr == IntPtr.Zero) ? null : new switch_codec_implementation(cPtr, false);
      return ret;
    } 
  }

  public string fmtp_in {
    set {
      freeswitchPINVOKE.switch_codec_fmtp_in_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_codec_fmtp_in_get(swigCPtr);
      return ret;
    } 
  }

  public string fmtp_out {
    set {
      freeswitchPINVOKE.switch_codec_fmtp_out_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_codec_fmtp_out_get(swigCPtr);
      return ret;
    } 
  }

  public switch_codec_settings codec_settings {
    set {
      freeswitchPINVOKE.switch_codec_codec_settings_set(swigCPtr, switch_codec_settings.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_codec_codec_settings_get(swigCPtr);
      switch_codec_settings ret = (cPtr == IntPtr.Zero) ? null : new switch_codec_settings(cPtr, false);
      return ret;
    } 
  }

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

  public SWIGTYPE_p_apr_pool_t memory_pool {
    set {
      freeswitchPINVOKE.switch_codec_memory_pool_set(swigCPtr, SWIGTYPE_p_apr_pool_t.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_codec_memory_pool_get(swigCPtr);
      SWIGTYPE_p_apr_pool_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_apr_pool_t(cPtr, false);
      return ret;
    } 
  }

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

  public byte agreed_pt {
    set {
      freeswitchPINVOKE.switch_codec_agreed_pt_set(swigCPtr, value);
    } 
    get {
      byte ret = freeswitchPINVOKE.switch_codec_agreed_pt_get(swigCPtr);
      return ret;
    } 
  }

  public switch_codec() : this(freeswitchPINVOKE.new_switch_codec(), true) {
  }

}

}
