michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef NSSCKFW_H michael@0: #define NSSCKFW_H michael@0: michael@0: /* michael@0: * nssckfw.h michael@0: * michael@0: * This file prototypes the publicly available calls of the michael@0: * NSS Cryptoki Framework. michael@0: */ michael@0: michael@0: #ifndef NSSBASET_H michael@0: #include "nssbaset.h" michael@0: #endif /* NSSBASET_H */ michael@0: michael@0: #ifndef NSSCKT_H michael@0: #include "nssckt.h" michael@0: #endif /* NSSCKT_H */ michael@0: michael@0: #ifndef NSSCKFWT_H michael@0: #include "nssckfwt.h" michael@0: #endif /* NSSCKFWT_H */ michael@0: michael@0: /* michael@0: * NSSCKFWInstance michael@0: * michael@0: * NSSCKFWInstance_GetMDInstance michael@0: * NSSCKFWInstance_GetArena michael@0: * NSSCKFWInstance_MayCreatePthreads michael@0: * NSSCKFWInstance_CreateMutex michael@0: * NSSCKFWInstance_GetConfigurationData michael@0: */ michael@0: michael@0: /* michael@0: * NSSCKFWInstance_GetMDInstance michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDInstance * michael@0: NSSCKFWInstance_GetMDInstance michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWInstance_GetArena michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSArena * michael@0: NSSCKFWInstance_GetArena michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWInstance_MayCreatePthreads michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_BBOOL michael@0: NSSCKFWInstance_MayCreatePthreads michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWInstance_CreateMutex michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKFWMutex * michael@0: NSSCKFWInstance_CreateMutex michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSArena *arena, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWInstance_GetConfigurationData michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSUTF8 * michael@0: NSSCKFWInstance_GetConfigurationData michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWInstance_GetInitArgs michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_C_INITIALIZE_ARGS_PTR michael@0: NSSCKFWInstance_GetInitArgs michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSlot michael@0: * michael@0: * NSSCKFWSlot_GetMDSlot michael@0: * NSSCKFWSlot_GetFWInstance michael@0: * NSSCKFWSlot_GetMDInstance michael@0: * michael@0: */ michael@0: michael@0: /* michael@0: * NSSCKFWSlot_GetMDSlot michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDSlot * michael@0: NSSCKFWSlot_GetMDSlot michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSlot_GetFWInstance michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKFWInstance * michael@0: NSSCKFWSlot_GetFWInstance michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSlot_GetMDInstance michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDInstance * michael@0: NSSCKFWSlot_GetMDInstance michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWToken michael@0: * michael@0: * NSSCKFWToken_GetMDToken michael@0: * NSSCKFWToken_GetFWSlot michael@0: * NSSCKFWToken_GetMDSlot michael@0: * NSSCKFWToken_GetSessionState michael@0: * michael@0: */ michael@0: michael@0: /* michael@0: * NSSCKFWToken_GetMDToken michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDToken * michael@0: NSSCKFWToken_GetMDToken michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWToken_GetArena michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSArena * michael@0: NSSCKFWToken_GetArena michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWToken_GetFWSlot michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKFWSlot * michael@0: NSSCKFWToken_GetFWSlot michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWToken_GetMDSlot michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDSlot * michael@0: NSSCKFWToken_GetMDSlot michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWToken_GetSessionState michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_STATE michael@0: NSSCKFWToken_GetSessionState michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWMechanism michael@0: * michael@0: * NSSKCFWMechanism_GetMDMechanism michael@0: * NSSCKFWMechanism_GetParameter michael@0: * michael@0: */ michael@0: michael@0: /* michael@0: * NSSKCFWMechanism_GetMDMechanism michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDMechanism * michael@0: NSSCKFWMechanism_GetMDMechanism michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWMechanism_GetParameter michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSItem * michael@0: NSSCKFWMechanism_GetParameter michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSession michael@0: * michael@0: * NSSCKFWSession_GetMDSession michael@0: * NSSCKFWSession_GetArena michael@0: * NSSCKFWSession_CallNotification michael@0: * NSSCKFWSession_IsRWSession michael@0: * NSSCKFWSession_IsSO michael@0: * NSSCKFWSession_GetCurrentCryptoOperation michael@0: * michael@0: */ michael@0: michael@0: /* michael@0: * NSSCKFWSession_GetMDSession michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDSession * michael@0: NSSCKFWSession_GetMDSession michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSession_GetArena michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSArena * michael@0: NSSCKFWSession_GetArena michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSession_CallNotification michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_RV michael@0: NSSCKFWSession_CallNotification michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_NOTIFICATION event michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSession_IsRWSession michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_BBOOL michael@0: NSSCKFWSession_IsRWSession michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSession_IsSO michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_BBOOL michael@0: NSSCKFWSession_IsSO michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSession_GetCurrentCryptoOperation michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKFWCryptoOperation * michael@0: NSSCKFWSession_GetCurrentCryptoOperation michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWCryptoOperationState state michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject michael@0: * michael@0: * NSSCKFWObject_GetMDObject michael@0: * NSSCKFWObject_GetArena michael@0: * NSSCKFWObject_IsTokenObject michael@0: * NSSCKFWObject_GetAttributeCount michael@0: * NSSCKFWObject_GetAttributeTypes michael@0: * NSSCKFWObject_GetAttributeSize michael@0: * NSSCKFWObject_GetAttribute michael@0: * NSSCKFWObject_GetObjectSize michael@0: */ michael@0: michael@0: /* michael@0: * NSSCKFWObject_GetMDObject michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKMDObject * michael@0: NSSCKFWObject_GetMDObject michael@0: ( michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject_GetArena michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSArena * michael@0: NSSCKFWObject_GetArena michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject_IsTokenObject michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: NSSCKFWObject_IsTokenObject michael@0: ( michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject_GetAttributeCount michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: NSSCKFWObject_GetAttributeCount michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject_GetAttributeTypes michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: NSSCKFWObject_GetAttributeTypes michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_ATTRIBUTE_TYPE_PTR typeArray, michael@0: CK_ULONG ulCount michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject_GetAttributeSize michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: NSSCKFWObject_GetAttributeSize michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_ATTRIBUTE_TYPE attribute, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject_GetAttribute michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSItem * michael@0: NSSCKFWObject_GetAttribute michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_ATTRIBUTE_TYPE attribute, michael@0: NSSItem *itemOpt, michael@0: NSSArena *arenaOpt, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject_GetObjectSize michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: NSSCKFWObject_GetObjectSize michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWFindObjects michael@0: * michael@0: * NSSCKFWFindObjects_GetMDFindObjects michael@0: * michael@0: */ michael@0: michael@0: /* michael@0: * NSSCKFWFindObjects_GetMDFindObjects michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDFindObjects * michael@0: NSSCKFWFindObjects_GetMDFindObjects michael@0: ( michael@0: NSSCKFWFindObjects * michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWMutex michael@0: * michael@0: * NSSCKFWMutex_Destroy michael@0: * NSSCKFWMutex_Lock michael@0: * NSSCKFWMutex_Unlock michael@0: * michael@0: */ michael@0: michael@0: /* michael@0: * NSSCKFWMutex_Destroy michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_RV michael@0: NSSCKFWMutex_Destroy michael@0: ( michael@0: NSSCKFWMutex *mutex michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWMutex_Lock michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_RV michael@0: NSSCKFWMutex_Lock michael@0: ( michael@0: NSSCKFWMutex *mutex michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWMutex_Unlock michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN CK_RV michael@0: NSSCKFWMutex_Unlock michael@0: ( michael@0: NSSCKFWMutex *mutex michael@0: ); michael@0: michael@0: #endif /* NSSCKFW_H */ michael@0: