[git] GpgOL - branch, master, updated. gpgol-1.3.0-42-g3f21373

by Andre Heinecke cvs at cvs.gnupg.org
Fri Dec 18 12:56:48 CET 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG extension for MS Outlook".

The branch, master has been updated
       via  3f21373d698ce8c46f9041df0c263a1bfb45d7da (commit)
       via  4ca18888b88d9b6c4f82ac271319a35fa2d7303e (commit)
       via  543b8403f906c46ad761cd577d13f0a2e77ca7bb (commit)
       via  c4b9d6bc4e4cdd0b69d21f791897ae340b5be705 (commit)
       via  573190f572fd3eadf1be1fc8d1a917b15e53c129 (commit)
      from  b879f5bafe905869d0d6e01c76f125ce954a6cfe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3f21373d698ce8c46f9041df0c263a1bfb45d7da
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Dec 18 12:35:05 2015 +0100

    Add a way to resolve Exchange Address in MAPI
    
    * src/mapihelp.cpp (resolve_ex_from_address): New.
     (mapi_get_from_address): Use it.
    
    --
    This fixes the case for decrypt where we can't access the
    Mailitem to get the sender because we decrypt / verify
    before the Mailitem is loaded.
    The PidTagSenderSmtpAddress_W and
    PR_SENT_REPRESENTING_SMTP_ADDRESS_W properties used before
    do not work for mails in the sent mails folder,.. There
    was no property from which the SMTP Adress could be extracted.

diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index 83d8faf..679eca2 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -32,6 +32,7 @@
 #include "mapihelp.h"
 #include "parsetlv.h"
 #include "gpgolstr.h"
+#include "oomhelp.h"
 
 #ifndef CRYPT_E_STREAM_INSUFFICIENT_DATA
 #define CRYPT_E_STREAM_INSUFFICIENT_DATA 0x80091011
@@ -1479,6 +1480,71 @@ mapi_get_sender (LPMESSAGE message)
   return buf;
 }
 
+static char *
+resolve_ex_from_address (LPMESSAGE message)
+{
+  HRESULT hr;
+  char *sender_entryid;
+  size_t entryidlen;
+  LPMAPISESSION session;
+  ULONG utype;
+  LPUNKNOWN user;
+  LPSPropValue propval = NULL;
+  char *buf;
+
+  if (g_ol_version_major < 14)
+    {
+      log_debug ("%s:%s: Not implemented for Ol < 14", SRCNAME, __func__);
+      return NULL;
+    }
+
+  sender_entryid = mapi_get_binary_prop (message, PR_SENDER_ENTRYID,
+                                         &entryidlen);
+  if (!sender_entryid)
+    {
+      log_error ("%s:%s: Error: %i", SRCNAME, __func__, __LINE__);
+      return NULL;
+    }
+
+  session = get_oom_mapi_session ();
+
+  if (!session)
+    {
+      log_error ("%s:%s: Error: %i", SRCNAME, __func__, __LINE__);
+      xfree (sender_entryid);
+      return NULL;
+    }
+
+  hr = session->OpenEntry (entryidlen,  (LPENTRYID)sender_entryid,
+                           &IID_IMailUser, MAPI_BEST_ACCESS,
+                           &utype, (IUnknown**)&user);
+  RELDISP (session);
+  if (FAILED (hr))
+    {
+      log_error ("%s:%s: Error: %i", SRCNAME, __func__, __LINE__);
+      return NULL;
+    }
+
+  hr = HrGetOneProp ((LPMAPIPROP)user, PR_SMTP_ADDRESS_W, &propval);
+  if (FAILED (hr))
+    {
+      log_error ("%s:%s: Error: %i", SRCNAME, __func__, __LINE__);
+      return NULL;
+    }
+
+  if (PROP_TYPE (propval->ulPropTag) != PT_UNICODE)
+    {
+      log_debug ("%s:%s: HrGetOneProp returns invalid type %lu\n",
+                 SRCNAME, __func__, PROP_TYPE (propval->ulPropTag) );
+      MAPIFreeBuffer (propval);
+      return NULL;
+    }
+  buf = wchar_to_utf8 (propval->Value.lpszW);
+  MAPIFreeBuffer (propval);
+
+  return buf;
+}
+
 /* Return the from address of the message as a malloced UTF-8 string.
    Returns NULL if that address is not available.  */
 char *
