diff options
author | Stef Walter <stef@thewalter.net> | 2013-06-28 13:00:02 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2013-07-03 10:29:24 +0200 |
commit | 7bb9ad33da0154c9a4317f0123046eee85738349 (patch) | |
tree | a765e4aa3f7ccfe4151eaeb4b9b334847ce97d62 /p11-kit/iter.h | |
parent | 7eabbee227f09cc4ff9e472520f03bba1e35596b (diff) | |
download | p11-kit-7bb9ad33da0154c9a4317f0123046eee85738349.tar.gz |
iter: Add iteration mode where session is not busy
In order to use the session we are iterating on for other tasks
such as other C_FindObject() calls, we need to make sure that
it's not in the middle of a find operation. Finish up the
complete find operation in advance of returning objects from
a session.
Make this the default mode. The previous behavior remains
as an option. Add tests.
Diffstat (limited to 'p11-kit/iter.h')
-rw-r--r-- | p11-kit/iter.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/p11-kit/iter.h b/p11-kit/iter.h index 2b87273..d8534ec 100644 --- a/p11-kit/iter.h +++ b/p11-kit/iter.h @@ -47,11 +47,16 @@ extern "C" { typedef struct p11_kit_iter P11KitIter; +typedef enum { + P11_KIT_ITER_BUSY_SESSIONS = 1 << 1, +} P11KitIterBehavior; + typedef CK_RV (* p11_kit_iter_callback) (P11KitIter *iter, CK_BBOOL *matches, void *data); -P11KitIter * p11_kit_iter_new (P11KitUri *uri); +P11KitIter * p11_kit_iter_new (P11KitUri *uri, + P11KitIterBehavior behavior); void p11_kit_iter_free (P11KitIter *iter); |