1 /* keyring.h - Keyring operations
2 * Copyright (C) 2001 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * GnuPG is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * GnuPG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #define GPG_KEYRING_H 1
24 typedef struct keyring_handle
*KEYRING_HANDLE
;
26 int keyring_register_filename (const char *fname
, int secret
, int readonly
,
28 int keyring_is_writable (void *token
);
30 KEYRING_HANDLE
keyring_new (void *token
, int secret
);
31 void keyring_release (KEYRING_HANDLE hd
);
32 const char *keyring_get_resource_name (KEYRING_HANDLE hd
);
33 int keyring_lock (KEYRING_HANDLE hd
, int yes
);
34 int keyring_get_keyblock (KEYRING_HANDLE hd
, KBNODE
*ret_kb
);
35 int keyring_update_keyblock (KEYRING_HANDLE hd
, KBNODE kb
);
36 int keyring_insert_keyblock (KEYRING_HANDLE hd
, KBNODE kb
);
37 int keyring_locate_writable (KEYRING_HANDLE hd
);
38 int keyring_delete_keyblock (KEYRING_HANDLE hd
);
39 int keyring_search_reset (KEYRING_HANDLE hd
);
40 int keyring_search (KEYRING_HANDLE hd
, KEYDB_SEARCH_DESC
*desc
,
41 size_t ndesc
, size_t *descindex
);
42 int keyring_rebuild_cache (void *token
,int noisy
);
44 #endif /*GPG_KEYRING_H*/