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

namespace be.portugal.eid {

using System;
using System.Runtime.InteropServices;

public class PTEID_ReaderSet : PTEID_Object {
  private HandleRef swigCPtr;

  internal PTEID_ReaderSet(IntPtr cPtr, bool cMemoryOwn) : base(pteidlib_dotNetPINVOKE.PTEID_ReaderSetUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(PTEID_ReaderSet obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~PTEID_ReaderSet() {
    Dispose();
  }

  public override void Dispose() {
    lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        pteidlib_dotNetPINVOKE.delete_PTEID_ReaderSet(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      GC.SuppressFinalize(this);
      base.Dispose();
    }
  }

  public static PTEID_ReaderSet instance() {
    PTEID_ReaderSet ret = new PTEID_ReaderSet(pteidlib_dotNetPINVOKE.PTEID_ReaderSet_instance(), false);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static void initSDK(bool bManageTestCard) {
    pteidlib_dotNetPINVOKE.PTEID_ReaderSet_initSDK__SWIG_0(bManageTestCard);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public static void initSDK() {
    pteidlib_dotNetPINVOKE.PTEID_ReaderSet_initSDK__SWIG_1();
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public static void releaseSDK() {
    pteidlib_dotNetPINVOKE.PTEID_ReaderSet_releaseSDK();
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void releaseReaders(bool bAllReference) {
    pteidlib_dotNetPINVOKE.PTEID_ReaderSet_releaseReaders__SWIG_0(swigCPtr, bAllReference);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void releaseReaders() {
    pteidlib_dotNetPINVOKE.PTEID_ReaderSet_releaseReaders__SWIG_1(swigCPtr);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public bool isReadersChanged() {
    bool ret = pteidlib_dotNetPINVOKE.PTEID_ReaderSet_isReadersChanged(swigCPtr);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string[] readerList(bool bForceRefresh) { 
	IntPtr p = pteidlib_dotNetPINVOKE.PTEID_ReaderSet_readerList__SWIG_0(swigCPtr, bForceRefresh);
	if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
	string[] rslt = pteidlib_dotNetPINVOKE.custom_StringArrayResult;
	return rslt; 
}

  public string[] readerList() { 
	IntPtr p = pteidlib_dotNetPINVOKE.PTEID_ReaderSet_readerList__SWIG_1(swigCPtr);
	if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
	string[] rslt = pteidlib_dotNetPINVOKE.custom_StringArrayResult;
	return rslt; 
}

  public PTEID_ReaderContext getReader() {
    PTEID_ReaderContext ret = new PTEID_ReaderContext(pteidlib_dotNetPINVOKE.PTEID_ReaderSet_getReader(swigCPtr), false);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public PTEID_ReaderContext getReaderByName(string readerName) {
    PTEID_ReaderContext ret = new PTEID_ReaderContext(pteidlib_dotNetPINVOKE.PTEID_ReaderSet_getReaderByName(swigCPtr, readerName), false);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint readerCount(bool bForceRefresh) {
    uint ret = pteidlib_dotNetPINVOKE.PTEID_ReaderSet_readerCount__SWIG_0(swigCPtr, bForceRefresh);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint readerCount() {
    uint ret = pteidlib_dotNetPINVOKE.PTEID_ReaderSet_readerCount__SWIG_1(swigCPtr);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string getReaderName(uint ulIndex) {
    string ret = pteidlib_dotNetPINVOKE.PTEID_ReaderSet_getReaderName(swigCPtr, ulIndex);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public PTEID_ReaderContext getReaderByNum(uint ulIndex) {
    PTEID_ReaderContext ret = new PTEID_ReaderContext(pteidlib_dotNetPINVOKE.PTEID_ReaderSet_getReaderByNum(swigCPtr, ulIndex), false);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public PTEID_ReaderContext getReaderByCardSerialNumber(string cardSerialNumber) {
    PTEID_ReaderContext ret = new PTEID_ReaderContext(pteidlib_dotNetPINVOKE.PTEID_ReaderSet_getReaderByCardSerialNumber(swigCPtr, cardSerialNumber), false);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool flushCache() {
    bool ret = pteidlib_dotNetPINVOKE.PTEID_ReaderSet_flushCache(swigCPtr);
    if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