@@ -1531,6 +1597,22 @@ mapi_get_from_address (LPMESSAGE message)
       return NULL;
     }
 
+  if (strstr (buf, "/o="))
+    {
+      char *buf2;
+      /* If both SMTP Address properties are not set
+         we need to fallback to resolve the address
+         through the address book */
+      log_debug ("%s:%s: resolving exchange address.",
+                 SRCNAME, __func__);
+      buf2 = resolve_ex_from_address (message);
+      if (buf2)
+        {
+          xfree (buf);
+          return buf2;
+        }
+    }
+
   return buf;
 }
 

commit 4ca18888b88d9b6c4f82ac271319a35fa2d7303e
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Dec 18 12:29:17 2015 +0100

    Add helper to get MAPISession through OOM
    
    * src/oomhelp.cpp (get_oom_mapi_session): New.
    * src/oomhelp.h (get_oom_mapi_session): Declare.
    
    --
    This avoids the necessity to logon / logoff mapi and ensures
    we have the MAPISession the application uses.

diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp
index df2eda4..ae6497c 100644
--- a/src/oomhelp.cpp
+++ b/src/oomhelp.cpp
@@ -29,6 +29,7 @@
 #include "common.h"
 
 #include "oomhelp.h"
+#include "gpgoladdin.h"
 
 
 /* Return a malloced string with the utf-8 encoded name of the object
@@ -1221,3 +1222,44 @@ invoke_oom_method (LPDISPATCH pDisp, const char *name, VARIANT *rVariant)
 
   return 0;
 }
+
+LPMAPISESSION
+get_oom_mapi_session ()
+{
+  LPDISPATCH application = GpgolAddin::get_instance ()->get_application ();
+  LPDISPATCH oom_session = NULL;
+  LPMAPISESSION session = NULL;
+  LPUNKNOWN mapiobj = NULL;
+  HRESULT hr;
+
+  if (!application)
+    {
+      log_debug ("%s:%s: Not implemented for Ol < 14", SRCNAME, __func__);
+      return NULL;
+    }
+
+  oom_session = get_oom_object (application, "Session");
+  if (!oom_session)
+    {
+      log_error ("%s:%s: session object not found", SRCNAME, __func__);
+      return NULL;
+    }
+  mapiobj = get_oom_iunknown (oom_session, "MAPIOBJECT");
+  oom_session->Release ();
+
+  if (!mapiobj)
+    {
+      log_error ("%s:%s: error getting Session.MAPIOBJECT", SRCNAME, __func__);
+      return NULL;
+    }
+  session = NULL;
+  hr = mapiobj->QueryInterface (IID_IMAPISession, (void**)&session);
+  mapiobj->Release ();
+  if (hr != S_OK || !session)
+    {
+      log_error ("%s:%s: error getting IMAPISession: hr=%#lx",
+                 SRCNAME, __func__, hr);
+      return NULL;
+    }
+  return session;
+}
diff --git a/src/oomhelp.h b/src/oomhelp.h
index aad7f7d..3c1ae51 100644
--- a/src/oomhelp.h
+++ b/src/oomhelp.h
@@ -23,6 +23,7 @@
 
 #include <unknwn.h>
 #include "mymapi.h"
+#include "myexchext.h"
 
 /* Helper to release dispatcher */
 #define RELDISP(dispatcher) if (dispatcher) dispatcher->Release()
@@ -212,6 +213,11 @@ get_oom_base_message (LPDISPATCH mailitem);
 int
 invoke_oom_method (LPDISPATCH pDisp, const char *name, VARIANT *rVariant);
 
+/* Try to obtain the mapisession through the Application.
+  returns NULL on error.*/
+LPMAPISESSION
+get_oom_mapi_session (void);
+
 #ifdef __cplusplus
 }
 #endif

commit 543b8403f906c46ad761cd577d13f0a2e77ca7bb
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Dec 18 12:26:18 2015 +0100

    Make GpgolAddin class a singleton
    
    * src/gpgoladdin.cpp (GpgolAddin::get_instance): New.
    * src/gpgoladdin.h (GpgolAddin::get_instance): Declare.
     (GpgolAddin::get_application): Expose application reference.
    
    --
    This makes the Application reference we get on connection
    globally accessible which is useful as it can serve as an
    entry point into OOM.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 3488db1..e9afaac 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -67,6 +67,8 @@ bool can_unload = false;
 
 static std::list<LPDISPATCH> g_ribbon_uis;
 
