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

package org.opalvoip;

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

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

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

  protected void finalize() {
    delete();
  }

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

  public void setM_protocol(String value) {
    OPALJNI.OpalStatusRegistration_m_protocol_set(swigCPtr, this, value);
  }

  public String getM_protocol() {
    return OPALJNI.OpalStatusRegistration_m_protocol_get(swigCPtr, this);
  }

  public void setM_serverName(String value) {
    OPALJNI.OpalStatusRegistration_m_serverName_set(swigCPtr, this, value);
  }

  public String getM_serverName() {
    return OPALJNI.OpalStatusRegistration_m_serverName_get(swigCPtr, this);
  }

  public void setM_error(String value) {
    OPALJNI.OpalStatusRegistration_m_error_set(swigCPtr, this, value);
  }

  public String getM_error() {
    return OPALJNI.OpalStatusRegistration_m_error_get(swigCPtr, this);
  }

  public void setM_status(OpalRegistrationStates value) {
    OPALJNI.OpalStatusRegistration_m_status_set(swigCPtr, this, value.swigValue());
  }

  public OpalRegistrationStates getM_status() {
    return OpalRegistrationStates.swigToEnum(OPALJNI.OpalStatusRegistration_m_status_get(swigCPtr, this));
  }

  public void setM_product(OpalProductDescription value) {
    OPALJNI.OpalStatusRegistration_m_product_set(swigCPtr, this, OpalProductDescription.getCPtr(value), value);
  }

  public OpalProductDescription getM_product() {
    long cPtr = OPALJNI.OpalStatusRegistration_m_product_get(swigCPtr, this);
    return (cPtr == 0) ? null : new OpalProductDescription(cPtr, false);
  }

  public OpalStatusRegistration() {
    this(OPALJNI.new_OpalStatusRegistration(), true);
  }

}
