/[winpt]/trunk/Src/wptMAPI.cpp
ViewVC logotype

Diff of /trunk/Src/wptMAPI.cpp

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

revision 36 by werner, Thu Oct 27 15:25:13 2005 UTC revision 121 by twoaday, Mon Dec 12 11:19:56 2005 UTC
# Line 1  Line 1 
1  /* wptMAPI.cpp  /* wptMAPI.cpp
2   *      Copyright (C) 2003, 2004 Timo Schulz   *      Copyright (C) 2003, 2004, 2005 Timo Schulz
3   *   *
4   * This file is part of WinPT.   * This file is part of WinPT.
5   *   *
# Line 22  Line 22 
22  #endif  #endif
23    
24  #include <windows.h>  #include <windows.h>
 #include <windows.h>  
25  #include <stdio.h>  #include <stdio.h>
26  #include <mapi.h>  #include <mapi.h>
27    
28  extern HINSTANCE glob_hinst;  #include "resource.h"
   
 #include "../resource.h"  
29  #include "wptTypes.h"  #include "wptTypes.h"
30  #include "wptErrors.h"  #include "wptErrors.h"
31  #include "wptW32API.h"  #include "wptW32API.h"
32  #include "wptGPG.h"  #include "wptGPG.h"
33    #include "wptVersion.h"
34    
35  static LPMAPILOGON          mapi_logon = NULL;  static LPMAPILOGON          mapi_logon = NULL;
36  static LPMAPILOGOFF         mapi_logoff = NULL;      static LPMAPILOGOFF         mapi_logoff = NULL;    
# Line 45  static int                 init = 0; Line 42  static int                 init = 0;
42  #define load_one_fnc(cast, hlib, name) (cast)GetProcAddress ((hlib), name)  #define load_one_fnc(cast, hlib, name) (cast)GetProcAddress ((hlib), name)
43    
44    
45    /* Load MAPI library and set function pointers.
46       Return value: 0 on success. */
47  int  int
48  mapi_init (void)  mapi_init (void)
49  {  {
# Line 64  mapi_init (void) Line 63  mapi_init (void)
63      init = 1;      init = 1;
64    
65      return 0;      return 0;
66  } /* mapi_init */  }
67    
68    
69    /* Free library and cleanup. */
70  void  void
71  mapi_deinit (void)  mapi_deinit (void)
72  {  {
# Line 75  mapi_deinit (void) Line 75  mapi_deinit (void)
75          hlib = NULL;          hlib = NULL;
76          init = 0;          init = 0;
77      }      }
78  } /* mapi_deinit */  }
79    
80  #if 0 /* low:priority XXX port the code */  
81    /* Send the file given in @ascfile via the MAPI mechanism. */
82  int  int
83  mapi_send_ascfile (char *ascfile)  mapi_send_ascfile (char *ascfile)
84  {  {
# Line 104  fail: Line 105  fail:
105  }  }
106    
107    
108    /* Send a public key stored in @keyfile with the keyid @keyid
109       via the MAPI mechanism to a mail recipient.
110       Return value: SUCCESS_SUCCESS on succes. */
111  int  int
112  mapi_send_pubkey (const char *keyid, char *keyfile)  mapi_send_pubkey (const char *keyid, char *keyfile)
113  {  {
# Line 135  fail: Line 139  fail:
139      mapi_logoff (hd, 0, 0, 0);      mapi_logoff (hd, 0, 0, 0);
140      free_if_alloc (keyinf);      free_if_alloc (keyinf);
141      return rc;      return rc;
142  } /* mapi_send_pubkey */  }
143    
144    
145    #if 0 /* low:priority XXX port the code */
146  static void  static void
147  free_mapi_msg (MapiMessage * msg)  free_mapi_msg (MapiMessage * msg)
148  {  {

Legend:
Removed from v.36  
changed lines
  Added in v.121

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26