/* ###
 * IP: Apache License 2.0 with LLVM Exceptions
 */
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.1
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package SWIG;

public class SBHostOS {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

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

  public static SBFileSpec GetProgramFileSpec() {
    return new SBFileSpec(lldbJNI.SBHostOS_GetProgramFileSpec(), true);
  }

  public static SBFileSpec GetLLDBPythonPath() {
    return new SBFileSpec(lldbJNI.SBHostOS_GetLLDBPythonPath(), true);
  }

  public static SBFileSpec GetLLDBPath(PathType path_type) {
    return new SBFileSpec(lldbJNI.SBHostOS_GetLLDBPath(path_type.swigValue()), true);
  }

  public static SBFileSpec GetUserHomeDirectory() {
    return new SBFileSpec(lldbJNI.SBHostOS_GetUserHomeDirectory(), true);
  }

  public static void ThreadCreated(String name) {
    lldbJNI.SBHostOS_ThreadCreated(name);
  }

  public static SWIGTYPE_p_pthread_t ThreadCreate(String name, SWIGTYPE_p_f_p_void__p_void arg1, SWIGTYPE_p_void thread_arg, SBError err) {
    return new SWIGTYPE_p_pthread_t(lldbJNI.SBHostOS_ThreadCreate(name, SWIGTYPE_p_f_p_void__p_void.getCPtr(arg1), SWIGTYPE_p_void.getCPtr(thread_arg), SBError.getCPtr(err), err), true);
  }

  public static boolean ThreadCancel(SWIGTYPE_p_pthread_t thread, SBError err) {
    return lldbJNI.SBHostOS_ThreadCancel(SWIGTYPE_p_pthread_t.getCPtr(thread), SBError.getCPtr(err), err);
  }

  public static boolean ThreadDetach(SWIGTYPE_p_pthread_t thread, SBError err) {
    return lldbJNI.SBHostOS_ThreadDetach(SWIGTYPE_p_pthread_t.getCPtr(thread), SBError.getCPtr(err), err);
  }

  public static boolean ThreadJoin(SWIGTYPE_p_pthread_t thread, SWIGTYPE_p_p_void result, SBError err) {
    return lldbJNI.SBHostOS_ThreadJoin(SWIGTYPE_p_pthread_t.getCPtr(thread), SWIGTYPE_p_p_void.getCPtr(result), SBError.getCPtr(err), err);
  }

  public SBHostOS() {
    this(lldbJNI.new_SBHostOS(), true);
  }

}
