21 |
#ifndef GPGOE_H |
#ifndef GPGOE_H |
22 |
#define GPGOE_H |
#define GPGOE_H |
23 |
|
|
|
#ifdef __cplusplus |
|
|
extern "C" { |
|
|
#endif |
|
|
|
|
24 |
/* dummy until gettext support is finished. */ |
/* dummy until gettext support is finished. */ |
25 |
#define _(X) (X) |
#define _(X) (X) |
26 |
|
|
27 |
#include <malloc.h> |
#include <malloc.h> |
28 |
/* wrapper around free. */ |
/* wrapper around free. */ |
29 |
#define free_if_alloc(ptr) \ |
#define free_if_alloc(ptr) \ |
30 |
do { \ |
do { \ |
31 |
if (ptr) free (ptr); \ |
if (ptr) free (ptr); \ |
32 |
ptr = NULL; \ |
ptr = NULL; \ |
33 |
} while (0) |
} while (0) |
34 |
|
|
35 |
|
|
36 |
/* Wrapper for memory deallocation but overwrite the buffer before. |
/* Wrapper for memory deallocation but overwrite the buffer before. |
57 |
#define OF_IDOK 1 |
#define OF_IDOK 1 |
58 |
#define OF_IDFILE 1152 |
#define OF_IDFILE 1152 |
59 |
|
|
|
/* Config dialog id's */ |
|
|
#define ID_OE5_CFGENCRYPT 1053 |
|
|
#define ID_OE5_CFGSIGN 1052 |
|
|
#define ID_OE5_CFGDETAILS 2118 |
|
|
#define ID_OE5_CFGUID 2112 |
|
|
#define ID_OE5_UIDREQ 2117 |
|
|
|
|
60 |
|
|
61 |
/* Context for the recipient list. */ |
/* Context for the recipient list. */ |
62 |
struct recip_list_s { |
struct recip_list_s { |
77 |
int encrypt; |
int encrypt; |
78 |
recip_list_t rset; |
recip_list_t rset; |
79 |
char errbuf[256]; |
char errbuf[256]; |
80 |
|
char *orig_text; |
81 |
}; |
}; |
82 |
typedef struct plugin_ctx_s *plugin_ctx_t; |
typedef struct plugin_ctx_s *plugin_ctx_t; |
83 |
|
|
88 |
typedef struct viewer_ctx_s *viewer_ctx_t; |
typedef struct viewer_ctx_s *viewer_ctx_t; |
89 |
|
|
90 |
|
|
91 |
|
/*-- GPGOE.c --*/ |
92 |
|
/*EXPORT*/ int gpgoe_initialize (void); |
93 |
|
/*EXPORT*/ int gpgoe_remove (void); |
94 |
|
|
95 |
/*-- OEProc.c --*/ |
/*-- OEProc.c --*/ |
96 |
extern HINSTANCE mod_hinst_dll; |
extern HINSTANCE mod_hinst_dll; |
97 |
extern WNDPROC oe_proc_old; |
extern WNDPROC oe_proc_old; |
98 |
LRESULT CALLBACK oe_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); |
LRESULT CALLBACK oe_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); |
99 |
|
|
|
/*-- GPGOE.c --*/ |
|
|
int gpgoe_initialize (void); |
|
|
int gpgoe_remove (void); |
|
|
|
|
100 |
/*-- OECrypto.c --*/ |
/*-- OECrypto.c --*/ |
101 |
gpgme_error_t oe_handle_mail (plugin_ctx_t ctx); |
gpgme_error_t oe_handle_mail (plugin_ctx_t ctx); |
102 |
|
|
116 |
LPARAM lparam); |
LPARAM lparam); |
117 |
BOOL CALLBACK verify_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, |
BOOL CALLBACK verify_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, |
118 |
LPARAM lparam); |
LPARAM lparam); |
|
BOOL CALLBACK pass_cb_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, |
|
|
LPARAM lparam); |
|
119 |
|
|
120 |
|
/* Opaque passphrase callback handle. */ |
121 |
struct pass_cb_s; |
struct pass_cb_s; |
122 |
typedef struct pass_cb_s *pass_cb_t; |
typedef struct pass_cb_s *pass_cb_t; |
123 |
|
|
128 |
void free_pass_cb (pass_cb_t cb); |
void free_pass_cb (pass_cb_t cb); |
129 |
pass_cb_t new_pass_cb (HWND main); |
pass_cb_t new_pass_cb (HWND main); |
130 |
|
|
|
#ifdef __cplusplus |
|
|
} |
|
|
#endif |
|
|
|
|
131 |
#endif /* GPGOE_H */ |
#endif /* GPGOE_H */ |