From c1e30395d8f4551a5f0fa253eefeefc9a9154f7e Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 8 Dec 2008 20:34:49 +0000 Subject: Support the concept of read-write and read-only sessions. --- ckcapi-session.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ckcapi-session.h') diff --git a/ckcapi-session.h b/ckcapi-session.h index 4fb68fa..7b71c07 100644 --- a/ckcapi-session.h +++ b/ckcapi-session.h @@ -34,6 +34,8 @@ typedef struct _CkCapiSession HCERTSTORE store; /* Handle to an open certificate store */ + BOOL read_write; /* A read-write session? */ + int operation_type; /* Whether an operation is happening or not */ void* operation_data; /* Data for this operation */ CkCapiSessionCancel operation_cancel; /* Callback to cancel operation when necessary */ @@ -62,9 +64,12 @@ void ckcapi_session_destroy (CkCapiSession* sess); CK_RV ckcapi_session_register (CkCapiSession* sess); /* Get a session from a handle, and lock it */ -CK_RV ckcapi_session_get_lock_ref (CK_ULONG id, int remove, +CK_RV ckcapi_session_get_lock_ref (CK_ULONG id, BOOL writable, CkCapiSession **sess); +/* Get a session from a handle, remove it from list, and lock it */ +CK_RV ckcapi_session_remove_lock_ref (CK_ULONG id, CkCapiSession **sess); + /* Unlock and unreference a session */ void ckcapi_session_unref_unlock (CkCapiSession* sess); -- cgit v1.2.3