From fd83a09d5ced1b3a89dcf122e7ec47d5985de062 Mon Sep 17 00:00:00 2001
From: Radek Doulik <rodo@ximian.com>
Date: Tue, 27 Jul 2004 16:52:33 +0000
Subject: added len parameter to em_utils_part_to_html and
 em_utils_message_to_html.

2004-07-23  Radek Doulik  <rodo@ximian.com>

	* added len parameter to em_utils_part_to_html and
	em_utils_message_to_html. it is used to return length of returned
	buffer. we use that info later when setting composer body content.

svn path=/trunk/; revision=26747
---
 mail/em-utils.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'mail/em-utils.c')

diff --git a/mail/em-utils.c b/mail/em-utils.c
index 1fea720579..8e47f68254 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1365,7 +1365,7 @@ em_utils_get_proxy_uri(void)
  * Return Value: The part in displayable html format.
  **/
 char *
-em_utils_part_to_html(CamelMimePart *part)
+em_utils_part_to_html(CamelMimePart *part, ssize_t *len)
 {
 	EMFormatQuote *emfq;
 	CamelStreamMem *mem;
@@ -1385,6 +1385,8 @@ em_utils_part_to_html(CamelMimePart *part)
 	camel_object_unref (mem);
 	
 	text = buf->data;
+	if (len)
+		*len = buf->len;
 	g_byte_array_free (buf, FALSE);
 	
 	return text;
@@ -1402,7 +1404,7 @@ em_utils_part_to_html(CamelMimePart *part)
  * Return value: The html version.
  **/
 char *
-em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 flags)
+em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 flags, ssize_t *len)
 {
 	EMFormatQuote *emfq;
 	CamelStreamMem *mem;
@@ -1422,6 +1424,8 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
 	camel_object_unref (mem);
 	
 	text = buf->data;
+	if (len)
+		*len = buf->len;
 	g_byte_array_free (buf, FALSE);
 	
 	return text;
-- 
cgit