+static GpgolAddin * addin_instance = NULL;
+
 /* This is the main entry point for the addin
    Outlook uses this function to query for an Object implementing
    the IClassFactory interface.
@@ -139,7 +141,7 @@ STDMETHODIMP GpgolAddinFactory::CreateInstance (LPUNKNOWN punk, REFIID riid,
   (void)punk;
   *ppvObj = NULL;
 
-  GpgolAddin* obj = new GpgolAddin();
+  GpgolAddin* obj = GpgolAddin::get_instance();
   if (NULL == obj)
     return E_OUTOFMEMORY;
 
@@ -189,6 +191,8 @@ GpgolAddin::~GpgolAddin (void)
   engine_deinit ();
   write_options ();
 
+  addin_instance = NULL;
+
   log_debug ("%s:%s: Object deleted\n", SRCNAME, __func__);
 }
 
@@ -1145,3 +1149,13 @@ void gpgoladdin_invalidate_ui ()
       invoke_oom_method (*it, "Invalidate", NULL);
     }
 }
+
+GpgolAddin *
+GpgolAddin::get_instance ()
+{
+  if (!addin_instance)
+    {
+      addin_instance = new GpgolAddin ();
+    }
+  return addin_instance;
+}
diff --git a/src/gpgoladdin.h b/src/gpgoladdin.h
index c3fcfe6..d201b75 100644
--- a/src/gpgoladdin.h
+++ b/src/gpgoladdin.h
@@ -199,6 +199,10 @@ public:
   STDMETHODIMP OnStartupComplete (SAFEARRAY** custom);
   STDMETHODIMP OnBeginShutdown (SAFEARRAY** custom);
 
+public:
+  static GpgolAddin * get_instance ();
+  LPDISPATCH get_application () { return m_application; }
+
 private:
   ULONG m_lRef;
   GpgolRibbonExtender* m_ribbonExtender;

commit c4b9d6bc4e4cdd0b69d21f791897ae340b5be705
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Dec 18 11:15:29 2015 +0100

    Add more fallbacks for sender resolution
    
    * src/mail.cpp (Mail::update_sender): Add another Fallback
     for Sender address resolution.
    
    --
    Sometimes we don't have neither SendUsingAccount object.
    (Probably if the account is exchange and the default account).
    In that case fall back to the Sender.

diff --git a/src/mail.cpp b/src/mail.cpp
index 8f215b6..c1cc386 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -318,22 +318,35 @@ Mail::update_sender ()
   sender = get_oom_object (m_mailitem, "SendUsingAccount");
 
   xfree (m_sender);
+  m_sender = NULL;
 
-  if (!sender)
+  if (sender)
     {
-      log_debug ("%s:%s: Failed to get sender Account object.",
-                 SRCNAME, __func__);
-      return -1;
+      m_sender = get_oom_string (sender, "SmtpAddress");
+      RELDISP (sender);
+      return 0;
     }
-  m_sender = get_oom_string (sender, "SmtpAddress");
-
-  if (!m_sender)
+  /* Fallback to Sender object */
+  sender = get_oom_object (m_mailitem, "Sender");
+  if (sender)
     {
-      log_error ("%s:%s: Failed to get smtp address of sender.",
-                 SRCNAME, __func__);
-      return -1;
+      m_sender = get_pa_string (sender, PR_SMTP_ADDRESS_DASL);
+      RELDISP (sender);
+      return 0;
     }
-  return 0;
+  /* We don't have s sender object or SendUsingAccount,
+     well, in that case fall back to the current user. */
+  sender = get_oom_object (m_mailitem, "Session.CurrentUser");
+  if (sender)
+    {
+      m_sender = get_pa_string (sender, PR_SMTP_ADDRESS_DASL);
+      RELDISP (sender);
+      return 0;
+    }
+
+  log_error ("%s:%s: All fallbacks failed.",
+             SRCNAME, __func__);
+  return -1;
 }
 
 const char *

