diff options
author | Andre Heinecke <[email protected]> | 2018-05-29 07:16:22 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2018-05-29 07:19:50 +0000 |
commit | 618aa7f08db41911f25632d9fba23bca80908ebe (patch) | |
tree | db72649583416f11422685462be70b0f2639b69d /lang/cpp/src/data.cpp | |
parent | json: Fix compiler warning. (diff) | |
download | gpgme-618aa7f08db41911f25632d9fba23bca80908ebe.tar.gz gpgme-618aa7f08db41911f25632d9fba23bca80908ebe.zip |
cpp: Add gpgme_data_rewind to cpp API
* lang/cpp/src/data.h, lang/cpp/src/data.cpp (Data::rewind): New.
* lang/qt/tests/t-various.cpp (testDataRewind): Test it.
--
The advantage of this convieniance function in GPGME is that
it avoids the messiness that are declarations with off_t.
GnuPG-Bug-Id: T3996
Diffstat (limited to 'lang/cpp/src/data.cpp')
-rw-r--r-- | lang/cpp/src/data.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lang/cpp/src/data.cpp b/lang/cpp/src/data.cpp index 52b8da24..2782aa79 100644 --- a/lang/cpp/src/data.cpp +++ b/lang/cpp/src/data.cpp @@ -232,6 +232,11 @@ off_t GpgME::Data::seek(off_t offset, int whence) return gpgme_data_seek(d->data, offset, whence); } +GpgME::Error GpgME::Data::rewind() +{ + return Error(gpgme_data_rewind(d->data)); +} + std::vector<GpgME::Key> GpgME::Data::toKeys(Protocol proto) const { std::vector<GpgME::Key> ret; |