Home GnuPG
Diffusion GPGME 34786132fed0

cpp: Add RAII class for saving/restoring the key list mode

Description

cpp: Add RAII class for saving/restoring the key list mode

* lang/cpp/src/context.h, lang/cpp/src/context.cpp (class Context):
Add nested class KeyListModeSaver.

This RAII-style class can be used to save the currently used key list
mode in case it needs to be changed temporarily. On destruction, it
will restore the key list mode that was active at construction time.