commit 573190f572fd3eadf1be1fc8d1a917b15e53c129
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Dec 17 13:35:35 2015 +0100

    Add disabled support for inline editors
    
    * src/gpgoladdin.cpp (GpgolRibbonExtender::GetIDsOfNames): Map Ids.
     (GpgolRibbonExtender::Invoke): Dispatch to correct functions.
     (GpgolRibbonExtender::GetCustomUI): Add UI for this.
    * src/ribbon-callbacks.cpp (mark_mime_action, get_crypt_pressed):
     Prepare to be called from explorer context.
     (get_crypt_pressed): Return False on error.
     (mime_sign, mime_encrypt): Removed.
    * src/ribbon-callbacks.h: Add Ids and update prototypes.
    
    --
    The code is disabled for now because sending does not work that
    nice. Should be fairly simple to fix though and something for
    the future.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index a039a5e..3488db1 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -510,6 +510,10 @@ GpgolRibbonExtender::GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames,
       ID_MAPPER (L"signMime", ID_CMD_MIME_SIGN)
       ID_MAPPER (L"getEncryptPressed", ID_GET_ENCRYPT_PRESSED)
       ID_MAPPER (L"getSignPressed", ID_GET_SIGN_PRESSED)
+      ID_MAPPER (L"encryptMimeEx", ID_CMD_MIME_ENCRYPT_EX)
+      ID_MAPPER (L"signMimeEx", ID_CMD_MIME_SIGN_EX)
+      ID_MAPPER (L"getEncryptPressedEx", ID_GET_ENCRYPT_PRESSED_EX)
+      ID_MAPPER (L"getSignPressedEx", ID_GET_SIGN_PRESSED_EX)
       ID_MAPPER (L"ribbonLoaded", ID_ON_LOAD);
       ID_MAPPER (L"openOptions", ID_CMD_OPEN_OPTIONS)
       ID_MAPPER (L"getSigStatus", ID_GET_SIG_STATUS)
@@ -565,17 +569,31 @@ GpgolRibbonExtender::Invoke (DISPID dispid, REFIID riid, LCID lcid,
       case ID_CMD_VERIFY_BODY:
         return verifyBody (parms->rgvarg[0].pdispVal);
       case ID_CMD_MIME_SIGN:
-        return mime_sign (parms->rgvarg[1].pdispVal);
+        return mark_mime_action (parms->rgvarg[1].pdispVal, OP_SIGN, false);
       case ID_CMD_MIME_ENCRYPT:
-        return mime_encrypt (parms->rgvarg[1].pdispVal);
+        return mark_mime_action (parms->rgvarg[1].pdispVal, OP_ENCRYPT,
+                                 false);
       case ID_GET_ENCRYPT_PRESSED:
-        return get_crypt_pressed (parms->rgvarg[0].pdispVal, 1, result);
+        return get_crypt_pressed (parms->rgvarg[0].pdispVal, OP_ENCRYPT,
+                                  result, false);
       case ID_GET_SIGN_PRESSED:
-        return get_crypt_pressed (parms->rgvarg[0].pdispVal, 2, result);
+        return get_crypt_pressed (parms->rgvarg[0].pdispVal, OP_SIGN,
+                                  result, false);
+      case ID_CMD_MIME_SIGN_EX:
+        return mark_mime_action (parms->rgvarg[1].pdispVal, OP_SIGN, true);
+      case ID_CMD_MIME_ENCRYPT_EX:
+        return mark_mime_action (parms->rgvarg[1].pdispVal, OP_ENCRYPT, true);
+      case ID_GET_ENCRYPT_PRESSED_EX:
+        return get_crypt_pressed (parms->rgvarg[0].pdispVal, OP_ENCRYPT,
+                                  result, true);
+      case ID_GET_SIGN_PRESSED_EX:
+        return get_crypt_pressed (parms->rgvarg[0].pdispVal, OP_SIGN,
+                                  result, true);
       case ID_GET_ENC_STATUS:
-        return get_crypt_status (parms->rgvarg[0].pdispVal, 1, result);
+        return get_crypt_status (parms->rgvarg[0].pdispVal, OP_ENCRYPT,
+                                 result);
       case ID_GET_SIG_STATUS:
-        return get_crypt_status (parms->rgvarg[0].pdispVal, 2, result);
+        return get_crypt_status (parms->rgvarg[0].pdispVal, OP_SIGN, result);
       case ID_ON_LOAD:
           {
             g_ribbon_uis.push_back (parms->rgvarg[0].pdispVal);
@@ -742,6 +760,53 @@ GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
         _("Decrypt")
         );
     }
