From dea872f21ff77cd58bafe0966d89d6331c8d2e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Wed, 27 Apr 2022 17:21:04 +0200 Subject: cpp: Support new keylist modes * lang/cpp/src/global.h (ForceExtern, LocateExternal, KeyListModeMask): New. * lang/cpp/src/context.cpp (operator<<): Add check. * lang/cpp/src/util.h (gpgme_keylist_mode_t, convert_from_gpgme_keylist_mode_t): Handle ForceExtern. * lang/cpp/tests/run-getkey.cpp (show_usage, main): Add arguments --force-extern and --locate-external. * lang/cpp/tests/run-keylist.cpp (show_usage, main): Ditto. -- GnuPG-bug-id: 5951 --- lang/cpp/tests/run-getkey.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lang/cpp/tests/run-getkey.cpp') diff --git a/lang/cpp/tests/run-getkey.cpp b/lang/cpp/tests/run-getkey.cpp index 35b15eb2..67ca281c 100644 --- a/lang/cpp/tests/run-getkey.cpp +++ b/lang/cpp/tests/run-getkey.cpp @@ -60,6 +60,8 @@ show_usage (int ex) " --ephemeral use GPGME_KEYLIST_MODE_EPHEMERAL\n" " --validate use GPGME_KEYLIST_MODE_VALIDATE\n" " --locate use GPGME_KEYLIST_MODE_LOCATE\n" + " --force-extern use GPGME_KEYLIST_MODE_FORCE_EXTERN\n" + " --locate-external use GPGME_KEYLIST_MODE_LOCATE_EXTERNAL\n" , stderr); exit (ex); } @@ -116,6 +118,12 @@ main (int argc, char **argv) } else if (!strcmp (*argv, "--locate")) { argc--; argv++; mode |= KeyListMode::Locate; + } else if (!strcmp (*argv, "--force-extern")) { + argc--; argv++; + mode |= KeyListMode::ForceExtern; + } else if (!strcmp (*argv, "--locate-external")) { + argc--; argv++; + mode |= KeyListMode::LocateExternal; } else if (!strncmp (*argv, "--", 2)) { show_usage (1); } -- cgit v1.2.3