Show
Ignore:
Timestamp:
04/20/08 09:59:23 (9 months ago)
Author:
alonbl
Message:

Initial Plug&Play support

Add detect_readers() to reader opts.
Add sc_ctx_detect_readers() that calls readers' detect_readers().
Allow context to be created without readers.
Call sc_ctx_detect_readers() from PKCS#11 C_GetSlotList with NULL_PTR.

Since I broke ABI, I updated the external module version requirement
to match OpenSC version. In the future a separate version should be
maintaind for each interface, this should be unrelated to the package
version.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/alonbl/pnp/src/libopensc/reader-openct.c

    r3405 r3481  
    167167 
    168168/* 
     169 * We do not support Plug&Play here 
     170 */ 
     171static int openct_reader_detect_readers(sc_context_t *ctx, void *priv_data) 
     172{ 
     173        return SC_NO_ERROR; 
     174} 
     175 
     176/* 
    169177 * Called when releasing a reader.  release() has to 
    170178 * deallocate the private data.  Other fields will be 
     
    480488        openct_ops.init = openct_reader_init; 
    481489        openct_ops.finish = openct_reader_finish; 
     490        openct_ops.detect_readers = openct_reader_detect_readers; 
    482491        openct_ops.release = openct_reader_release; 
    483492        openct_ops.detect_card_presence = openct_reader_detect_card_presence;