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/opensc.h

    r3304 r3481  
    374374         * deallocate the private data and any resources. */ 
    375375        int (*finish)(struct sc_context *ctx, void *priv_data); 
     376        /* Called when library wish to detect new readers 
     377         * should add only new readers. */ 
     378        int (*detect_readers)(struct sc_context *ctx, void *priv_data); 
    376379        /* Called when releasing a reader.  release() has to 
    377380         * deallocate the private data.  Other fields will be 
     
    726729 */ 
    727730int sc_release_context(sc_context_t *ctx); 
     731 
     732/** 
     733 * Detect new readers available on system. 
     734 * @param  ctx  OpenSC context 
     735 * @return SC_SUCCESS on success and an error code otherwise. 
     736 */ 
     737int sc_ctx_detect_readers(sc_context_t *ctx); 
    728738 
    729739/**