Home GnuPG
Diffusion GpgOL 2d71d605a6d3

Avoid callbacks to track copied mail object

Description

Avoid callbacks to track copied mail object

* src/cryptcontroller.cpp (CryptController::do_crypto): Extend
comment.
* src/mail.cpp (g_mail_copy_triggerer): Remove.
(Mail::setAdditionalReference): Helper to track the copy IDispatch
object together with the ItemLoad IDispatch object.
(Mail::copy): Change to avoid g_mail_copy_triggerer logic.
(Mail::splitAndSend_o): Use new copy.
(Mail::searchMailsByUUID): New. Find mail objects by uuid.

This avoid the complexit with the g_mail_copy_triggerer callback
to go back into the Outlook event loop.
Instead we are now using the MAPI GpgOL UUID property to identify
the matching mail object after copy.

As releasing the IDispatch returned by the OOM copy call triggers
an Unload of the copied mail we need to track it as an additional
reference in the Mail object which was created with a different
IDispatch pointer in the ItemLoad event.

Details

Provenance
aheineckeAuthored on Jan 27 2021, 11:43 AM
Parents
rOea835ddbac2e: Add reset parameter to set uuid
Branches
Unknown
Tags
Unknown
Tasks
T4814: GpgOL: Send multiple E-Mails for BCC recipients