Show
Ignore:
Timestamp:
04/29/08 17:01:19 (9 months ago)
Author:
alonbl
Message:

Plug&Play support

This is not the best solution, but focus on smallest code change.

Changes:

1. Add detect_readers() to reader opts, this adds new readers to the end

of the readers list until list is full.

2. Add sc_ctx_detect_readers() that calls readers' detect_readers().

3. Fixup pcsc_lock() so that it reconnect to the card and report proper

error so caller may be notified if session was lost.

4. Allow context to be created without readers.

5. Call sc_ctx_detect_readers() from PKCS#11 C_GetSlotList with NULL_PTR.

6. Allow no reader at detect_card, as reader my be removed.

7. Since I broke ABI, I updated the external module version requirement

to match OpenSC version. In the future a separate version should be
maintained for each interface, this should be unrelated to the package
version.

Alon

---

svn merge -r 3480:3505 https://www.opensc-project.org/svn/opensc/branches/alonbl/pnp

M src/tools/opensc-tool.c
M src/pkcs11/pkcs11-global.c
M src/pkcs11/slot.c
M src/libopensc/reader-pcsc.c
M src/libopensc/internal-winscard.h
M src/libopensc/ctx.c
M src/libopensc/reader-ctapi.c
M src/libopensc/libopensc.exports
M src/libopensc/reader-openct.c
M src/libopensc/opensc.h

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/libopensc/internal-winscard.h

    r3460 r3506  
    5252 
    5353#define SCARD_S_SUCCESS                 0x00000000 /**< No error was encountered. */ 
     54#define SCARD_E_INVALID_HANDLE          0x80100003 /**< The supplied handle was invalid. */ 
    5455#define SCARD_E_TIMEOUT                 0x8010000A /**< The user-specified timeout value has expired. */ 
    5556#define SCARD_E_SHARING_VIOLATION       0x8010000B /**< The smart card cannot be accessed because of other connections outstanding. */ 
    5657#define SCARD_E_NOT_TRANSACTED          0x80100016 /**< An attempt was made to end a non-existent transaction. */ 
     58#define SCARD_E_READER_UNAVAILABLE      0x80100017 /**< The specified reader is not currently available for use. */ 
    5759#define SCARD_E_NO_READERS_AVAILABLE    0x8010002E /**< Cannot find a smart card reader. */ 
    5860#define SCARD_W_UNRESPONSIVE_CARD       0x80100066 /**< The smart card is not responding to a reset. */