/****************************************************************************
  
   Program                :  uFr Simple
   File                   :  uFRSimpleDeclaration.java 
   Description            :  Declaration on functions
   Author                 :  VladanS
   Manufacturer           :  D-Logic
   Development enviroment :  NetBeans 7.2 
   Java Platform          :  JDK 1.7
   Revisions	          :  
   Version                :  1.6
   
*****************************************************************************/

package uFRSimple;
import com.sun.jna.*;
import com.sun.jna.ptr.ByteByReference;
import com.sun.jna.ptr.ShortByReference;
public class UFRSimpleDeclaration extends UFRSimple
{
   static String sDirPath=System.getProperty("user.dir");   
  
   public interface UFRSimpleFunction extends Library
   {
        
       UFRSimpleFunction uFrINSTANCE=(UFRSimpleFunction )Native.loadLibrary(sDirPath +"/"+PlatformOsType(), UFRSimpleFunction.class);
        int ReaderOpen();
        int ReaderClose();
        int GetReaderType(int[] reader_type);
        int GetReaderSerialNumber(int[] reader_serial);
        int GetCardId(byte[] card_id,int[] card_serial);
        int ReaderUISignal(int light_mode,int sound_mode);
        int ReaderKeyWrite(byte[]reader_key,byte key_index);
        
        int LinearRead(byte[] aucdata,int linear_address,int data_length,ShortByReference bytes_ret,byte auth_mode,int key_index);
        int LinearWrite(byte[] aucdata,int linear_address,int data_length,ShortByReference bytes_written,byte auth_mode,int key_index);
        int LinearFormatCard(byte[]key_a,byte block_access_bits,byte sector_access_bits,byte sector_trailers_byte9,
                             byte[]key_b,ByteByReference sector_formatted,byte auth_mode,byte key_index);
   }
}
