17 |
* along with WinPT; if not, write to the Free Software Foundation, |
* along with WinPT; if not, write to the Free Software Foundation, |
18 |
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
19 |
*/ |
*/ |
|
|
|
20 |
#ifndef WPT_CONTEXT_H |
#ifndef WPT_CONTEXT_H |
21 |
#define WPT_CONTEXT_H |
#define WPT_CONTEXT_H |
22 |
|
|
23 |
|
/* Window subclassing context. */ |
24 |
struct subclass_s { |
struct subclass_s { |
25 |
HWND dlg; |
HWND dlg; |
26 |
WNDPROC old; |
WNDPROC old; /* old window procedure */ |
27 |
WNDPROC current; |
WNDPROC current; /* the subclass window procedure */ |
28 |
void * opaque; |
void * opaque; |
29 |
}; |
}; |
30 |
|
|
31 |
|
/* Container for a gpgme key. */ |
32 |
struct winpt_key_s { |
struct winpt_key_s { |
33 |
const char * uid; |
const char *uid; /* pointer to the first uid */ |
34 |
const char * keyid; |
const char *keyid; /* pointer to the first keyid */ |
35 |
unsigned int key_pair:1; |
unsigned int key_pair:1; /* is a complete key. */ |
36 |
unsigned int is_protected:1; |
unsigned int is_protected:1; /* secret key is protected. */ |
37 |
unsigned int update:1; |
unsigned int update:1; /* 1=need to reload key. */ |
38 |
unsigned int is_v3:1; |
unsigned int is_v3:1; /* key is version 3 (RSA/MD5) */ |
39 |
unsigned int flags; |
unsigned int flags; |
40 |
gpgme_key_t ctx; |
gpgme_key_t ctx; /* if not NULL, the actualy gpgme key */ |
41 |
|
struct keycache_s *ext; /* extended key attributes or NULL. */ |
42 |
|
/* Callback structure if a listview needs to be updated. */ |
43 |
struct { |
struct { |
44 |
listview_ctrl_t ctl; |
listview_ctrl_t ctl; /* the listview control. */ |
45 |
int idx; |
int idx; /* selected index. */ |
46 |
int new_val; |
int new_val; /* new value */ |
47 |
} callback; |
} callback; |
48 |
}; |
}; |
49 |
typedef struct winpt_key_s * winpt_key_t; |
typedef struct winpt_key_s * winpt_key_t; |
50 |
|
|
51 |
|
/* Text input context for detached sigs. */ |
52 |
struct text_input_s { |
struct text_input_s { |
53 |
char * data; |
char *data; /* input data. */ |
54 |
size_t length; |
size_t length; /* length of input data. */ |
55 |
int type; |
int type; /* type of data (0=text data for signature) */ |
56 |
}; |
}; |
57 |
|
|
58 |
|
/* Date context for the date selection dialog. */ |
59 |
struct date_s { |
struct date_s { |
60 |
int cancel; |
int cancel; /* cancel was hit. */ |
61 |
const char * text; |
const char *text; /* text used as the title. */ |
62 |
SYSTEMTIME st; |
SYSTEMTIME st; /* selected time by the user. */ |
63 |
}; |
}; |
64 |
|
|
65 |
struct md_file_s { |
struct md_file_s { |
68 |
}; |
}; |
69 |
|
|
70 |
struct secdel_confirm_s { |
struct secdel_confirm_s { |
71 |
unsigned int yes:1; |
unsigned int yes:1; /* if yes=1 user confirmed delete. */ |
72 |
gpgme_recipients_t rset; |
listview_ctrl_t lv_files;/* listview control with the files to delete. */ |
73 |
}; |
}; |
74 |
|
|
|
struct import_status_s { |
|
|
int import_res[14]; |
|
|
unsigned int rev_cert:1; |
|
|
}; |
|
75 |
|
|
76 |
|
/* Progress filter context. */ |
77 |
struct progress_filter_s { |
struct progress_filter_s { |
78 |
HWND hwnd; |
HWND hwnd; |
79 |
HWND dlg; |
HWND dlg; |
80 |
HANDLE thread_hd; |
HANDLE thread_hd; |
81 |
int error; |
int error; |
82 |
const char * what; |
const char *what; |
83 |
int type; |
int type; |
84 |
unsigned curr; |
unsigned curr; |
85 |
unsigned total; |
unsigned total; |
86 |
}; |
}; |
87 |
|
|
88 |
|
/* URL context. */ |
89 |
struct URL_ctx_s { |
struct URL_ctx_s { |
90 |
const char *title; |
const char *title; /* title for the dialog. */ |
91 |
const char *desc; |
const char *desc; /* description of what to do. */ |
92 |
char url[256]; |
char url[256]; /* the selected URL. */ |
93 |
char proxy[64]; |
char proxy[64]; |
94 |
int port; |
int port; /* the port to use. */ |
95 |
int cancel; |
int cancel; /* user cancelled operation. */ |
96 |
int check; |
int check; /* use strict URL checking. */ |
97 |
}; |
}; |
98 |
|
|
99 |
struct first_start_s { |
struct first_start_s { |
100 |
int choice; |
int choice; |
101 |
}; |
}; |
102 |
|
|
103 |
|
/* Key generation context */ |
104 |
struct genkey_s { |
struct genkey_s { |
105 |
gpgme_key_t newkey; |
gpgme_key_t newkey; /* handle to the new key */ |
106 |
int interactive; |
int interactive; |
107 |
unsigned int first_start:1; |
unsigned int first_start:1; |
108 |
}; |
}; |
109 |
|
|
|
#endif /* WPT_CONTEXT_H */ |
|
110 |
|
#endif /* WPT_CONTEXT_H */ |