aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/camel-mime-filter-tohtml.c22
-rw-r--r--camel/camel-mime-filter-tohtml.h6
3 files changed, 32 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index e37403899b..64768a5425 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,9 @@
2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
+ * camel-mime-filter-tohtml.c (camel_text_to_html): New convenience
+ function to replace calls to e_text_to_html() in the
+ mailer/composer etc.
+
* camel.h: #include some headers we had forgotten to add
previously, also added camel-mime-filter-enriched.h.
diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c
index a3494ba72f..4f9d972625 100644
--- a/camel/camel-mime-filter-tohtml.c
+++ b/camel/camel-mime-filter-tohtml.c
@@ -404,3 +404,25 @@ camel_mime_filter_tohtml_new (guint32 flags, guint32 colour)
return CAMEL_MIME_FILTER (new);
}
+
+
+char *
+camel_text_to_html (const char *in, guint32 flags, guint32 colour)
+{
+ CamelMimeFilter *filter;
+ size_t outlen, outpre;
+ char *outbuf;
+
+ g_return_val_if_fail (in != NULL, NULL);
+
+ filter = camel_mime_filter_tohtml_new (flags, colour);
+
+ camel_mime_filter_complete (filter, (char *) in, strlen (in), 0,
+ &outbuf, &outlen, &outpre);
+
+ outbuf = g_strndup (outbuf, outlen);
+
+ camel_object_unref (filter);
+
+ return outbuf;
+}
diff --git a/camel/camel-mime-filter-tohtml.h b/camel/camel-mime-filter-tohtml.h
index 2c1c07e5e3..de8690a1e0 100644
--- a/camel/camel-mime-filter-tohtml.h
+++ b/camel/camel-mime-filter-tohtml.h
@@ -44,6 +44,7 @@ extern "C" {
#define CAMEL_MIME_FILTER_TOHTML_ESCAPE_8BIT (1 << 6)
#define CAMEL_MIME_FILTER_TOHTML_CITE (1 << 7)
#define CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT (1 << 8)
+#define CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED (1 << 9)
typedef struct _CamelMimeFilterToHTMLClass CamelMimeFilterToHTMLClass;
typedef struct _CamelMimeFilterToHTML CamelMimeFilterToHTML;
@@ -69,6 +70,11 @@ CamelType camel_mime_filter_tohtml_get_type (void);
CamelMimeFilter *camel_mime_filter_tohtml_new (guint32 flags, guint32 colour);
+
+/* utility functions to replace e_text_to_html shit */
+
+char *camel_text_to_html (const char *in, guint32 flags, guint32 colour);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */