#ifndef __ROGER_RUD3_H__
#define __ROGER_RUD3_H__


/********************************************************************************************************************************************************/
/*! \ingroup   groupLibReturn
*	\{
*/
#define RUD3_OK								0x00		
#define RUD3_ERROR							0x01		
#define RUD3_DEVICE_NOT_FOUND				0x02		
#define RUD3_DEVICE_CANNOT_OPEN				0x04		
#define RUD3_INVALID_BUFFER_SIZE			0x05		
#define RUD3_EPSO_ERROR						0x06		
#define RUD3_USB_HID_ERROR					0x07		
#define RUD3_TIMEOUT						0x08		
#define RUD3_CARD_NOT_FOUND					0x09		
#define RUD3_DEVICE_CANNOT_CLOSE			0x0A		
#define RUD3_WRITE_ERROR					0x0B		
#define RUD3_READ_ERROR						0x0C		

/*!
*	\}
*/
/*! \ingroup   RUDCompatible
*	\{
*/
#define FDT_UNKNOWN						0x00			
#define FDT_RUD3						0x03			
/*!
*	\}
*/

/*! \ingroup   RUD3Buff
*	\{
*/
#define	MAX_FRAME_LENGTH					64
#define ROGER_ALL_DEVICE_TYPE				0x0000
#define ROGER_RUD3_DEVICE_TYPE				0x0001
/*!
*	\}
*/
#ifndef ROGER_RUD3
	#define		ROGER_RUD3_ATTRIBUTE  __declspec(dllimport)	
#else
	#define		ROGER_RUD3_ATTRIBUTE  __declspec(dllexport)	
#endif

typedef  DWORD RUD3RETURN;								/*!< Type zwracany przez biblotekę */	
#define	 RUD3CALLING	  			

/********************************************************************************************************************************************************/
extern "C"
{

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING
							rud3LibVer( 
										__inout LPTSTR, 
										__in DWORD
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING 
							rud3GetDeviceCount( 
										__out PDWORD,
										__in USHORT
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING
							rud3GetSerialNumber( 
										__in DWORD, 
										__in USHORT,
										__out LPSTR
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING
							rud3GetIndex( 
										__in LPSTR,
										__out PDWORD
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING 
							rud3GetDescriptionBySerialNumber( 
										__in LPSTR,
										__out LPSTR
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING 
							rud3GetDescriptionByIndex(
										__in DWORD,
										__in USHORT,
										__out LPSTR
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING	
							rud3GetPort(
										__in LPSTR,
										__out LPSTR
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING 
							rud3GetDeviceType( 
										__in LPSTR,
										__out PDWORD
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING 
							rud3Open( 
										__out PHANDLE,
										__in LPSTR
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING 
							rud3Close( 
										__in PHANDLE
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING 
							rud3Write( 
										__in PHANDLE,
										__in PCHAR,
										__in DWORD,
										__out LPDWORD,
										__in DWORD
										);

	ROGER_RUD3_ATTRIBUTE RUD3RETURN  RUD3CALLING 
							rud3Read( 
										__in PHANDLE,
										__out PCHAR,
										__in DWORD, 
										__out LPDWORD, 
										__in DWORD 
										);


}

#endif