1 |
/* wptContext.h - Internal file to store private contexts |
2 |
* Copyright (C) 2001-2005 Timo Schulz |
3 |
* |
4 |
* This file is part of WinPT. |
5 |
* |
6 |
* WinPT 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 2 of the License, or |
9 |
* (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 |
14 |
* GNU General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
17 |
* along with WinPT; if not, write to the Free Software Foundation, |
18 |
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
19 |
*/ |
20 |
|
21 |
#ifndef WPT_CONTEXT_H |
22 |
#define WPT_CONTEXT_H |
23 |
|
24 |
struct subclass_s { |
25 |
HWND dlg; |
26 |
WNDPROC old; |
27 |
WNDPROC current; |
28 |
void * opaque; |
29 |
}; |
30 |
|
31 |
struct winpt_key_s { |
32 |
const char * uid; |
33 |
const char * keyid; |
34 |
unsigned int key_pair:1; |
35 |
unsigned int is_protected:1; |
36 |
unsigned int update:1; |
37 |
unsigned int is_v3:1; |
38 |
unsigned int flags; |
39 |
gpgme_key_t ctx; |
40 |
struct { |
41 |
listview_ctrl_t ctl; |
42 |
int idx; |
43 |
int new_val; |
44 |
} callback; |
45 |
}; |
46 |
typedef struct winpt_key_s * winpt_key_t; |
47 |
|
48 |
struct text_input_s { |
49 |
char * data; |
50 |
size_t length; |
51 |
int type; |
52 |
}; |
53 |
|
54 |
struct date_s { |
55 |
int cancel; |
56 |
const char * text; |
57 |
SYSTEMTIME st; |
58 |
}; |
59 |
|
60 |
struct md_file_s { |
61 |
int mdalgo; |
62 |
listview_ctrl_t lv; |
63 |
}; |
64 |
|
65 |
struct secdel_confirm_s { |
66 |
unsigned int yes:1; |
67 |
gpgme_recipients_t rset; |
68 |
}; |
69 |
|
70 |
struct import_status_s { |
71 |
int import_res[14]; |
72 |
unsigned int rev_cert:1; |
73 |
}; |
74 |
|
75 |
struct progress_filter_s { |
76 |
HWND hwnd; |
77 |
HWND dlg; |
78 |
HANDLE thread_hd; |
79 |
int error; |
80 |
const char * what; |
81 |
int type; |
82 |
unsigned curr; |
83 |
unsigned total; |
84 |
}; |
85 |
|
86 |
|
87 |
struct URL_ctx_s { |
88 |
const char *title; |
89 |
const char *desc; |
90 |
char url[256]; |
91 |
char proxy[64]; |
92 |
int port; |
93 |
int cancel; |
94 |
int check; |
95 |
}; |
96 |
|
97 |
struct first_start_s { |
98 |
int choice; |
99 |
}; |
100 |
|
101 |
struct genkey_s { |
102 |
gpgme_key_t newkey; |
103 |
int interactive; |
104 |
unsigned int first_start:1; |
105 |
}; |
106 |
|
107 |
#endif /* WPT_CONTEXT_H */ |