Changeset 170

Show
Ignore:
Timestamp:
10/26/09 14:58:26 (9 months ago)
Author:
lrousseau
Message:

add waitForSlotEvent()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pykcs11/trunk/PyKCS11/__init__.py

    r163 r170  
    484484        return i 
    485485 
     486    def waitForSlotEvent(self, flags = 0): 
     487        """ 
     488        C_WaitForSlotEvent 
     489 
     490        @param flags: 0 (default) or CKF_DONT_BLOCK 
     491        @type flags: integer 
     492        @return: slot 
     493        @rtype: integer 
     494        """ 
     495        tmp = 0 
     496        (rv, slot) = self.lib.C_WaitForSlotEvent(flags, tmp) 
     497        if rv != CKR_OK: 
     498            raise PyKCS11Error(rv) 
     499 
     500        return slot 
     501 
    486502class Mechanism(object): 
    487503    """Wraps CK_MECHANISM""" 
  • pykcs11/trunk/src/pkcs11lib.h

    r117 r170  
    281281        CK_RV C_WaitForSlotEvent( 
    282282                unsigned long flags, 
    283                 unsigned long* pSlot); 
     283                unsigned long * INOUT); 
    284284 
    285285        CK_RV C_GetMechanismList( 
(C) 2006 bit4id srl, for informations please contact info@bit4id.com
visitors since August 21, 2006