Slot Class Reference

Collaboration diagram for Slot:

Collaboration graph
[legend]
List of all members.

Detailed Description

this class simply reprsents the smart card reader (or 'slot' as Cryptoki calls it)


Public Member Functions

 Slot (const char *desc)
 ~Slot (void)
bool getTokenPresent (void)
CK_RV getInfo (CK_SLOT_INFO *infoOut)
CK_FLAGS getFlags (void)
CK_SLOT_ID getId ()
Session * openSession (CK_FLAGS flags, CK_VOID_PTR data, CK_NOTIFY notifyFunc)
void closeSession (Session *session)


Constructor & Destructor Documentation

Slot::Slot const char *  desc  ) 
 

Constructs this slot (the card reader, but Cryptoki calls it a Slot) given a description. The description is necessary for actually connecting

Slot::~Slot void   ) 
 

Does some memory cleanup. Isn't that what desctructors do?


Member Function Documentation

bool Slot::getTokenPresent void   ) 
 

tells you if the Token has been inserted or not. Currently this always returns true

Returns:
true always (but it's suppose to only be true if the token is in)

CK_RV Slot::getInfo CK_SLOT_INFO *  infoOut  ) 
 

Provides information back to cryptoki about this slot.

Parameters:
infoOut a pointer to the structure that will receive the information
Returns:
CKR_OK -- always

CK_FLAGS Slot::getFlags void   ) 
 

Getters for the vairous token fields

CK_SLOT_ID Slot::getId  ) 
 

end getters

Session * Slot::openSession CK_FLAGS  flags,
CK_VOID_PTR  data,
CK_NOTIFY  notifyFunc
 

creates a session for use by Crytpoki.

Parameters:
flags the paramaters to open the session with -- it should always be SERIAL_SESSION
data unused -- Cryptoki requires it for future use in detecting an inserted card
notifyFunc unused -- Cryptoki requires it for future use in detecting an inserted card
Returns:
an active Session. NULL if there was a problem

void Slot::closeSession Session *  session  ) 
 

closses an active session and removes it from future use

Parameters:
session the session to be closed


Generated on Fri Jan 12 15:48:46 2007 for NIST_PKCS11 by doxygen 1.3.1 using KingsTools