aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2002-06-22 04:47:20 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-06-22 04:47:20 +0800
commite1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b (patch)
tree7ae3e588fc3e27a45d3a22522f89711c1e298d27 /camel
parentea6569368591c16ec4ef6398016a7d33579a793d (diff)
downloadgsoc2013-evolution-e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b.tar
gsoc2013-evolution-e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b.tar.gz
gsoc2013-evolution-e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b.tar.bz2
gsoc2013-evolution-e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b.tar.lz
gsoc2013-evolution-e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b.tar.xz
gsoc2013-evolution-e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b.tar.zst
gsoc2013-evolution-e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b.zip
added camel_gpg_context_new which I had forgotten before
svn path=/trunk/; revision=17252
Diffstat (limited to 'camel')
-rw-r--r--camel/camel-gpg-context.c28
1 files changed, 28 insertions, 0 deletions
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)
{