aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-filter-enriched.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-06-25 18:20:09 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-06-25 18:20:09 +0800
commitf1436cca07e8c0db741297e57e4a4e5463c7f48a (patch)
tree9d6c3601b58ed0d0bb810be094e3302e82005eb2 /camel/camel-mime-filter-enriched.c
parent28667a045b9d122148ae541270b17f76d9ca6e44 (diff)
downloadgsoc2013-evolution-f1436cca07e8c0db741297e57e4a4e5463c7f48a.tar
gsoc2013-evolution-f1436cca07e8c0db741297e57e4a4e5463c7f48a.tar.gz
gsoc2013-evolution-f1436cca07e8c0db741297e57e4a4e5463c7f48a.tar.bz2
gsoc2013-evolution-f1436cca07e8c0db741297e57e4a4e5463c7f48a.tar.lz
gsoc2013-evolution-f1436cca07e8c0db741297e57e4a4e5463c7f48a.tar.xz
gsoc2013-evolution-f1436cca07e8c0db741297e57e4a4e5463c7f48a.tar.zst
gsoc2013-evolution-f1436cca07e8c0db741297e57e4a4e5463c7f48a.zip
** See bug #43887
2003-06-20 Not Zed <NotZed@Ximian.com> ** See bug #43887 * camel-mime-filter-enriched.c (camel_enriched_to_html): simple wrapper to convert enriched to html in one go. svn path=/trunk/; revision=21529
Diffstat (limited to 'camel/camel-mime-filter-enriched.c')
-rw-r--r--camel/camel-mime-filter-enriched.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/camel/camel-mime-filter-enriched.c b/camel/camel-mime-filter-enriched.c
index 23ffd73493..e653eea727 100644
--- a/camel/camel-mime-filter-enriched.c
+++ b/camel/camel-mime-filter-enriched.c
@@ -570,3 +570,22 @@ camel_mime_filter_enriched_new (guint32 flags)
return CAMEL_MIME_FILTER (new);
}
+
+char *
+camel_enriched_to_html(const char *in, guint32 flags)
+{
+ CamelMimeFilter *filter;
+ size_t outlen, outpre;
+ char *outbuf;
+
+ if (in == NULL)
+ return NULL;
+
+ filter = camel_mime_filter_enriched_new(flags);
+
+ camel_mime_filter_complete(filter, (char *)in, strlen(in), 0, &outbuf, &outlen, &outpre);
+ outbuf = g_strndup (outbuf, outlen);
+ camel_object_unref (filter);
+
+ return outbuf;
+}