1 |
/* GPGOE.h - GnuPG for Outlook Express |
/* GPGOE.h - GnuPG for Outlook Express |
2 |
* Copyright (C) 2001, 2002, 2003, 2006 Timo Schulz |
* Copyright (C) 2001, 2002, 2003, 2006, 2007 Timo Schulz |
3 |
* |
* |
4 |
* This file is part of GPGOE. |
* This file is part of GPGOE. |
5 |
* |
* |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
* GNU General Public License for more details. |
* GNU General Public License for more details. |
|
* |
|
|
* You should have received a copy of the GNU Lesser General Public License |
|
|
* along with GPGOE; if not, write to the Free Software Foundation, |
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
15 |
*/ |
*/ |
16 |
|
|
17 |
#ifndef GPGOE_H |
#ifndef GPGOE_H |
24 |
#define ATTR_SEC |
#define ATTR_SEC |
25 |
#endif |
#endif |
26 |
|
|
27 |
|
/* How many items we can store in the dictionary */ |
28 |
#define HASH_BUCKETS 3 |
#define HASH_BUCKETS 3 |
29 |
|
|
30 |
/* gettext support. */ |
/* gettext support. */ |
31 |
const char *gettext (const char *msgid); |
const char *gettext (const char *msgid); |
32 |
#define _(X) gettext ((X)) |
#define _(X) gettext ((X)) |
33 |
|
|
|
|
|
34 |
#include <malloc.h> |
#include <malloc.h> |
35 |
/* safe wrapper around free. */ |
/* safe wrapper around free. */ |
36 |
#define free_if_alloc(ptr) \ |
#define free_if_alloc(ptr) \ |
50 |
|
|
51 |
#define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len) |
#define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len) |
52 |
|
|
53 |
|
#ifndef DIM |
54 |
|
#define DIM(v) (sizeof (v) / sizeof ((v)[0])) |
55 |
|
#endif |
56 |
|
|
57 |
/* Dialog IDs for the various operations. */ |
/* Dialog IDs for the various operations. */ |
58 |
#define ID_OE_SELECTALL 40125 |
#define ID_OE_SELECTALL 40125 |
59 |
#define ID_OE_COPY 40484 |
#define ID_OE_COPY 40484 |
77 |
/* Context for the recipient list. */ |
/* Context for the recipient list. */ |
78 |
struct recip_list_s { |
struct recip_list_s { |
79 |
struct recip_list_s *next; |
struct recip_list_s *next; |
80 |
gpgme_key_t key; |
gpgme_key_t key; /* The actual key to use */ |
81 |
char *addr; |
char *addr; /* The email address. */ |
82 |
}; |
}; |
83 |
typedef struct recip_list_s *recip_list_t; |
typedef struct recip_list_s *recip_list_t; |
84 |
|
|
106 |
}; |
}; |
107 |
typedef struct viewer_ctx_s *viewer_ctx_t; |
typedef struct viewer_ctx_s *viewer_ctx_t; |
108 |
|
|
109 |
|
/* Signature verify context. */ |
110 |
struct verify_ctx_s { |
struct verify_ctx_s { |
111 |
gpgme_signature_t sig; |
gpgme_signature_t sig; |
112 |
gpgme_data_t text; |
gpgme_data_t text; |
114 |
typedef struct verify_ctx_s *verify_ctx_t; |
typedef struct verify_ctx_s *verify_ctx_t; |
115 |
|
|
116 |
/*-- GPGOE.c --*/ |
/*-- GPGOE.c --*/ |
117 |
/*EXPORT*/ int gpgoe_initialize (void); |
int gpgoe_initialize (void); |
118 |
/*EXPORT*/ int gpgoe_remove (void); |
int gpgoe_remove (void); |
119 |
/*EXPORT*/ void gpgoe_set_active_modes (int mode); |
void gpgoe_set_active_modes (int mode); |
120 |
/*EXPORT*/ int gpgoe_get_active_modes (void); |
int gpgoe_get_active_modes (void); |
121 |
|
|
122 |
/*-- OEProc.c --*/ |
/*-- OEProc.c --*/ |
123 |
extern plugin_ctx_t oe_plug; |
extern plugin_ctx_t oe_plug; |