Home GnuPG
Diffusion GpgOL 04be440d4d1a

Add UID to mails / mail objects
04be440d4d1aUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Add UID to mails / mail objects

* src/Makefile.am: Link librpcrt4 for uid functions.
* src/mail.cpp (g_uid_map): New.
(Mail::~Mail): Remove from uid map if added.
(Mail::get_mail_for_uid): New. Get Mail object for uid.
(Mail::is_mail_valid, Mail::is_valid_ptr): Renamd is_mail_valid
to is_valid_ptr to avoid confusion.
(Mail::decrypt_verify): Set uid.
* src/mail.h: Update accordingly.
* src/oomhelp.cpp (generate_uid, get_unique_id): New.
(set_pa_variant): Changed to put_pa_string.
* src/oomhelp.h: Update accordingly.
(GPGOL_UID_DASL): Declare.
* src/windowmessages.cpp (gpgol_window_proc): Use is_mail_valid.

The unique identifier allows us to find the according mail object
even if the pointer to the mailitem differs. This is usefull
because mailitem pointers obtained over the ribbon context differ
from the one we get on ItemLoad.

Details

Provenance
aheineckeAuthored on Oct 14 2016, 2:36 PM
Parents
rOd299d6357ed9: Dont fail if placeholder can't be inserted
Branches
Unknown
Tags
Unknown