summaryrefslogtreecommitdiffstats
path: root/libkdenetwork/gpgmepp/decryptionresult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdenetwork/gpgmepp/decryptionresult.cpp')
-rw-r--r--libkdenetwork/gpgmepp/decryptionresult.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libkdenetwork/gpgmepp/decryptionresult.cpp b/libkdenetwork/gpgmepp/decryptionresult.cpp
index cdefefe9..2efcc67d 100644
--- a/libkdenetwork/gpgmepp/decryptionresult.cpp
+++ b/libkdenetwork/gpgmepp/decryptionresult.cpp
@@ -25,11 +25,13 @@
#include <gpgmepp/decryptionresult.h>
#include "shared.h"
#include "result_p.h"
+#include "util.h"
#include <gpgme.h>
#include <cstring>
#include <cstdlib>
+#include <istream>
class GpgME::DecryptionResult::Private : public GpgME::Shared {
public:
@@ -71,3 +73,13 @@ bool GpgME::DecryptionResult::wrongKeyUsage() const {
#endif
return false;
}
+
+std::ostream & GpgME::operator<<( std::ostream & os, const DecryptionResult & result ) {
+ os << "GpgME::DecryptionResult(";
+ if ( !result.isNull() )
+ os << "\n error: " << result.error()
+ << "\n unsupportedAlgortihm: " << protect( result.unsupportedAlgortihm() )
+ << "\n wrongKeyUsage: " << result.wrongKeyUsage()
+ << '\n';
+ return os << ')';
+}