pcsc-lite  1.7.4
pcscd.h
Go to the documentation of this file.
00001 /*
00002  * MUSCLE SmartCard Development ( http://www.linuxnet.com )
00003  *
00004  * Copyright (C) 2006-2009
00005  *  Ludovic Rousseau <ludovic.rousseau@free.fr>
00006  *
00007  * $Id$
00008  */
00009 
00015 #ifndef __pcscd_h__
00016 #define __pcscd_h__
00017 
00018 #define TIME_BEFORE_SUICIDE 60
00019 
00020 #define SCARD_SCOPE_GLOBAL      0x0003  
00022 #define SCARD_RESET         0x0001  
00023 #define SCARD_INSERTED          0x0002  
00024 #define SCARD_REMOVED           0x0004  
00026 #define PCSCLITE_CONFIG_DIR     "/etc/reader.conf.d"
00027 
00028 #define PCSCLITE_IPC_DIR        USE_IPCDIR
00029 #define PCSCLITE_RUN_PID        PCSCLITE_IPC_DIR "/pcscd.pid"
00030 
00031 #define PCSCLITE_CSOCK_NAME     PCSCLITE_IPC_DIR "/pcscd.comm"
00032 
00033 #define PCSCLITE_SVC_IDENTITY       0x01030000  
00035 #define PCSCLITE_VERSION_NUMBER     "1.7.4" 
00036 #define PCSCLITE_STATUS_POLL_RATE   400000      
00037 #define PCSCLITE_LOCK_POLL_RATE     100000      
00039 #define PCSC_MAX_CONTEXT_THREADS 200
00040 #define PCSC_MAX_CONTEXT_CARD_HANDLES 200
00041 #define PCSC_MAX_READER_HANDLES 200
00042 
00043 #define PCSCLITE_STATUS_WAIT        200000  
00044 #define MAX_DEVICENAME      255
00045 
00046 #define MAX_BUFFER_SIZE         264 
00047 #define MAX_BUFFER_SIZE_EXTENDED    (4 + 3 + (1<<16) + 3)   
00050 enum
00051 {
00052     POWER_STATE_UNPOWERED,  
00053     POWER_STATE_POWERED,    
00054     POWER_STATE_GRACE_PERIOD,   
00055     POWER_STATE_INUSE       
00056 };
00057 
00059 #define PCSCLITE_POWER_OFF_GRACE_PERIOD 5*1000 /* 5 second */
00060 
00063 #define PCSCLITE_STATUS_EVENT_TIMEOUT 10*60*1000 /* 10 minutes */
00064 
00065 /* Uncomment the next line if you do NOT want to use auto power off */
00066 /* #define DISABLE_ON_DEMAND_POWER_ON */
00067 
00068 /* Uncomment the next line if you do not want the card to be powered on
00069  * when inserted */
00070 /* #define DISABLE_AUTO_POWER_ON */
00071 
00072 #endif