summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/generate.h2
-rw-r--r--src/gpgme.cc18
-rw-r--r--src/gpgme.h2
-rw-r--r--src/pyutils.h4
-rw-r--r--src/select.h4
-rw-r--r--src/stats.h2
-rw-r--r--src/unistring.h2
-rw-r--r--src/views.h2
8 files changed, 13 insertions, 23 deletions
diff --git a/src/generate.h b/src/generate.h
index abc603b9..8b60e892 100644
--- a/src/generate.h
+++ b/src/generate.h
@@ -30,7 +30,7 @@
*/
/**
- * @addtogroup generate
+ * @addtogroup report
*/
/**
diff --git a/src/gpgme.cc b/src/gpgme.cc
index 4f949c8c..15a40405 100644
--- a/src/gpgme.cc
+++ b/src/gpgme.cc
@@ -136,15 +136,9 @@ shared_ptr<Data> decrypted_stream_t::decrypt(shared_ptr<Data> enc_d) {
ctx = nullptr;
dec_d = enc_d;
} else {
-#if GPGME_VERSION_NUMBER < 0x010d00
- ctx = unique_ptr<Context>(Context::createForProtocol(enc_d->type() == Data::PGPEncrypted
- ? Protocol::OpenPGP
- : Protocol::CMS));
-#else
ctx = Context::create(enc_d->type() == Data::PGPEncrypted
? Protocol::OpenPGP
: Protocol::CMS);
-#endif
if (!ctx)
throw runtime_error("Unable to establish decryption context");
@@ -166,14 +160,6 @@ static inline void init_lib() {
throw_(runtime_error, _f("%1%: %2%") % err.source() % err.asString());
}
-static inline void rewind(Data * d) {
-#if GPGME_VERSION_NUMBER < 0x010c00
- d->seek(0, SEEK_SET);
-#else
- d->rewind();
-#endif
-}
-
istream* decrypted_stream_t::open_stream(const path& filename) {
init_lib();
@@ -181,7 +167,7 @@ istream* decrypted_stream_t::open_stream(const path& filename) {
auto enc_d = setup_cipher_buffer(file.get());
if (is_encrypted(enc_d)) {
auto dec_d = decrypt(enc_d);
- rewind(dec_d.get());
+ dec_d.get()->rewind();
return new decrypted_stream_t(dec_d);
}
return new ifstream(filename);
@@ -194,7 +180,7 @@ decrypted_stream_t::decrypted_stream_t(path& filename)
file = open_file(filename);
auto enc_d = setup_cipher_buffer(file);
dec_d = decrypt(enc_d);
- rewind(dec_d.get());
+ dec_d.get()->rewind();
if (is_encrypted(enc_d)) {
fclose(file);
diff --git a/src/gpgme.h b/src/gpgme.h
index 1de1e197..433ec8de 100644
--- a/src/gpgme.h
+++ b/src/gpgme.h
@@ -30,7 +30,7 @@
*/
/**
- * @addtogroup extra
+ * @defgroup extra Extra functionality
*/
/**
diff --git a/src/pyutils.h b/src/pyutils.h
index c02be37b..9c501a5c 100644
--- a/src/pyutils.h
+++ b/src/pyutils.h
@@ -29,6 +29,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+ * @addtogroup python
+ */
+
/**
* @file pyutils.h
* @author John Wiegley
diff --git a/src/select.h b/src/select.h
index bb7b9355..07a09471 100644
--- a/src/select.h
+++ b/src/select.h
@@ -30,14 +30,14 @@
*/
/**
- * @addtogroup select
+ * @addtogroup util
*/
/**
* @file select.h
* @author John Wiegley
*
- * @ingroup select
+ * @ingroup util
*/
#pragma once
diff --git a/src/stats.h b/src/stats.h
index 6912762d..f1233f32 100644
--- a/src/stats.h
+++ b/src/stats.h
@@ -30,7 +30,7 @@
*/
/**
- * @addtogroup stats
+ * @addtogroup report
*/
/**
diff --git a/src/unistring.h b/src/unistring.h
index 6761accb..dc941848 100644
--- a/src/unistring.h
+++ b/src/unistring.h
@@ -30,7 +30,7 @@
*/
/**
- * @addtogroup utils
+ * @addtogroup util
*/
/**
diff --git a/src/views.h b/src/views.h
index 9e8bc7c0..0d745f52 100644
--- a/src/views.h
+++ b/src/views.h
@@ -30,7 +30,7 @@
*/
/**
- * @addtogroup views
+ * @defgroup views Views
*/
/**