1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
/* ----------------------------------------------------------------------------
* 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.
* ----------------------------------------------------------------------------- */
package be.belgium.eid;
/******************************************************************************//**
* A singleton class that is the starting point to get all other objects.
* An instance can be obtained from the static method instance().
* From the readerset, a reader context can be requested, either by name or index.
* From this reader context, a card object can be received, depending on the card
* type in the reader.
*********************************************************************************/
public class BEID_ReaderSet extends BEID_Object {
private long swigCPtr;
protected BEID_ReaderSet(long cPtr, boolean cMemoryOwn) {
super(beidlibJava_WrapperJNI.SWIGBEID_ReaderSetUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(BEID_ReaderSet obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
beidlibJava_WrapperJNI.delete_BEID_ReaderSet(swigCPtr);
}
swigCPtr = 0;
super.delete();
}
/** Return the singleton object (created at first use) */
public static BEID_ReaderSet instance() {
return new BEID_ReaderSet(beidlibJava_WrapperJNI.BEID_ReaderSet_instance(), false);
}
/**
* Init the SDK (Optional)
* @param bManageTestCard If true, the applayer must ask if test cards are allowed (used for compatibility with old C API).
*/
public static void initSDK(boolean bManageTestCard) throws java.lang.Exception {
beidlibJava_WrapperJNI.BEID_ReaderSet_initSDK__SWIG_0(bManageTestCard);
}
/**
* Init the SDK (Optional)
*/
public static void initSDK() throws java.lang.Exception {
beidlibJava_WrapperJNI.BEID_ReaderSet_initSDK__SWIG_1();
}
/** Release the SDK */
public static void releaseSDK() throws java.lang.Exception {
beidlibJava_WrapperJNI.BEID_ReaderSet_releaseSDK();
}
/**
* Release the readers (Useful if readers had changed)
*
* @param bAllReference If true all the invalid reference/pointer are destroyed.
* THIS PARAMETER IS THREAD UNSAFE.
* make sure not to use any old reference/pointer after this release
*/
public void releaseReaders(boolean bAllReference) throws java.lang.Exception {
beidlibJava_WrapperJNI.BEID_ReaderSet_releaseReaders__SWIG_0(swigCPtr, this, bAllReference);
}
/**
* Release the readers (Useful if readers had changed)
*/
public void releaseReaders() throws java.lang.Exception {
beidlibJava_WrapperJNI.BEID_ReaderSet_releaseReaders__SWIG_1(swigCPtr, this);
}
/**
* Return true if readers have been added or removed
*/
public boolean isReadersChanged() throws java.lang.Exception {
return beidlibJava_WrapperJNI.BEID_ReaderSet_isReadersChanged(swigCPtr, this);
}
/**
* Get the list of the reader
*
* @param bForceRefresh true=force a refresh of the list of readers
* @return String[] names of the connected readers
*/
public String[] readerList(boolean bForceRefresh) throws java.lang.Exception {
return beidlibJava_WrapperJNI.BEID_ReaderSet_readerList__SWIG_0(swigCPtr, this, bForceRefresh);
}
/**
* Get the list of the reader
* @return String[] names of the connected readers
*/
public String[] readerList() throws java.lang.Exception {
return beidlibJava_WrapperJNI.BEID_ReaderSet_readerList__SWIG_1(swigCPtr, this);
}
/**
* Return the first readercontext with a card.
* If no card is present, return the first reader.
* If no reader exist, throw an exception BEID_ExNoReader
*/
public BEID_ReaderContext getReader() throws java.lang.Exception {
return new BEID_ReaderContext(beidlibJava_WrapperJNI.BEID_ReaderSet_getReader(swigCPtr, this), false);
}
/**
* Get the reader by its name
*/
public BEID_ReaderContext getReaderByName(String readerName) throws java.lang.Exception {
return new BEID_ReaderContext(beidlibJava_WrapperJNI.BEID_ReaderSet_getReaderByName(swigCPtr, this, readerName), false);
}
/**
* Return the number of card readers connected to the computer
*
* @param bForceRefresh force the reconnection to the lower layer to see if reader list have changed
*/
public long readerCount(boolean bForceRefresh) throws java.lang.Exception {
return beidlibJava_WrapperJNI.BEID_ReaderSet_readerCount__SWIG_0(swigCPtr, this, bForceRefresh);
}
/**
* Return the number of card readers connected to the computer
*/
public long readerCount() throws java.lang.Exception {
return beidlibJava_WrapperJNI.BEID_ReaderSet_readerCount__SWIG_1(swigCPtr, this);
}
/**
* Get the name of the reader by its index in the reader list
* Throw BEID_ExParamRange exception if the index is out of range
*/
public String getReaderName(long ulIndex) throws java.lang.Exception {
return beidlibJava_WrapperJNI.BEID_ReaderSet_getReaderName(swigCPtr, this, ulIndex);
}
/**
* Get the reader by its index
* Throw BEID_ExParamRange exception if the index is out of range
*/
public BEID_ReaderContext getReaderByNum(long ulIndex) throws java.lang.Exception {
return new BEID_ReaderContext(beidlibJava_WrapperJNI.BEID_ReaderSet_getReaderByNum(swigCPtr, this, ulIndex), false);
}
/**
* Return the reader containing the card with this serial number
* If no card with this serial number is found, throw an exception BEID_ExParamRange
*/
public BEID_ReaderContext getReaderByCardSerialNumber(String cardSerialNumber) throws java.lang.Exception {
return new BEID_ReaderContext(beidlibJava_WrapperJNI.BEID_ReaderSet_getReaderByCardSerialNumber(swigCPtr, this, cardSerialNumber), false);
}
/**
* Flush the cache files.
* Return if any files were flushed (T/F)
*/
public boolean flushCache() throws java.lang.Exception {
return beidlibJava_WrapperJNI.BEID_ReaderSet_flushCache(swigCPtr, this);
}
}
|