#if (GMIME_MAJOR_VERSION < 3)
/* Create a GPG context (GMime 2.6) */
static notmuch_crypto_context_t *
-create_gpg_context (notmuch_crypto_t *crypto)
+create_gpg_context (_notmuch_crypto_t *crypto)
{
notmuch_crypto_context_t *gpgctx;
/* Create a PKCS7 context (GMime 2.6) */
static notmuch_crypto_context_t *
-create_pkcs7_context (notmuch_crypto_t *crypto)
+create_pkcs7_context (_notmuch_crypto_t *crypto)
{
notmuch_crypto_context_t *pkcs7ctx;
}
static const struct {
const char *protocol;
- notmuch_crypto_context_t *(*get_context) (notmuch_crypto_t *crypto);
+ notmuch_crypto_context_t *(*get_context) (_notmuch_crypto_t *crypto);
} protocols[] = {
{
.protocol = "application/pgp-signature",
/* for the specified protocol return the context pointer (initializing
* if needed) */
notmuch_crypto_context_t *
-notmuch_crypto_get_context (notmuch_crypto_t *crypto, const char *protocol)
+_notmuch_crypto_get_context (_notmuch_crypto_t *crypto, const char *protocol)
{
notmuch_crypto_context_t *cryptoctx = NULL;
size_t i;
}
int
-notmuch_crypto_cleanup (notmuch_crypto_t *crypto)
+_notmuch_crypto_cleanup (_notmuch_crypto_t *crypto)
{
if (crypto->gpgctx) {
g_object_unref (crypto->gpgctx);
return 0;
}
#else
-int notmuch_crypto_cleanup (unused(notmuch_crypto_t *crypto))
+int _notmuch_crypto_cleanup (unused(_notmuch_crypto_t *crypto))
{
return 0;
}
GMimeMessage *mime_message;
/* Context provided by the caller. */
- notmuch_crypto_t *crypto;
+ _notmuch_crypto_t *crypto;
} mime_node_context_t;
static int
notmuch_status_t
mime_node_open (const void *ctx, notmuch_message_t *message,
- notmuch_crypto_t *crypto, mime_node_t **root_out)
+ _notmuch_crypto_t *crypto, mime_node_t **root_out)
{
const char *filename = notmuch_message_get_filename (message);
mime_node_context_t *mctx;
|| (GMIME_IS_MULTIPART_SIGNED (part) && node->ctx->crypto->verify)) {
GMimeContentType *content_type = g_mime_object_get_content_type (part);
const char *protocol = g_mime_content_type_get_parameter (content_type, "protocol");
- cryptoctx = notmuch_crypto_get_context (node->ctx->crypto, protocol);
+ cryptoctx = _notmuch_crypto_get_context (node->ctx->crypto, protocol);
if (!cryptoctx)
return NULL;
}
const struct notmuch_show_params *params);
} notmuch_show_format_t;
-typedef struct notmuch_crypto {
+typedef struct _notmuch_crypto {
bool verify;
bool decrypt;
#if (GMIME_MAJOR_VERSION < 3)
notmuch_crypto_context_t* pkcs7ctx;
const char *gpgpath;
#endif
-} notmuch_crypto_t;
+} _notmuch_crypto_t;
typedef struct notmuch_show_params {
bool entire_thread;
bool omit_excluded;
bool output_body;
int part;
- notmuch_crypto_t crypto;
+ _notmuch_crypto_t crypto;
bool include_html;
GMimeStream *out_stream;
} notmuch_show_params_t;
#if (GMIME_MAJOR_VERSION <3)
notmuch_crypto_context_t *
-notmuch_crypto_get_context (notmuch_crypto_t *crypto, const char *protocol);
+_notmuch_crypto_get_context (_notmuch_crypto_t *crypto, const char *protocol);
#endif
int
-notmuch_crypto_cleanup (notmuch_crypto_t *crypto);
+_notmuch_crypto_cleanup (_notmuch_crypto_t *crypto);
int
notmuch_count_command (notmuch_config_t *config, int argc, char *argv[]);
*/
notmuch_status_t
mime_node_open (const void *ctx, notmuch_message_t *message,
- notmuch_crypto_t *crypto, mime_node_t **node_out);
+ _notmuch_crypto_t *crypto, mime_node_t **node_out);
/* Return a new MIME node for the requested child part of parent.
* parent will be used as the talloc context for the returned child
if (do_reply (config, query, ¶ms, format, reply_all) != 0)
return EXIT_FAILURE;
- notmuch_crypto_cleanup (¶ms.crypto);
+ _notmuch_crypto_cleanup (¶ms.crypto);
notmuch_query_destroy (query);
notmuch_database_destroy (notmuch);
g_mime_stream_flush (params.out_stream);
g_object_unref (params.out_stream);
- notmuch_crypto_cleanup (¶ms.crypto);
+ _notmuch_crypto_cleanup (¶ms.crypto);
notmuch_query_destroy (query);
notmuch_database_destroy (notmuch);