+#if 0
+  /* We don't use this code currently because calling the send
+     event for Inline Response mailitems fails. */
+  else if (!wcscmp (RibbonID, L"Microsoft.Outlook.Explorer"))
+    {
+      gpgrt_asprintf (&buffer,
+        "<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\""
+        " onLoad=\"ribbonLoaded\">"
+        " <ribbon>"
+        "   <contextualTabs>"
+        "   <tabSet idMso=\"TabComposeTools\">"
+        "    <tab idMso=\"TabMessage\">"
+        "     <group id=\"general\""
+        "            label=\"%s\">"
+        "       <toggleButton id=\"mimeEncryptEx\""
+        "               getImage=\"btnEncryptLarge\""
+        "               size=\"large\""
+        "               label=\"%s\""
+        "               screentip=\"%s\""
+        "               supertip=\"%s\""
+        "               onAction=\"encryptMimeEx\""
+        "               getPressed=\"getEncryptPressedEx\"/>"
+        "       <toggleButton id=\"mimeSignEx\""
+        "               getImage=\"btnSignLarge\""
+        "               size=\"large\""
+        "               label=\"%s\""
+        "               screentip=\"%s\""
+        "               supertip=\"%s\""
+        "               onAction=\"signMimeEx\""
+        "               getPressed=\"getSignPressedEx\"/>"
+        "       <dialogBoxLauncher>"
+        "         <button id=\"optsBtn\""
+        "                 onAction=\"openOptions\""
+        "                 screentip=\"%s\"/>"
+        "       </dialogBoxLauncher>"
+        "     </group>"
+        "    </tab>"
+        "   </tabSet>"
+        "   </contextualTabs>"
+        " </ribbon>"
+        "</customUI>", _("GpgOL"),
+        _("Encrypt"), encryptTTip, encryptSTip,
+        _("Sign"), signTTip, signSTip,
+        optsSTip
+        );
+    }
+#endif
 
   if (buffer)
     {
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index ee3dde7..c4f5c22 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -1283,8 +1283,8 @@ HRESULT verifyBody (LPDISPATCH ctrl)
   return do_reader_action (ctrl, DATA_BODY | OP_VERIFY);
 }
 
