Blame src/commands.h

Packit Service aee942
/*
Packit Service aee942
    commands.h: Commands sent to the card
Packit Service aee942
    Copyright (C) 2003-2009   Ludovic Rousseau
Packit Service aee942
Packit Service aee942
    This library is free software; you can redistribute it and/or
Packit Service aee942
    modify it under the terms of the GNU Lesser General Public
Packit Service aee942
    License as published by the Free Software Foundation; either
Packit Service aee942
    version 2.1 of the License, or (at your option) any later version.
Packit Service aee942
Packit Service aee942
    This library is distributed in the hope that it will be useful,
Packit Service aee942
    but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service aee942
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service aee942
    Lesser General Public License for more details.
Packit Service aee942
Packit Service aee942
	You should have received a copy of the GNU Lesser General Public License
Packit Service aee942
	along with this library; if not, write to the Free Software Foundation,
Packit Service aee942
	Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Packit Service aee942
*/
Packit Service aee942
Packit Service aee942
#define SIZE_GET_SLOT_STATUS 10
Packit Service aee942
#define STATUS_OFFSET 7
Packit Service aee942
#define ERROR_OFFSET 8
Packit Service aee942
#define CHAIN_PARAMETER_OFFSET 9
Packit Service aee942
Packit Service aee942
RESPONSECODE CmdPowerOn(unsigned int reader_index, unsigned int * nlength,
Packit Service aee942
	/*@out@*/ unsigned char buffer[], int voltage);
Packit Service aee942
Packit Service aee942
RESPONSECODE SecurePINVerify(unsigned int reader_index,
Packit Service aee942
	unsigned char TxBuffer[], unsigned int TxLength,
Packit Service aee942
	unsigned char RxBuffer[], unsigned int *RxLength);
Packit Service aee942
Packit Service aee942
RESPONSECODE SecurePINModify(unsigned int reader_index,
Packit Service aee942
	unsigned char TxBuffer[], unsigned int TxLength,
Packit Service aee942
	unsigned char RxBuffer[], unsigned int *RxLength);
Packit Service aee942
Packit Service aee942
RESPONSECODE CmdEscape(unsigned int reader_index,
Packit Service aee942
	const unsigned char TxBuffer[], unsigned int TxLength,
Packit Service aee942
	unsigned char RxBuffer[], unsigned int *RxLength, unsigned int timeout);
Packit Service aee942
Packit Service aee942
RESPONSECODE CmdEscapeCheck(unsigned int reader_index,
Packit Service aee942
	const unsigned char TxBuffer[], unsigned int TxLength,
Packit Service aee942
	unsigned char RxBuffer[], unsigned int *RxLength, unsigned int timeout,
Packit Service aee942
	int mayfail);
Packit Service aee942
Packit Service aee942
RESPONSECODE CmdPowerOff(unsigned int reader_index);
Packit Service aee942
Packit Service aee942
RESPONSECODE CmdGetSlotStatus(unsigned int reader_index,
Packit Service aee942
	/*@out@*/ unsigned char buffer[]);
Packit Service aee942
Packit Service aee942
RESPONSECODE CmdXfrBlock(unsigned int reader_index, unsigned int tx_length,
Packit Service aee942
	unsigned char tx_buffer[], unsigned int *rx_length,
Packit Service aee942
	unsigned char rx_buffer[], int protoccol);
Packit Service aee942
Packit Service aee942
RESPONSECODE CCID_Transmit(unsigned int reader_index, unsigned int tx_length,
Packit Service aee942
	const unsigned char tx_buffer[], unsigned short rx_length, unsigned char bBWI);
Packit Service aee942
Packit Service aee942
RESPONSECODE CCID_Receive(unsigned int reader_index,
Packit Service aee942
	/*@out@*/ unsigned int *rx_length,
Packit Service aee942
	/*@out@*/ unsigned char rx_buffer[], unsigned char *chain_parameter);
Packit Service aee942
Packit Service aee942
RESPONSECODE SetParameters(unsigned int reader_index, char protocol,
Packit Service aee942
	unsigned int length, unsigned char buffer[]);
Packit Service aee942
Packit Service aee942
int isCharLevel(int reader_index);
Packit Service aee942