/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.8
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.pjsip.pjsua;

public class pjsua_call_media_info {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected pjsua_call_media_info(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(pjsua_call_media_info obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        pjsuaJNI.delete_pjsua_call_media_info(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setIndex(long value) {
    pjsuaJNI.pjsua_call_media_info_index_set(swigCPtr, this, value);
  }

  public long getIndex() {
    return pjsuaJNI.pjsua_call_media_info_index_get(swigCPtr, this);
  }

  public void setType(SWIGTYPE_p_pjmedia_type value) {
    pjsuaJNI.pjsua_call_media_info_type_set(swigCPtr, this, SWIGTYPE_p_pjmedia_type.getCPtr(value));
  }

  public SWIGTYPE_p_pjmedia_type getType() {
    return new SWIGTYPE_p_pjmedia_type(pjsuaJNI.pjsua_call_media_info_type_get(swigCPtr, this), true);
  }

  public void setDir(pjmedia_dir value) {
    pjsuaJNI.pjsua_call_media_info_dir_set(swigCPtr, this, value.swigValue());
  }

  public pjmedia_dir getDir() {
    return pjmedia_dir.swigToEnum(pjsuaJNI.pjsua_call_media_info_dir_get(swigCPtr, this));
  }

  public void setStatus(pjsua_call_media_status value) {
    pjsuaJNI.pjsua_call_media_info_status_set(swigCPtr, this, value.swigValue());
  }

  public pjsua_call_media_status getStatus() {
    return pjsua_call_media_status.swigToEnum(pjsuaJNI.pjsua_call_media_info_status_get(swigCPtr, this));
  }

  public pjsua_call_media_info() {
    this(pjsuaJNI.new_pjsua_call_media_info(), true);
  }

}
