/[gpgoe]/trunk/src/GPGOE.h
ViewVC logotype

Diff of /trunk/src/GPGOE.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 16 by twoaday, Tue Apr 11 06:56:23 2006 UTC revision 24 by twoaday, Tue Dec 13 10:40:30 2011 UTC
# Line 1  Line 1 
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   *   *
# Line 12  Line 12 
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
18  #define GPGOE_H  #define GPGOE_H
19    
20    /* Macros to support a separate section for variables. */
21    #ifdef __GNUC__
22    #define ATTR_SEC __attribute__((section (".SHARDAT"), shared))
23    #else
24    #define ATTR_SEC
25    #endif
26    
27    /* How many items we can store in the dictionary */
28    #define HASH_BUCKETS 3
29    #define MAX_PASS_LEN 2048
30    
31  /* gettext support. */  /* gettext support. */
32  const char *gettext (const char *msgid);  const char *gettext (const char *msgid);
33  #define _(X) gettext ((X))  #define _(X) gettext ((X))
34    
   
35  #include <malloc.h>  #include <malloc.h>
36  /* safe wrapper around free. */  /* safe wrapper around free. */
37  #define free_if_alloc(ptr) \  #define free_if_alloc(ptr) \
# Line 45  do { \ Line 51  do { \
51    
52  #define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len)  #define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len)
53    
54    #ifndef DIM
55    #define DIM(v) (sizeof (v) / sizeof ((v)[0]))
56    #endif
57    
58  /* Dialog IDs for the various operations. */  /* Dialog IDs for the various operations. */
59  #define ID_OE_SELECTALL     40125  #define ID_OE_SELECTALL     40125
60  #define ID_OE_COPY          40484  #define ID_OE_COPY          40484
# Line 58  do { \ Line 68  do { \
68  #define ID_OF_SAVE_FILE      1148  #define ID_OF_SAVE_FILE      1148
69    
70    
71    /* Supported plug-in modes. */
72    enum gpgoe_mode_t {
73        GPGOE_MODE_NORMAL     = 0,
74        GPGOE_MODE_PLAINREPLY = 1,     /* decrypt mails before a reply. */
75        GPGOE_MODE_CACHEPASS  = 2,      /* cache passphrase. */
76    };
77    
78  /* Context for the recipient list. */  /* Context for the recipient list. */
79  struct recip_list_s {  struct recip_list_s {
80      struct recip_list_s *next;      struct recip_list_s *next;
81      gpgme_key_t key;      gpgme_key_t key; /* The actual key to use */
82      char *addr;      char *addr;      /* The email address. */
83  };  };
84  typedef struct recip_list_s *recip_list_t;  typedef struct recip_list_s *recip_list_t;
85    
# Line 90  struct viewer_ctx_s { Line 107  struct viewer_ctx_s {
107  };  };
108  typedef struct viewer_ctx_s *viewer_ctx_t;  typedef struct viewer_ctx_s *viewer_ctx_t;
109    
110    /* Signature verify context. */
111    struct verify_ctx_s {
112        gpgme_signature_t sig;
113        gpgme_data_t text;
114    };
115    typedef struct verify_ctx_s *verify_ctx_t;
116    
117  /*-- GPGOE.c --*/  /*-- GPGOE.c --*/
118  /*EXPORT*/ int gpgoe_initialize (void);  int gpgoe_initialize (void);
119  /*EXPORT*/ int gpgoe_remove (void);  int gpgoe_remove (void);
120    void gpgoe_set_active_modes (int mode);
121    int gpgoe_get_active_modes (void);
122    
123  /*-- OEProc.c --*/  /*-- OEProc.c --*/
124  extern plugin_ctx_t oe_plug;  extern plugin_ctx_t oe_plug;
# Line 151  gpgme_error_t passphrase_cb (void *hook, Line 176  gpgme_error_t passphrase_cb (void *hook,
176                               int prev_was_bad, int fd);                               int prev_was_bad, int fd);
177  void free_pass_cb (pass_cb_t cb);  void free_pass_cb (pass_cb_t cb);
178  pass_cb_t new_pass_cb (HWND main);  pass_cb_t new_pass_cb (HWND main);
179  void free_pass_cache (void);  int pass_cb_cancelled (pass_cb_t cb);
180    void reset_pass_cache (void);
181    
182  /*-- OENLS.c --*/  /*-- OENLS.c --*/
183  int setup_gettext (void);  int setup_gettext (void);

Legend:
Removed from v.16  
changed lines
  Added in v.24

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26