pcsc-lite
1.9.0
src
pcscd.h
Go to the documentation of this file.
1
/*
2
* MUSCLE SmartCard Development ( https://pcsclite.apdu.fr/ )
3
*
4
* Copyright (C) 2006-2011
5
* Ludovic Rousseau <ludovic.rousseau@free.fr>
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
9
* are met:
10
*
11
* 1. Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* 2. Redistributions in binary form must reproduce the above copyright
14
* notice, this list of conditions and the following disclaimer in the
15
* documentation and/or other materials provided with the distribution.
16
* 3. The name of the author may not be used to endorse or promote products
17
* derived from this software without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
36
#ifndef __pcscd_h__
37
#define __pcscd_h__
38
39
#define TIME_BEFORE_SUICIDE 60
40
41
#define SCARD_RESET 0x0001
42
#define SCARD_INSERTED 0x0002
43
#define SCARD_REMOVED 0x0004
45
#define PCSCLITE_CONFIG_DIR "/etc/reader.conf.d"
46
47
#define PCSCLITE_IPC_DIR USE_IPCDIR
48
#define PCSCLITE_RUN_PID PCSCLITE_IPC_DIR "/pcscd.pid"
49
50
#define PCSCLITE_CSOCK_NAME PCSCLITE_IPC_DIR "/pcscd.comm"
51
52
#define PCSCLITE_VERSION_NUMBER "1.9.0"
53
#define PCSCLITE_STATUS_POLL_RATE 400000
54
#define PCSCLITE_LOCK_POLL_RATE 100000
56
#define PCSC_MAX_CONTEXT_THREADS 200
57
#define PCSC_MAX_CONTEXT_CARD_HANDLES 200
58
#define PCSC_MAX_READER_HANDLES 200
59
60
#define PCSCLITE_STATUS_WAIT 200000
61
#define MAX_DEVICENAME 255
62
64
enum
65
{
66
POWER_STATE_UNPOWERED
,
67
POWER_STATE_POWERED
,
68
POWER_STATE_GRACE_PERIOD
,
69
POWER_STATE_IN_USE
70
};
71
73
#define PCSCLITE_POWER_OFF_GRACE_PERIOD 5*1000
/* 5 second */
74
77
#define PCSCLITE_STATUS_EVENT_TIMEOUT 10*60*1000
/* 10 minutes */
78
79
/* Uncomment the next line if you do NOT want to use auto power off */
80
/* #define DISABLE_ON_DEMAND_POWER_ON */
81
82
/* Uncomment the next line if you do not want the card to be powered on
83
* when inserted */
84
/* #define DISABLE_AUTO_POWER_ON */
85
86
#endif
POWER_STATE_UNPOWERED
@ POWER_STATE_UNPOWERED
auto power off
Definition:
pcscd.h:66
POWER_STATE_IN_USE
@ POWER_STATE_IN_USE
card is used
Definition:
pcscd.h:69
POWER_STATE_GRACE_PERIOD
@ POWER_STATE_GRACE_PERIOD
card was in use
Definition:
pcscd.h:68
POWER_STATE_POWERED
@ POWER_STATE_POWERED
powered
Definition:
pcscd.h:67
Generated on Fri Dec 31 2021 21:06:03 for pcsc-lite by
1.8.17