Mailing List Archive

[PATCH gpgme] cpp: Expose gpgme_decrypt_result_t.is_mime through cpp API
* lang/cpp/src/descriptionresult.cpp (DescriptionResult::isMime): New.
* lang/cpp/src/descriptionresult.h: Update accordingly.
* NEWS: Mention this.

--
This exposes the is_mime metadata from a decryption result to users
of the C++ library.

Signed-off-by: Carl Schwan <carl.schwan@gnupg.com>
---
lang/cpp/src/decryptionresult.cpp | 5 +++++
lang/cpp/src/decryptionresult.h | 1 +
2 files changed, 6 insertions(+)

diff --git a/lang/cpp/src/decryptionresult.cpp b/lang/cpp/src/decryptionresult.cpp
index f78cf1d3..ad1d1cb6 100644
--- a/lang/cpp/src/decryptionresult.cpp
+++ b/lang/cpp/src/decryptionresult.cpp
@@ -122,6 +122,11 @@ bool GpgME::DecryptionResult::isDeVs() const
return d && d->res.is_de_vs;
}

+bool GpgME::DecryptionResult::isMime() const
+{
+ return d && d->res.is_mime;
+}
+
const char *GpgME::DecryptionResult::fileName() const
{
return d ? d->res.file_name : nullptr ;
diff --git a/lang/cpp/src/decryptionresult.h b/lang/cpp/src/decryptionresult.h
index 84026d39..316d0413 100644
--- a/lang/cpp/src/decryptionresult.h
+++ b/lang/cpp/src/decryptionresult.h
@@ -75,6 +75,7 @@ public:
}
bool isWrongKeyUsage() const;
bool isDeVs() const;
+ bool isMime() const;

const char *fileName() const;

--
2.41.0



_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel