Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

pcscd.h

Go to the documentation of this file.
/*
 * MUSCLE SmartCard Development ( http://www.linuxnet.com )
 *
 * Copyright (C) 2006-2009
 *  Ludovic Rousseau <ludovic.rousseau@free.fr>
 *
 * $Id$
 */

/**
 * @file
 * @brief This keeps a list of defines for pcsc-lite.
 */

#ifndef __pcscd_h__
#define __pcscd_h__

#define TIME_BEFORE_SUICIDE 60

00020 #define SCARD_SCOPE_GLOBAL          0x0003      /**< Scope is global */

00022 #define SCARD_RESET                 0x0001      /**< Card was reset */
00023 #define SCARD_INSERTED              0x0002      /**< Card was inserted */
00024 #define SCARD_REMOVED               0x0004      /**< Card was removed */

#define PCSCLITE_CONFIG_DIR         "/etc/reader.conf.d"

#define PCSCLITE_IPC_DIR            USE_IPCDIR
#define PCSCLITE_RUN_PID            PCSCLITE_IPC_DIR "/pcscd.pid"

#define PCSCLITE_CSOCK_NAME         PCSCLITE_IPC_DIR "/pcscd.comm"

00033 #define PCSCLITE_SVC_IDENTITY       0x01030000  /**< Service ID */

00035 #define PCSCLITE_VERSION_NUMBER           "1.6.7"     /**< Current version */
00036 #define PCSCLITE_STATUS_POLL_RATE   400000            /**< Status polling rate */
00037 #define PCSCLITE_LOCK_POLL_RATE           100000            /**< Lock polling rate */

#define PCSC_MAX_CONTEXT_THREADS 200
#define PCSC_MAX_CONTEXT_CARD_HANDLES 200
#define PCSC_MAX_READER_HANDLES 200

00043 #define PCSCLITE_STATUS_WAIT        200000      /**< Status Change Sleep */
#define MAX_DEVICENAME        255

00046 #define MAX_BUFFER_SIZE             264   /**< Maximum Tx/Rx Buffer for get/set attributes */
00047 #define MAX_BUFFER_SIZE_EXTENDED    (4 + 3 + (1<<16) + 3)   /**< max APDU (64K + APDU + Lc + Le) Tx/Rx Buffer */

/** Different values for struct ReaderContext powerState field */
enum
{
00052       POWER_STATE_UNPOWERED,  /**< auto power off */
00053       POWER_STATE_POWERED,    /**< powered */
00054       POWER_STATE_GRACE_PERIOD,     /**< card was in use */
00055       POWER_STATE_INUSE       /**< card is used */
};

/** time to wait before powering down an unused card */
00059 #define PCSCLITE_POWER_OFF_GRACE_PERIOD 5*1000 /* 5 second */

/** normal timeout for pthCardEvent driver function when
 * no card or card in use */
00063 #define PCSCLITE_STATUS_EVENT_TIMEOUT 10*60*1000 /* 10 minutes */

/* Uncomment the next line if you do NOT want to use auto power off */
/* #define DISABLE_ON_DEMAND_POWER_ON */

/* Uncomment the next line if you do not want the card to be powered on
 * when inserted */
/* #define DISABLE_AUTO_POWER_ON */

#endif

Generated by  Doxygen 1.6.0   Back to index