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

package pt.gov.cartaodecidadao;

public class PTEID_ReaderSet extends PTEID_Object {
  private long swigCPtr;

  protected PTEID_ReaderSet(long cPtr, boolean cMemoryOwn) {
    super(pteidlibJava_WrapperJNI.PTEID_ReaderSet_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        pteidlibJava_WrapperJNI.delete_PTEID_ReaderSet(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public static PTEID_ReaderSet instance() throws PTEID_Exception {
    return new PTEID_ReaderSet(pteidlibJava_WrapperJNI.PTEID_ReaderSet_instance(), false);
  }

  public static void initSDK(boolean bManageTestCard) throws PTEID_Exception {
    pteidlibJava_WrapperJNI.PTEID_ReaderSet_initSDK__SWIG_0(bManageTestCard);
  }

  public static void initSDK() throws PTEID_Exception {
    pteidlibJava_WrapperJNI.PTEID_ReaderSet_initSDK__SWIG_1();
  }

  public static void releaseSDK() throws PTEID_Exception {
    pteidlibJava_WrapperJNI.PTEID_ReaderSet_releaseSDK();
  }

  public void releaseReaders(boolean bAllReference) throws PTEID_Exception {
    pteidlibJava_WrapperJNI.PTEID_ReaderSet_releaseReaders__SWIG_0(swigCPtr, this, bAllReference);
  }

  public void releaseReaders() throws PTEID_Exception {
    pteidlibJava_WrapperJNI.PTEID_ReaderSet_releaseReaders__SWIG_1(swigCPtr, this);
  }

  public boolean isReadersChanged() throws PTEID_Exception {
    return pteidlibJava_WrapperJNI.PTEID_ReaderSet_isReadersChanged(swigCPtr, this);
  }

  public String[] readerList(boolean bForceRefresh) throws PTEID_Exception {
    return pteidlibJava_WrapperJNI.PTEID_ReaderSet_readerList__SWIG_0(swigCPtr, this, bForceRefresh);
  }

  public String[] readerList() throws PTEID_Exception {
    return pteidlibJava_WrapperJNI.PTEID_ReaderSet_readerList__SWIG_1(swigCPtr, this);
  }

  public PTEID_ReaderContext getReader() throws PTEID_Exception {
    return new PTEID_ReaderContext(pteidlibJava_WrapperJNI.PTEID_ReaderSet_getReader(swigCPtr, this), false);
  }

  public PTEID_ReaderContext getReaderByName(String readerName) throws PTEID_Exception {
    return new PTEID_ReaderContext(pteidlibJava_WrapperJNI.PTEID_ReaderSet_getReaderByName(swigCPtr, this, readerName), false);
  }

  public long readerCount(boolean bForceRefresh) throws PTEID_Exception {
    return pteidlibJava_WrapperJNI.PTEID_ReaderSet_readerCount__SWIG_0(swigCPtr, this, bForceRefresh);
  }

  public long readerCount() throws PTEID_Exception {
    return pteidlibJava_WrapperJNI.PTEID_ReaderSet_readerCount__SWIG_1(swigCPtr, this);
  }

  public String getReaderName(long ulIndex) throws PTEID_Exception {
    return pteidlibJava_WrapperJNI.PTEID_ReaderSet_getReaderName(swigCPtr, this, ulIndex);
  }

  public PTEID_ReaderContext getReaderByNum(long ulIndex) throws PTEID_Exception {
    return new PTEID_ReaderContext(pteidlibJava_WrapperJNI.PTEID_ReaderSet_getReaderByNum(swigCPtr, this, ulIndex), false);
  }

  public PTEID_ReaderContext getReaderByCardSerialNumber(String cardSerialNumber) throws PTEID_Exception {
    return new PTEID_ReaderContext(pteidlibJava_WrapperJNI.PTEID_ReaderSet_getReaderByCardSerialNumber(swigCPtr, this, cardSerialNumber), false);
  }

  public boolean flushCache() throws PTEID_Exception {
    return pteidlibJava_WrapperJNI.PTEID_ReaderSet_flushCache(swigCPtr, this);
  }

}