-static HRESULT
-mark_mime_action (LPDISPATCH ctrl, int flags)
+HRESULT
+mark_mime_action (LPDISPATCH ctrl, int flags, bool is_explorer)
 {
   HRESULT hr;
   HRESULT rc = E_FAIL;
@@ -1299,7 +1299,8 @@ mark_mime_action (LPDISPATCH ctrl, int flags)
   if (FAILED(hr))
       return hr;
 
-  mailitem = get_oom_object (context, "CurrentItem");
+  mailitem = get_oom_object (context, is_explorer ? "ActiveInlineResponse" :
+                                                    "CurrentItem");
 
   if (!mailitem)
     {
@@ -1337,26 +1338,23 @@ done:
   return rc;
 }
 
-HRESULT mime_sign (LPDISPATCH ctrl)
-{
-  return mark_mime_action (ctrl, OP_SIGN);
-}
-
-HRESULT mime_encrypt (LPDISPATCH ctrl)
-{
-  return mark_mime_action (ctrl, OP_ENCRYPT);
-}
-
 /* Get the state of encrypt / sign toggle buttons.
   flag values: 1 get the state of the encrypt button.
-               2 get the state of the sign button. */
-HRESULT get_crypt_pressed (LPDISPATCH ctrl, int flags, VARIANT *result)
+               2 get the state of the sign button.
+  If is_explorer is set to true
+               */
+HRESULT get_crypt_pressed (LPDISPATCH ctrl, int flags, VARIANT *result,
+                           bool is_explorer)
 {
   HRESULT hr;
   LPDISPATCH context = NULL,
              mailitem = NULL;
   LPMESSAGE message = NULL;
 
+  result->vt = VT_BOOL | VT_BYREF;
+  result->pboolVal = (VARIANT_BOOL*) xmalloc (sizeof (VARIANT_BOOL));
+  *(result->pboolVal) = VARIANT_FALSE;
+
   /* First the usual defensive check about our parameters */
   if (!ctrl || !result)
     {
@@ -1364,9 +1362,6 @@ HRESULT get_crypt_pressed (LPDISPATCH ctrl, int flags, VARIANT *result)
       return E_FAIL;
     }
 
-  result->vt = VT_BOOL | VT_BYREF;
-  result->pboolVal = (VARIANT_BOOL*) xmalloc (sizeof (VARIANT_BOOL));
-
   hr = getContext (ctrl, &context);
 
   if (hr)
@@ -1376,7 +1371,8 @@ HRESULT get_crypt_pressed (LPDISPATCH ctrl, int flags, VARIANT *result)
       return E_FAIL;
     }
 
-  mailitem = get_oom_object (context, "CurrentItem");
+  mailitem = get_oom_object (context, is_explorer ? "ActiveInlineResponse" :
+                                                    "CurrentItem");
 
   if (!mailitem)
     {
diff --git a/src/ribbon-callbacks.h b/src/ribbon-callbacks.h
index bbd52aa..0c72f74 100644
--- a/src/ribbon-callbacks.h
+++ b/src/ribbon-callbacks.h
@@ -44,6 +44,10 @@
 #define ID_CMD_OPEN_OPTIONS     18
 #define ID_GET_SIG_STATUS       19
 #define ID_GET_ENC_STATUS       20
+#define ID_CMD_MIME_SIGN_EX     21
+#define ID_CMD_MIME_ENCRYPT_EX  22
+#define ID_GET_SIGN_PRESSED_EX  23
+#define ID_GET_ENCRYPT_PRESSED_EX 24
 
 #define ID_BTN_CERTMANAGER       IDI_KEY_MANAGER_64_PNG
 #define ID_BTN_DECRYPT           IDI_DECRYPT_16_PNG
@@ -54,6 +58,9 @@
 #define ID_BTN_SIGN_LARGE        IDI_SIGN_48_PNG
 #define ID_BTN_VERIFY_LARGE      IDI_VERIFY_48_PNG
 
+#define OP_ENCRYPT     1 /* Encrypt the data */
+#define OP_SIGN        2 /* Sign the data */
+
 HRESULT decryptAttachments (LPDISPATCH ctrl);
 HRESULT encryptSelection (LPDISPATCH ctrl);
 HRESULT decryptSelection (LPDISPATCH ctrl);
@@ -66,12 +73,10 @@ HRESULT startCertManager (LPDISPATCH ctrl);
 HRESULT signBody (LPDISPATCH ctrl);
 HRESULT verifyBody (LPDISPATCH ctrl);
 
-/* Mark the mail to be mime encrypted on send. */
-HRESULT mime_encrypt (LPDISPATCH ctrl);
-/* Mark the mail to be mime signed on send. */
-HRESULT mime_sign (LPDISPATCH ctrl);
 /* Get the toggle state of a crypt button. Flag value 1: encrypt, 2: sign */
-HRESULT get_crypt_pressed (LPDISPATCH ctrl, int flags, VARIANT *result);
+HRESULT get_crypt_pressed (LPDISPATCH ctrl, int flags, VARIANT *result, bool is_explorer);
+/* Mark the mail to be mime encrypted on send. Flags as above */
+HRESULT mark_mime_action (LPDISPATCH ctrl, int flags, bool is_explorer);
 /* Get the general crypto status / if the buttons should be toggled. */
 HRESULT get_crypt_status (LPDISPATCH ctrl, int flags, VARIANT *result);
 /* Callback to get our own control reference */

-----------------------------------------------------------------------

Summary of changes:
 src/gpgoladdin.cpp       | 93 ++++++++++++++++++++++++++++++++++++++++++++----
 src/gpgoladdin.h         |  4 +++
 src/mail.cpp             | 35 ++++++++++++------
 src/mapihelp.cpp         | 82 ++++++++++++++++++++++++++++++++++++++++++
 src/oomhelp.cpp          | 42 ++++++++++++++++++++++
 src/oomhelp.h            |  6 ++++
 src/ribbon-callbacks.cpp | 34 ++++++++----------
 src/ribbon-callbacks.h   | 15 +++++---
 8 files changed, 269 insertions(+), 42 deletions(-)


hooks/post-receive
-- 
GnuPG extension for MS Outlook
http://git.gnupg.org




More information about the Gnupg-commits mailing list