/[winpt]/trunk/Include/wptKeyManager.h
ViewVC logotype

Contents of /trunk/Include/wptKeyManager.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 335 - (show annotations)
Sun Nov 27 12:20:21 2011 UTC (13 years, 3 months ago) by twoaday
File MIME type: text/plain
File size: 2958 byte(s)


1 /* wptKeyManager.h - Key manager
2 * Copyright (C) 2001-2006 Timo Schulz
3 *
4 * This file is part of WinPT.
5 *
6 * WinPT is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * WinPT 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 GNU
14 * General Public License for more details.
15 */
16
17 #ifndef WPT_KEYMANAGER_H
18 #define WPT_KEYMANAGER_H
19
20 #include "wptContext.h"
21
22 #define send_cmd_id(hwnd, id) \
23 PostMessage ((hwnd), WM_COMMAND, MAKEWPARAM ((id), 0), 0)
24
25 #define KM_PRELOAD_KEYS 6
26
27 /* possible key flags. */
28 enum km_flag_t {
29 KM_FLAG_REVOKED = 0x01,
30 KM_FLAG_EXPIRED = 0x02,
31 KM_FLAG_DISABLED = 0x04,
32 };
33
34
35 enum km_ks_t {
36 KM_KS_REFRESH = 0x01
37 };
38
39 struct km_group_s {
40 config_file_t gh;
41 HWND tree;
42 unsigned int need_sync:1;
43 char *cfgfile;
44 };
45 typedef struct km_group_s * km_group_t;
46
47 struct km_group_cb_s {
48 km_group_s *gc;
49 char name[256];
50 int use_name;
51 };
52
53
54 /*-- wptClipImportDlg.cpp --*/
55 int print_import_status (gpgme_import_result_t res);
56
57 /*-- wptKeyManager.cpp --*/
58 int km_check_for_seckey (keylist_ctrl_t kl, int pos, int *utrust);
59 int km_check_key_status (keylist_ctrl_t kl, int pos);
60 int km_get_key_status (keylist_ctrl_t kl, int pos);
61 char* km_key_get_info (winpt_key_t key, int is_sec);
62 int km_clip_export( HWND dlg, keylist_ctrl_t kl);
63 int km_file_export( HWND dlg, keylist_ctrl_t kl, const char *fname );
64 int km_privkey_export(HWND dlg, keylist_ctrl_t kl, const char *fname );
65 int km_set_implicit_trust (HWND dlg, keylist_ctrl_t kl, int pos);
66 int km_clip_import (HWND dlg, int *r_newkeys, int *r_newsks);
67 int km_file_import (HWND dlg, const char *fname,
68 int *r_newkeys, int *r_newsks);
69 int km_http_import (HWND dlg, const char * url);
70 int km_dropped_file_import (HWND dlg, HDROP hdrop,
71 int *r_newkeys, int *r_newsks);
72 int km_delete_keys( keylist_ctrl_t kl, HWND dlg );
73 int km_send_to_keyserver (keylist_ctrl_t kl, HWND dlg, const char *host,
74 unsigned short port);
75 int km_send_to_mail_recipient (keylist_ctrl_t kl, HWND dlg);
76 int km_refresh_from_keyserver (keylist_ctrl_t kl, HWND dlg);
77 int km_check_if_protected (keylist_ctrl_t kl, int pos);
78 int km_enable_disable_key (keylist_ctrl_t kl, HWND dlg, int pos, int enable);
79 void km_set_clip_info (const char *uid);
80 int km_key_is_v3 (keylist_ctrl_t kl, int pos);
81 void km_find_key (HWND dlg, keylist_ctrl_t kl);
82 char* km_gen_export_filename (const char *keyid, int is_secret);
83 int km_get_key (keylist_ctrl_t kl, int pos, winpt_key_t k);
84 gpgme_key_t km_get_key_ptr (keylist_ctrl_t kl, int idx,
85 struct keycache_s **r_ctx);
86 void km_key_show_revoc_info (winpt_key_t k);
87
88 #endif /* WPT_KEYMANAGER_H */

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26