Add signature info to verify category
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 16 Oct 2018 08:24:05 +0000 (10:24 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Tue, 16 Oct 2018 08:32:13 +0000 (10:32 +0200)
commit94c0354fb1f31782fcf7ddb2ee26f8ab1bddd036
tree86d043188eb9805fc02eea29bae0357c90a3a158
parent55e93a84061b0c35f360e9e1ab78070777798526
Add signature info to verify category

* src/categorymanager.cpp, src/categorymanager.h: New.
* src/Makefile.am: Add it.
* src/cpphelp.cpp, src/cpphelp.h (join): New.
* src/gpgoladdin.cpp, src/gpgoladdin.h
(Gpgoladdin::get_category_mngr): New.
* src/mail.cpp (Mail::~Mail): Remove categories.
(Mail::updateCategories_o): Use new code for categories.
(Mail::storeID): New carry store info.
* src/oomhelp.cpp (create_category): Fix dbg.
(get_store_for_id): New helper.
(ensure_category_exists): Remove need for appl.
(remove_category): Rewrite to allow partial matches.
(_delete_category): New helper.
(delete_category): New. Delete a category.
(delete_all_categories_starting_with): New.
* src/oomhelp.h: Update accordingly.

--
On startup we delete all old categories to cleanup e.g. after
we crashed and a category was left over. The categories
are only created on the stores where they are required and
only temporary as long as the mail is loaded.

As several mails can share the same category we need the
categorymanager to do some ref counting and help a bit.

GnuPG-Bug-Id: T4183
src/Makefile.am
src/categorymanager.cpp [new file with mode: 0644]
src/categorymanager.h [new file with mode: 0644]
src/cpphelp.cpp
src/cpphelp.h
src/gpgoladdin.cpp
src/gpgoladdin.h
src/mail.cpp
src/mail.h
src/oomhelp.cpp
src/oomhelp.h