From 00b027af86f33782933c6200fe1ffe40e85f4346 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Fri, 1 Jun 2018 11:08:12 +0200 Subject: cpp: Add gpgme_(get)set_ctx_flag * NEWS: Mention API extensions. * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::setFlag, Context::getFlag): New. --- lang/cpp/src/context.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lang/cpp/src/context.cpp') diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index 135e4d56..8fde84a5 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -1478,6 +1478,16 @@ Error Context::startCreateSubkey(const Key &k, const char *algo, k.impl(), algo, reserved, expires, flags)); } +Error Context::setFlag(const char *name, const char *value) +{ + return Error(d->lasterr = gpgme_set_ctx_flag(d->ctx, name, value)); +} + +const char *Context::getFlag(const char *name) const +{ + return gpgme_get_ctx_flag(d->ctx, name); +} + // Engine Spawn stuff Error Context::spawn(const char *file, const char *argv[], Data &input, Data &output, Data &err, -- cgit v1.2.3