/[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 1 by twoaday, Fri Mar 24 13:36:54 2006 UTC revision 12 by twoaday, Fri Apr 7 10:46:41 2006 UTC
# Line 21  Line 21 
21  #ifndef GPGOE_H  #ifndef GPGOE_H
22  #define GPGOE_H  #define GPGOE_H
23    
24  #ifdef __cplusplus  /* gettext support. */
25  extern "C" {  const char *gettext (const char *msgid);
26  #endif  #define _(X) gettext ((X))
27    
 /* dummy until gettext support is finished. */  
 #define _(X) (X)  
28    
29  #include <malloc.h>  #include <malloc.h>
30  /* wrapper around free. */  /* wrapper around free. */
31  #define free_if_alloc(ptr) \  #define free_if_alloc(ptr) \
32    do { \  do { \
33      if (ptr) free (ptr); \      if (ptr) free (ptr); \
34      ptr = NULL; \      ptr = NULL; \
35    } while (0)  } while (0)
36    
37    
38  /* Wrapper for memory deallocation but overwrite the buffer before.  /* Wrapper for memory deallocation but overwrite the buffer before.
# Line 47  extern "C" { Line 45  extern "C" {
45    
46  #define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len)  #define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len)
47    
48  /* OE5 V5.x/V6 command id's. */  /* Dialog IDs for clipboard operations. */
49  #define ID_OE5_SELECTALL    40125  #define ID_OE_SELECTALL     40125
50  #define ID_OE5_COPY         40484  #define ID_OE_COPY          40484
51  #define ID_OE5_PASTE        40231  #define ID_OE_PASTE         40231
52  #define ID_OE5_ENCRYPT      40260  #define ID_OE_SAVE_ATT      40104
53  #define ID_OE5_SIGN         40299  
54  #define ID_OE5_SEND         40411  /* Common dialogs (Get{Open,Save}FileName) */
55  #define ID_OE5_PREVMSG      40145  #define ID_OF_OK                1
56  #define ID_OE5_NEXTMSG      40146  #define ID_OF_CANCEL            2
57    #define ID_OF_OPEN_FILE      1152
58  /* Common dialogs (GetOpenFileName) */  #define ID_OF_SAVE_FILE      1148
 #define OF_IDOK                 1  
 #define OF_IDFILE            1152  
   
 /* 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  
59    
60    
61  /* Context for the recipient list. */  /* Context for the recipient list. */
# Line 81  typedef struct recip_list_s *recip_list_ Line 70  typedef struct recip_list_s *recip_list_
70  struct plugin_ctx_s {  struct plugin_ctx_s {
71      HWND msg_wnd, main_wnd, addr_wnd;      HWND msg_wnd, main_wnd, addr_wnd;
72      HWND to_wnd, cc_wnd, bcc_wnd;      HWND to_wnd, cc_wnd, bcc_wnd;
73        HWND attach;
74      char *to;      char *to;
75      char *cc;      char *cc;
76      char *bcc;      char *bcc;
# Line 88  struct plugin_ctx_s { Line 78  struct plugin_ctx_s {
78      int encrypt;      int encrypt;
79      recip_list_t rset;      recip_list_t rset;
80      char errbuf[256];      char errbuf[256];
81        char *orig_text;
82        int use_utf8;
83  };  };
84  typedef struct plugin_ctx_s *plugin_ctx_t;  typedef struct plugin_ctx_s *plugin_ctx_t;
85    
# Line 98  struct viewer_ctx_s { Line 90  struct viewer_ctx_s {
90  typedef struct viewer_ctx_s *viewer_ctx_t;  typedef struct viewer_ctx_s *viewer_ctx_t;
91    
92    
93    /*-- GPGOE.c --*/
94    /*EXPORT*/ int gpgoe_initialize (void);
95    /*EXPORT*/ int gpgoe_remove (void);
96    
97  /*-- OEProc.c --*/  /*-- OEProc.c --*/
98  extern HINSTANCE mod_hinst_dll;  extern HINSTANCE mod_hinst_dll;
99  extern WNDPROC oe_proc_old;  extern WNDPROC oe_proc_old;
100    extern WNDPROC of_proc_old;
101    extern HANDLE plugin_active;
102  LRESULT CALLBACK oe_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);  LRESULT CALLBACK oe_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
103    LRESULT CALLBACK of_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
 /*-- GPGOE.c --*/  
 int gpgoe_initialize (void);  
 int gpgoe_remove (void);  
104    
105  /*-- OECrypto.c --*/  /*-- OECrypto.c --*/
106  gpgme_error_t oe_handle_mail (plugin_ctx_t ctx);  gpgme_error_t oe_handle_mail (plugin_ctx_t ctx);
107    
108  /*-- OEMisc.c --*/  /*-- OEMisc.c --*/
109  char* utf8_to_native (const char *string);  char* utf8_to_native (const char *string);
110    char* native_to_utf8 (const char *string);
111  char* get_clip_text (HWND hwnd);  char* get_clip_text (HWND hwnd);
112  int set_clip_text (HWND hwnd, const char *text, int nbytes);  int set_clip_text (HWND hwnd, const char *text, int nbytes);
113  void show_error (HWND hwnd, const char *caption,  void show_error (HWND hwnd, const char *caption,
114                   UINT type, const char *fmt, ...);                   UINT type, const char *fmt, ...);
115  void* xcalloc (size_t n, size_t m);  void* xcalloc (size_t n, size_t m);
116  char* xstrdup (const char *s);  char* xstrdup (const char *s);
117    void xfree (void *p);
118    
119  /*-- dialogs --*/  /*-- dialogs --*/
120  BOOL CALLBACK encrypt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,  BOOL CALLBACK encrypt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,
# Line 126  BOOL CALLBACK viewer_dlg_proc (HWND dlg, Line 123  BOOL CALLBACK viewer_dlg_proc (HWND dlg,
123                                 LPARAM lparam);                                 LPARAM lparam);
124  BOOL CALLBACK verify_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,  BOOL CALLBACK verify_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,
125                                 LPARAM lparam);                                 LPARAM lparam);
 BOOL CALLBACK pass_cb_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,  
                                 LPARAM lparam);  
126    
127    /* Opaque passphrase callback handle. */
128  struct pass_cb_s;  struct pass_cb_s;
129  typedef struct pass_cb_s *pass_cb_t;  typedef struct pass_cb_s *pass_cb_t;
130    
# Line 139  gpgme_error_t passphrase_cb (void *hook, Line 135  gpgme_error_t passphrase_cb (void *hook,
135  void free_pass_cb (pass_cb_t cb);  void free_pass_cb (pass_cb_t cb);
136  pass_cb_t new_pass_cb (HWND main);  pass_cb_t new_pass_cb (HWND main);
137    
138  #ifdef __cplusplus  /*-- OENLS.c --*/
139  }  int setup_gettext (void);
 #endif  
140    
141  #endif /* GPGOE_H */  #endif /* GPGOE_H */

Legend:
Removed from v.1  
changed lines
  Added in v.12

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26