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

package de.blichmann.idajava.natives;

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

  public exec_request_t(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

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

  public boolean valid() {
    return IdaJavaJNI.exec_request_t_valid(swigCPtr, this);
  }

  public void setCode(int value) {
    IdaJavaJNI.exec_request_t_code_set(swigCPtr, this, value);
  }

  public int getCode() {
    return IdaJavaJNI.exec_request_t_code_get(swigCPtr, this);
  }

  public void setSem(__qsemaphore_t value) {
    IdaJavaJNI.exec_request_t_sem_set(swigCPtr, this, __qsemaphore_t.getCPtr(value), value);
  }

  public __qsemaphore_t getSem() {
    long cPtr = IdaJavaJNI.exec_request_t_sem_get(swigCPtr, this);
    return (cPtr == 0) ? null : new __qsemaphore_t(cPtr, false);
  }

  public int execute() {
    return IdaJavaJNI.exec_request_t_execute(swigCPtr, this);
  }

  public final static int MFF_MAGIC = 0x12345678;

}
