summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParthasarathi Susarla <sparthasarathi@novell.com>2006-06-13 11:06:02 +0000
committerParthasarathi Susarla <saps@src.gnome.org>2006-06-13 11:06:02 +0000
commitb64c4ac9c27cc039be6c62cdf42cdac1ca598ec4 (patch)
treee848708ad10f9443bb5b5d2aa0e16e5c299fe5d7
parent48c1509369a462b695b4a13c5d34e4114f88757d (diff)
downloadevolution-data-server-b64c4ac9c27cc039be6c62cdf42cdac1ca598ec4.tar.gz
Fixes bug #167517 on bnc
2006-06-13 Parthasarathi Susarla <sparthasarathi@novell.com> Fixes bug #167517 on bnc * e-gw-item.[ch]: Use the hasAttachment soap element to check if a mail contains an attachment or not.
-rw-r--r--servers/groupwise/ChangeLog7
-rw-r--r--servers/groupwise/e-gw-item.c16
-rw-r--r--servers/groupwise/e-gw-item.h1
3 files changed, 23 insertions, 1 deletions
diff --git a/servers/groupwise/ChangeLog b/servers/groupwise/ChangeLog
index 33c492bac..582cd8845 100644
--- a/servers/groupwise/ChangeLog
+++ b/servers/groupwise/ChangeLog
@@ -1,5 +1,12 @@
2006-06-13 Parthasarathi Susarla <sparthasarathi@novell.com>
+ Fixes bug #167517 on bnc
+
+ * e-gw-item.[ch]: Use the hasAttachment soap element
+ to check if a mail contains an attachment or not.
+
+2006-06-13 Parthasarathi Susarla <sparthasarathi@novell.com>
+
Fixes bug #179075 on bnc
* e-gw-item.c (e_gw_item_new_from_soap_parameter):
set the is_group_item to FALSE only if its a CALENDAR
diff --git a/servers/groupwise/e-gw-item.c b/servers/groupwise/e-gw-item.c
index 44a555428..b4db93804 100644
--- a/servers/groupwise/e-gw-item.c
+++ b/servers/groupwise/e-gw-item.c
@@ -72,6 +72,7 @@ struct _EGwItemPrivate {
char *msg_body_id;
int item_status;
/*Attachments*/
+ gboolean has_attachment;
GSList *attach_list ;
/*linkInfo for replies*/
EGwItemLinkInfo *link_info;
@@ -525,6 +526,7 @@ e_gw_item_init (EGwItem *item, EGwItemClass *klass)
priv->self_status = 0;
priv->link_info = NULL;
priv->msg_body_id = NULL;
+ priv->has_attachment = FALSE;
item->priv = priv;
@@ -1795,6 +1797,9 @@ e_gw_item_new_from_soap_parameter (const char *email, const char *container, Sou
} else if (!g_ascii_strcasecmp (name, "size")) {
item->priv->size = soup_soap_parameter_get_int_value (child);
+ } else if (!g_ascii_strcasecmp (name, "hasAttachment")) {
+ item->priv->has_attachment = soup_soap_parameter_get_int_value (child);
+
} else if (!g_ascii_strcasecmp (name, "options")) {
SoupSoapParameter *subparam;
char *value = NULL;
@@ -2065,6 +2070,14 @@ e_gw_item_get_mail_size (EGwItem *item)
return item->priv->size;
}
+gboolean
+e_gw_item_has_attachment (EGwItem *item)
+{
+ g_return_val_if_fail (E_IS_GW_ITEM (item), 0);
+
+ return item->priv->has_attachment;
+}
+
char *
e_gw_item_get_creation_date (EGwItem *item)
{
@@ -3116,7 +3129,8 @@ e_gw_item_append_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
char *str ;
char *str_len ;
- str = soup_base64_encode (priv->message, strlen (priv->message));
+ //str = soup_base64_encode (priv->message, strlen (priv->message));
+ str = g_strdup (priv->message);
str_len = g_strdup_printf ("%d", (int)strlen (str));
soup_soap_message_start_element (msg, "part", NULL, NULL);
soup_soap_message_add_attribute (msg, "length", str_len, NULL, NULL);
diff --git a/servers/groupwise/e-gw-item.h b/servers/groupwise/e-gw-item.h
index 1349b4e60..580f73794 100644
--- a/servers/groupwise/e-gw-item.h
+++ b/servers/groupwise/e-gw-item.h
@@ -298,6 +298,7 @@ void e_gw_item_set_source (EGwItem *item, char *source) ;
int e_gw_item_get_trigger (EGwItem *item);
void e_gw_item_set_trigger (EGwItem *item, int trigger);
+gboolean e_gw_item_has_attachment (EGwItem *item);
typedef struct {
char *email;