aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgTOFUInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model/GpgTOFUInfo.cpp')
-rw-r--r--src/core/model/GpgTOFUInfo.cpp59
1 files changed, 31 insertions, 28 deletions
diff --git a/src/core/model/GpgTOFUInfo.cpp b/src/core/model/GpgTOFUInfo.cpp
index 84ce1e29..251affc2 100644
--- a/src/core/model/GpgTOFUInfo.cpp
+++ b/src/core/model/GpgTOFUInfo.cpp
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2021 Saturneric
+ * Copyright (C) 2021 Saturneric <[email protected]>
*
* This file is part of GpgFrontend.
*
@@ -20,7 +20,7 @@
* the gpg4usb project, which is under GPL-3.0-or-later.
*
* All the source code of GpgFrontend was modified and released by
- * Saturneric<[email protected]> starting on May 12, 2021.
+ * Saturneric <[email protected]> starting on May 12, 2021.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
@@ -28,39 +28,40 @@
#include "GpgTOFUInfo.h"
-GpgFrontend::GpgTOFUInfo::GpgTOFUInfo() = default;
+namespace GpgFrontend {
-GpgFrontend::GpgTOFUInfo::GpgTOFUInfo(gpgme_tofu_info_t tofu_info)
- : _tofu_info_ref(tofu_info, [&](gpgme_tofu_info_t tofu_info) {}) {}
+GpgTOFUInfo::GpgTOFUInfo() = default;
-GpgFrontend::GpgTOFUInfo::GpgTOFUInfo(GpgTOFUInfo&& o) noexcept {
- swap(_tofu_info_ref, o._tofu_info_ref);
+GpgTOFUInfo::GpgTOFUInfo(gpgme_tofu_info_t tofu_info)
+ : tofu_info_ref_(tofu_info, [&](gpgme_tofu_info_t tofu_info) {}) {}
+
+GpgTOFUInfo::GpgTOFUInfo(GpgTOFUInfo&& o) noexcept {
+ swap(tofu_info_ref_, o.tofu_info_ref_);
}
-GpgFrontend::GpgTOFUInfo& GpgFrontend::GpgTOFUInfo::operator=(
- GpgTOFUInfo&& o) noexcept {
- swap(_tofu_info_ref, o._tofu_info_ref);
+auto GpgTOFUInfo::operator=(GpgTOFUInfo&& o) noexcept -> GpgTOFUInfo& {
+ swap(tofu_info_ref_, o.tofu_info_ref_);
return *this;
};
-unsigned GpgFrontend::GpgTOFUInfo::GetValidity() const {
- return _tofu_info_ref->validity;
+auto GpgTOFUInfo::GetValidity() const -> unsigned {
+ return tofu_info_ref_->validity;
}
-unsigned GpgFrontend::GpgTOFUInfo::GetPolicy() const {
- return _tofu_info_ref->policy;
+auto GpgTOFUInfo::GetPolicy() const -> unsigned {
+ return tofu_info_ref_->policy;
}
-unsigned long GpgFrontend::GpgTOFUInfo::GetSignCount() const {
- return _tofu_info_ref->signcount;
+auto GpgTOFUInfo::GetSignCount() const -> unsigned long {
+ return tofu_info_ref_->signcount;
}
-unsigned long GpgFrontend::GpgTOFUInfo::GetEncrCount() const {
- return _tofu_info_ref->encrcount;
+auto GpgTOFUInfo::GetEncrCount() const -> unsigned long {
+ return tofu_info_ref_->encrcount;
}
-unsigned long GpgFrontend::GpgTOFUInfo::GetSignFirst() const {
- return _tofu_info_ref->signfirst;
+auto GpgTOFUInfo::GetSignFirst() const -> unsigned long {
+ return tofu_info_ref_->signfirst;
}
/**
@@ -68,8 +69,8 @@ unsigned long GpgFrontend::GpgTOFUInfo::GetSignFirst() const {
*
* @return unsigned long
*/
-unsigned long GpgFrontend::GpgTOFUInfo::GetSignLast() const {
- return _tofu_info_ref->signlast;
+auto GpgTOFUInfo::GetSignLast() const -> unsigned long {
+ return tofu_info_ref_->signlast;
}
/**
@@ -77,15 +78,17 @@ unsigned long GpgFrontend::GpgTOFUInfo::GetSignLast() const {
*
* @return unsigned long
*/
-unsigned long GpgFrontend::GpgTOFUInfo::GetEncrLast() const {
- return _tofu_info_ref->encrlast;
+auto GpgTOFUInfo::GetEncrLast() const -> unsigned long {
+ return tofu_info_ref_->encrlast;
}
/**
* @brief
*
- * @return std::string
+ * @return QString
*/
-std::string GpgFrontend::GpgTOFUInfo::GetDescription() const {
- return _tofu_info_ref->description;
-} \ No newline at end of file
+auto GpgTOFUInfo::GetDescription() const -> QString {
+ return tofu_info_ref_->description;
+}
+
+} // namespace GpgFrontend \ No newline at end of file