aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/data.h
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2018-02-09 15:03:37 +0000
committerAndre Heinecke <[email protected]>2018-02-09 15:11:03 +0000
commit5a5b0d4996c17bfbc69b90f89fec23732f92813a (patch)
treeeabf012fd46261ae63b217b4bf11625db19b5fa3 /lang/cpp/src/data.h
parentFix for BSD Make. (diff)
downloadgpgme-5a5b0d4996c17bfbc69b90f89fec23732f92813a.tar.gz
gpgme-5a5b0d4996c17bfbc69b90f89fec23732f92813a.zip
cpp: Add conveniance Data::toString
* lang/cpp/src/data.h, lang/cpp/src/data.cpp: Add Data::toString. -- I'm lazy and like to waste memory.
Diffstat (limited to 'lang/cpp/src/data.h')
-rw-r--r--lang/cpp/src/data.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lang/cpp/src/data.h b/lang/cpp/src/data.h
index cc7906fb..446f6fa3 100644
--- a/lang/cpp/src/data.h
+++ b/lang/cpp/src/data.h
@@ -114,6 +114,9 @@ public:
* Protocol proto. Returns an empty list on error.*/
std::vector<Key> toKeys(const Protocol proto = Protocol::OpenPGP) const;
+ /** Return a copy of the data as std::string. Sets seek pos to 0 */
+ std::string toString();
+
class Private;
Private *impl()
{