libchipcard
5.0.2
Main Page
Related Pages
Modules
Files
File List
Globals
src
lib
client
base
client.h
Go to the documentation of this file.
1
/***************************************************************************
2
begin : Mon Mar 01 2004
3
copyright : (C) 2004-2010 by Martin Preuss
4
email : martin@libchipcard.de
5
6
***************************************************************************
7
* Please see toplevel file COPYING for license details *
8
***************************************************************************/
9
10
11
#ifndef CHIPCARD_CLIENT_CLIENT_H
12
#define CHIPCARD_CLIENT_CLIENT_H
13
14
18
19
#include <gwenhywfar/inherit.h>
20
#include <chipcard/chipcard.h>
21
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
#define LC_DEFAULT_SHORT_TIMEOUT 10
28
#define LC_DEFAULT_LONG_TIMEOUT 30
29
#define LC_DEFAULT_VERY_LONG_TIMEOUT 60
30
31
32
33
typedef
struct
LC_CLIENT
LC_CLIENT
;
34
GWEN_INHERIT_FUNCTION_LIB_DEFS(
LC_CLIENT
,
CHIPCARD_API
)
35
36
37
40
typedef enum {
41
LC_Client_ResultOk
=0,
42
LC_Client_ResultWait
,
43
LC_Client_ResultIpcError
,
44
LC_Client_ResultCmdError
,
45
LC_Client_ResultDataError
,
46
LC_Client_ResultAborted
,
47
LC_Client_ResultInvalid
,
48
LC_Client_ResultInternal
,
49
LC_Client_ResultGeneric
,
50
LC_Client_ResultNoData
,
51
LC_Client_ResultCardRemoved
,
52
LC_Client_ResultNotSupported
,
53
LC_Client_ResultCfgError
,
54
LC_Client_ResultNotFound
,
55
LC_Client_ResultIoError
,
56
LC_Client_ResultBadPin
,
57
LC_Client_ResultDontExecute
,
58
}
LC_CLIENT_RESULT
;
59
60
64
typedef
enum
{
65
LC_Client_CmdTargetCard
=0,
66
LC_Client_CmdTargetReader
67
}
LC_CLIENT_CMDTARGET
;
68
69
70
71
#ifdef __cplusplus
72
}
73
#endif
74
75
76
#include <chipcard/card.h>
77
78
79
#ifdef __cplusplus
80
extern
"C"
{
81
#endif
82
83
90
96
CHIPCARD_API
97
LC_CLIENT
*
LC_Client_new
(
const
char
*programName,
const
char
*programVersion);
98
103
CHIPCARD_API
104
void
LC_Client_free
(
LC_CLIENT
*cl);
105
112
CHIPCARD_API
113
LC_CLIENT_RESULT
LC_Client_Init
(
LC_CLIENT
*cl);
114
119
CHIPCARD_API
120
LC_CLIENT_RESULT
LC_Client_Fini
(
LC_CLIENT
*cl);
121
122
123
124
CHIPCARD_API
125
LC_CLIENT_RESULT
LC_Client_Start
(
LC_CLIENT
*cl);
126
127
CHIPCARD_API
128
LC_CLIENT_RESULT
LC_Client_Stop
(
LC_CLIENT
*cl);
129
130
131
CHIPCARD_API
132
LC_CLIENT_RESULT
LC_Client_GetNextCard
(
LC_CLIENT
*cl,
LC_CARD
**pCard,
int
timeout);
133
134
CHIPCARD_API
135
LC_CLIENT_RESULT
LC_Client_ReleaseCard
(
LC_CLIENT
*cl,
LC_CARD
*card);
136
137
144
/*{@*/
145
CHIPCARD_API
146
const
char
*
LC_Client_GetProgramName
(
const
LC_CLIENT
*cl);
147
148
CHIPCARD_API
149
const
char
*
LC_Client_GetProgramVersion
(
const
LC_CLIENT
*cl);
150
154
#ifdef __cplusplus
155
}
156
#endif
157
158
161
#endif
/* CHIPCARD_CLIENT_CLIENT_H */
162
163
164
Generated by
1.8.2