gmime 2.4 defines GMimeCipherContext, while 2.6 defines
GMimeCryptoContext. typedef them both to notmuch_crypto_context_t to
cover this discrepancy and remove a bunch of #ifdefs.
GMimeMessage *mime_message;
/* Context provided by the caller. */
GMimeMessage *mime_message;
/* Context provided by the caller. */
-#ifdef GMIME_ATLEAST_26
- GMimeCryptoContext *cryptoctx;
-#else
- GMimeCipherContext *cryptoctx;
-#endif
+ notmuch_crypto_context_t *cryptoctx;
notmuch_bool_t decrypt;
} mime_node_context_t;
notmuch_bool_t decrypt;
} mime_node_context_t;
notmuch_status_t
mime_node_open (const void *ctx, notmuch_message_t *message,
notmuch_status_t
mime_node_open (const void *ctx, notmuch_message_t *message,
-#ifdef GMIME_ATLEAST_26
- GMimeCryptoContext *cryptoctx,
-#else
- GMimeCipherContext *cryptoctx,
-#endif
+ notmuch_crypto_context_t *cryptoctx,
notmuch_bool_t decrypt, mime_node_t **root_out)
{
const char *filename = notmuch_message_get_filename (message);
notmuch_bool_t decrypt, mime_node_t **root_out)
{
const char *filename = notmuch_message_get_filename (message);
* these to check the version number. */
#ifdef GMIME_MAJOR_VERSION
#define GMIME_ATLEAST_26
* these to check the version number. */
#ifdef GMIME_MAJOR_VERSION
#define GMIME_ATLEAST_26
+typedef GMimeCryptoContext notmuch_crypto_context_t;
+#else
+typedef GMimeCipherContext notmuch_crypto_context_t;
#endif
#include "notmuch.h"
#endif
#include "notmuch.h"
notmuch_bool_t omit_excluded;
notmuch_bool_t raw;
int part;
notmuch_bool_t omit_excluded;
notmuch_bool_t raw;
int part;
-#ifdef GMIME_ATLEAST_26
- GMimeCryptoContext* cryptoctx;
-#else
- GMimeCipherContext* cryptoctx;
-#endif
+ notmuch_crypto_context_t* cryptoctx;
notmuch_bool_t decrypt;
} notmuch_show_params_t;
notmuch_bool_t decrypt;
} notmuch_show_params_t;
*/
notmuch_status_t
mime_node_open (const void *ctx, notmuch_message_t *message,
*/
notmuch_status_t
mime_node_open (const void *ctx, notmuch_message_t *message,
-#ifdef GMIME_ATLEAST_26
- GMimeCryptoContext *cryptoctx,
-#else
- GMimeCipherContext *cryptoctx,
-#endif
+ notmuch_crypto_context_t *cryptoctx,
notmuch_bool_t decrypt, mime_node_t **node_out);
/* Return a new MIME node for the requested child part of parent.
notmuch_bool_t decrypt, mime_node_t **node_out);
/* Return a new MIME node for the requested child part of parent.