aboutsummaryrefslogtreecommitdiffstats
path: root/g10/kdb.h
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-10-29 09:18:13 +0000
committerNeal H. Walfield <[email protected]>2015-10-31 00:44:42 +0000
commit3ad5c815fddcd8403d5f9159a0fff3c84c066452 (patch)
treec0854476929442f9ad2639b5a2a036c641a2e3d0 /g10/kdb.h
parentgpg: Display the correct error message. (diff)
downloadgnupg-neal/next.tar.gz
gnupg-neal/next.zip
New key db.neal/next
Diffstat (limited to '')
-rw-r--r--g10/kdb.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/g10/kdb.h b/g10/kdb.h
new file mode 100644
index 000000000..55e6962e0
--- /dev/null
+++ b/g10/kdb.h
@@ -0,0 +1,29 @@
+#ifndef GNUPG_KDB_H
+#define GNUPG_KDB_H
+
+#include "keydb.h"
+
+typedef struct keydb_handle *KDB_HANDLE;
+
+gpg_error_t kdb_register_file (const char *fname, int read_only, void **ptr);
+int kdb_is_writable (void *token);
+
+KDB_HANDLE kdb_new (void *token);
+void kdb_release (KDB_HANDLE hd);
+void kdb_push_found_state (KDB_HANDLE hd);
+void kdb_pop_found_state (KDB_HANDLE hd);
+const char *kdb_get_resource_name (KDB_HANDLE hd);
+int kdb_lock (KDB_HANDLE hd, int yes);
+int kdb_get_keyblock (KDB_HANDLE hd, iobuf_t *iobuf,
+ int *pk_no, int *uid_no, u32 **sigstatus);
+int kdb_update_keyblock (KDB_HANDLE hd, kbnode_t kb,
+ const void *image, size_t imagelen);
+gpg_error_t kdb_insert_keyblock (KDB_HANDLE hd, kbnode_t kb,
+ const void *image, size_t imagelen,
+ u32 *sigstatus);
+int kdb_delete (KDB_HANDLE hd);
+int kdb_search_reset (KDB_HANDLE hd);
+int kdb_search (KDB_HANDLE hd, KEYDB_SEARCH_DESC *desc,
+ size_t ndesc, size_t *descindex);
+
+#endif