diff --git a/NEWS b/NEWS index 365d4f95..4830dd51 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,7 @@ Noteworthy changes in version 1.18.1 (unreleased) gpgme_op_verify_ext NEW. cpp: GpgGenCardKeyInteractor::Curve NEW. cpp: GpgGenCardKeyInteractor::setCurve NEW. + cpp: Data::setFileName EXTENDED: New overload qt: ListAllKeysJob::Option NEW. qt: ListAllKeysJob::Options NEW. qt: ListAllKeysJob::setOptions NEW. diff --git a/lang/cpp/src/data.cpp b/lang/cpp/src/data.cpp index 7a93cbc2..dd8b1740 100644 --- a/lang/cpp/src/data.cpp +++ b/lang/cpp/src/data.cpp @@ -217,6 +217,11 @@ GpgME::Error GpgME::Data::setFileName(const char *name) return Error(gpgme_data_set_file_name(d->data, name)); } +GpgME::Error GpgME::Data::setFileName(const std::string &name) +{ + return Error(gpgme_data_set_file_name(d->data, name.c_str())); +} + ssize_t GpgME::Data::read(void *buffer, size_t length) { return gpgme_data_read(d->data, buffer, length); diff --git a/lang/cpp/src/data.h b/lang/cpp/src/data.h index 649e4104..9a5d5b0c 100644 --- a/lang/cpp/src/data.h +++ b/lang/cpp/src/data.h @@ -106,6 +106,7 @@ public: char *fileName() const; Error setFileName(const char *name); + Error setFileName(const std::string &name); ssize_t read(void *buffer, size_t length); ssize_t write(const void *buffer, size_t length);