From f1a2ce4bcb7d46981d1fc471e517709f076d9365 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 8 May 2022 01:01:29 +0800 Subject: refactor: develop 2.0.6 start 1. delete smtp ability 2. change libs link type to dramatic --- src/core/function/gpg/GpgUIDOperator.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/core/function/gpg/GpgUIDOperator.cpp') diff --git a/src/core/function/gpg/GpgUIDOperator.cpp b/src/core/function/gpg/GpgUIDOperator.cpp index dd0c43f6..33c29fa4 100644 --- a/src/core/function/gpg/GpgUIDOperator.cpp +++ b/src/core/function/gpg/GpgUIDOperator.cpp @@ -30,8 +30,11 @@ #include "boost/format.hpp" +GpgFrontend::GpgUIDOperator::GpgUIDOperator(int channel) + : SingletonFunctionObject(channel) {} + bool GpgFrontend::GpgUIDOperator::AddUID(const GpgFrontend::GpgKey& key, - const std::string& uid) { + const std::string& uid) { auto err = gpgme_op_adduid(ctx_, gpgme_key_t(key), uid.c_str(), 0); if (check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR) return true; @@ -40,7 +43,7 @@ bool GpgFrontend::GpgUIDOperator::AddUID(const GpgFrontend::GpgKey& key, } bool GpgFrontend::GpgUIDOperator::RevUID(const GpgFrontend::GpgKey& key, - const std::string& uid) { + const std::string& uid) { auto err = check_gpg_error(gpgme_op_revuid(ctx_, gpgme_key_t(key), uid.c_str(), 0)); if (check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR) @@ -50,7 +53,7 @@ bool GpgFrontend::GpgUIDOperator::RevUID(const GpgFrontend::GpgKey& key, } bool GpgFrontend::GpgUIDOperator::SetPrimaryUID(const GpgFrontend::GpgKey& key, - const std::string& uid) { + const std::string& uid) { auto err = check_gpg_error(gpgme_op_set_uid_flag( ctx_, gpgme_key_t(key), uid.c_str(), "primary", nullptr)); if (check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR) @@ -59,9 +62,9 @@ bool GpgFrontend::GpgUIDOperator::SetPrimaryUID(const GpgFrontend::GpgKey& key, return false; } bool GpgFrontend::GpgUIDOperator::AddUID(const GpgFrontend::GpgKey& key, - const std::string& name, - const std::string& comment, - const std::string& email) { + const std::string& name, + const std::string& comment, + const std::string& email) { LOG(INFO) << "GpgFrontend::UidOperator::AddUID" << name << comment << email; auto uid = boost::format("%1%(%2%)<%3%>") % name % comment % email; return AddUID(key, uid.str()); -- cgit v1.2.3