source: trunk/csctapi/pps.h@ 1288

Last change on this file since 1288 was 1288, checked in by dingo35, 11 years ago

Remove dynamic datastructure PPS

File size: 1.8 KB
Line 
1/*
2 pps.h
3 Protocol Parameters Selection
4
5 This file is part of the Unix driver for Towitoko smartcard readers
6 Copyright (C) 2000 2001 Carlos Prados <cprados@yahoo.com>
7
8 This version is modified by doz21 to work in a special manner ;)
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25#ifndef _PPS_
26#define _PPS_
27
28#include "defines.h"
29#include "icc_async.h"
30
31/*
32 * Exported constants definition
33 */
34
35#define PPS_OK 0 /* Negotiation OK */
36#define PPS_ICC_ERROR 1 /* Comunication error */
37#define PPS_HANDSAKE_ERROR 2 /* Agreement not reached */
38#define PPS_PROTOCOL_ERROR 3 /* Error starting protocol */
39#define PPS_MAX_LENGTH 6
40/*
41 * Exported data types definition
42 */
43
44typedef struct
45{
46 BYTE FI;
47 double d;
48 double n;
49 BYTE t;
50}
51PPS_ProtocolParameters;
52
53void *protocol;
54PPS_ProtocolParameters parameters;
55
56/*
57 * Exported functions declaration
58 */
59
60/* Create PPS context */
61extern void PPS_New ();
62
63/* Perform protcol type selection and return confirm */
64extern int PPS_Perform (BYTE * params, unsigned *length);
65
66/* Get protocol parameters */
67extern PPS_ProtocolParameters *PPS_GetProtocolParameters ();
68
69#endif /* _PPS_ */
Note: See TracBrowser for help on using the repository browser.