summaryrefslogtreecommitdiff
path: root/trust/session.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-14 21:08:01 +0100
committerStef Walter <stefw@gnome.org>2013-03-15 18:00:10 +0100
commit2d75eb32793a569dc3de359bb623713c80393d24 (patch)
treeaa62978bc970d95082769c9725325d31cc413058 /trust/session.c
parentd7d68de6c9de9190c85da36b731e61ae3421a811 (diff)
downloadp11-kit-2d75eb32793a569dc3de359bb623713c80393d24.tar.gz
trust: Add a builder which builds objects out of parsed data
The builder completes the objects from the parsed data and takes over the responsibilities that the parser and adapter previously shared. This is necessary to prepare for arbitrary data coming from the p11-kit specific input files. https://bugs.freedesktop.org/show_bug.cgi?id=62329
Diffstat (limited to 'trust/session.c')
-rw-r--r--trust/session.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/trust/session.c b/trust/session.c
index 30928ed..19434ff 100644
--- a/trust/session.c
+++ b/trust/session.c
@@ -58,7 +58,12 @@ p11_session_new (p11_token *token)
session->handle = p11_module_next_id ();
- session->index = p11_index_new (NULL, NULL, NULL);
+ session->builder = p11_builder_new (P11_BUILDER_FLAG_NONE);
+ return_val_if_fail (session->builder, NULL);
+
+ session->index = p11_index_new (p11_builder_build,
+ p11_builder_changed,
+ session->builder);
return_val_if_fail (session->index != NULL, NULL);
session->token = token;