/[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 150 by twoaday, Wed Jan 18 11:52:45 2006 UTC revision 193 by twoaday, Sat Apr 1 12:36:35 2006 UTC
# Line 234  mapi_send_pubkey_ext (gpgme_key_t to, co Line 234  mapi_send_pubkey_ext (gpgme_key_t to, co
234  }  }
235    
236    
 #if 0  
 /* Send a public key stored in @keyfile with the keyid @keyid  
    via the MAPI mechanism to a mail recipient.  
    Return value: SUCCESS_SUCCESS on succes. */  
 int  
 mapi_send_pubkey2 (const char *keyid, char *keyfile)  
 {  
     LHANDLE hd;  
     const char * fmt;  
     char * keyinf = NULL;  
     int rc;  
   
     if (!init)  
         return 0;  
   
     fmt = _("GPG Public Key of %s");  
     keyinf = new char[strlen (fmt) + strlen (keyid) + 2];  
     if (!keyinf)  
         BUG (0);  
     sprintf (keyinf, fmt, keyid);  
     rc = mapi_logon (0, NULL, NULL, MAPI_LOGON_UI, 0, &hd);  
     if (rc != SUCCESS_SUCCESS) {  
         MessageBox (NULL, _("MAPI Login failed."), "MAPI", MB_ICONWARNING|MB_OK);  
         goto fail;  
     }  
     rc = mapi_send_documents (0, ";", keyfile, keyinf, 0);  
     if (rc == MAPI_E_USER_ABORT)  
         rc = SUCCESS_SUCCESS;  
     if (rc != SUCCESS_SUCCESS)  
         MessageBox (NULL, _("Could not sent mail."), "MAPI", MB_ICONERROR|MB_OK);  
   
 fail:  
     mapi_logoff (hd, 0, 0, 0);  
     free_if_alloc (keyinf);  
     return rc;  
 }  
 #endif  
   
237    
238  int  int
239  mapi_send_pubkey (const char *keyid, char *keyfile)  mapi_send_pubkey (const char *keyid, char *keyfile)

Legend:
Removed from v.150  
changed lines
  Added in v.193

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26