From e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 21 Jun 2002 20:47:20 +0000 Subject: added camel_gpg_context_new which I had forgotten before svn path=/trunk/; revision=17252 --- camel/camel-gpg-context.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'camel') diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c index 32764374ed..de2ff2fb76 100644 --- a/camel/camel-gpg-context.c +++ b/camel/camel-gpg-context.c @@ -124,6 +124,34 @@ camel_gpg_context_finalise (CamelObject *object) } +/** + * camel_gpg_context_new: + * @session: session + * @path: path to gpg binary + * + * Creates a new gpg cipher context object. + * + * Returns a new gpg cipher context object. + **/ +CamelCipherContext * +camel_gpg_context_new (CamelSession *session, const char *path) +{ + CamelCipherContext *cipher; + CamelGpgContext *ctx; + + g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL); + g_return_val_if_fail (path != NULL, NULL); + + ctx = (CamelGpgContext *) camel_object_new (camel_gpg_context_get_type ()); + ctx->path = g_strdup (path); + + cipher = (CamelCipherContext *) ctx; + cipher->session = session; + camel_object_ref (session); + + return cipher; +} + static const char * gpg_hash_to_id (CamelCipherContext *context, CamelCipherHash hash) { -- cgit