diff options
author | Saturneric <[email protected]> | 2022-01-14 19:48:15 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-01-14 19:48:15 +0000 |
commit | df550288147b32dc42dd9161e2a4da52e1f794ea (patch) | |
tree | a370b0964c5ce30d42759f39e5200deec5c821d6 /src/gpg/function/UidOperator.cpp | |
parent | <doc>(core): add comment for code (diff) | |
download | GpgFrontend-df550288147b32dc42dd9161e2a4da52e1f794ea.tar.gz GpgFrontend-df550288147b32dc42dd9161e2a4da52e1f794ea.zip |
<doc, refactor>(ci): Tidy up code in gpg/function
1. Rename related entities.
2. Add a comments.
Diffstat (limited to '')
-rw-r--r-- | src/gpg/function/UIDOperator.cpp (renamed from src/gpg/function/UidOperator.cpp) | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gpg/function/UidOperator.cpp b/src/gpg/function/UIDOperator.cpp index d7acc3b1..8c8f5c27 100644 --- a/src/gpg/function/UidOperator.cpp +++ b/src/gpg/function/UIDOperator.cpp @@ -22,43 +22,43 @@ * */ -#include "gpg/function/UidOperator.h" +#include "gpg/function/UIDOperator.h" #include "boost/format.hpp" -bool GpgFrontend::UidOperator::addUID(const GpgFrontend::GpgKey& key, +bool GpgFrontend::UIDOperator::AddUID(const GpgFrontend::GpgKey& key, const std::string& uid) { - auto err = gpgme_op_adduid(ctx, gpgme_key_t(key), uid.c_str(), 0); + 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; else return false; } -bool GpgFrontend::UidOperator::revUID(const GpgFrontend::GpgKey& key, +bool GpgFrontend::UIDOperator::RevUID(const GpgFrontend::GpgKey& key, const std::string& uid) { auto err = - check_gpg_error(gpgme_op_revuid(ctx, gpgme_key_t(key), uid.c_str(), 0)); + 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) return true; else return false; } -bool GpgFrontend::UidOperator::setPrimaryUID(const GpgFrontend::GpgKey& key, +bool GpgFrontend::UIDOperator::SetPrimaryUID(const GpgFrontend::GpgKey& key, const std::string& uid) { auto err = check_gpg_error(gpgme_op_set_uid_flag( - ctx, gpgme_key_t(key), uid.c_str(), "primary", nullptr)); + ctx_, gpgme_key_t(key), uid.c_str(), "primary", nullptr)); if (check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR) return true; else return false; } -bool GpgFrontend::UidOperator::addUID(const GpgFrontend::GpgKey& key, +bool GpgFrontend::UIDOperator::AddUID(const GpgFrontend::GpgKey& key, const std::string& name, const std::string& comment, const std::string& email) { - LOG(INFO) << "GpgFrontend::UidOperator::addUID" << name << comment << email; + LOG(INFO) << "GpgFrontend::UidOperator::AddUID" << name << comment << email; auto uid = boost::format("%1%(%2%)<%3%>") % name % comment % email; - return addUID(key, uid.str()); + return AddUID(key, uid.str()); } |