From e416f9961837039f259558edf41fccbc181ad128 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Wed, 11 Jan 2017 16:14:45 +0100 Subject: cpp: Add revuid and adduid support * lang/cpp/src/context.cpp (Context::revUid, Context::startRevUid), (Context::addUid, Context::startAddUid): New. * lang/cpp/src/context.h: Declare new functions. * lang/cpp/src/key.cpp (Key::UserID::revoke) (Key::addUid): Idomatic helpers. lang/cpp/src/key.h: Declare new functions. * NEWS: Update accordingly. --- lang/cpp/src/context.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lang/cpp/src/context.cpp') diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index ada7bead..040e8f32 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -1376,6 +1376,30 @@ Error Context::setTofuPolicyStart(const Key &k, unsigned int policy) k.impl(), to_tofu_policy_t(policy))); } +Error Context::addUid(const Key &k, const char *userid) +{ + return Error(d->lasterr = gpgme_op_adduid(d->ctx, + k.impl(), userid, 0)); +} + +Error Context::startAddUid(const Key &k, const char *userid) +{ + return Error(d->lasterr = gpgme_op_adduid_start(d->ctx, + k.impl(), userid, 0)); +} + +Error Context::revUid(const Key &k, const char *userid) +{ + return Error(d->lasterr = gpgme_op_revuid(d->ctx, + k.impl(), userid, 0)); +} + +Error Context::startRevUid(const Key &k, const char *userid) +{ + return Error(d->lasterr = gpgme_op_revuid_start(d->ctx, + k.impl(), userid, 0)); +} + // Engine Spawn stuff Error Context::spawn(const char *file, const char *argv[], Data &input, Data &output, Data &err, -- cgit v1.2.3