summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2005-01-27 07:51:01 +0000
committerChenthill Palanisamy <pchen@src.gnome.org>2005-01-27 07:51:01 +0000
commit8e1d5702168f631589f00e8e4a6b3a662ca68421 (patch)
tree552e6976801d664aac3a0a2a9475555590f95fed
parent7cd6f0bf4e32c1908f5381ddd1a6e397bb896009 (diff)
downloadevolution-data-server-8e1d5702168f631589f00e8e4a6b3a662ca68421.tar.gz
Added functions to get and set the completed date. Added a variable in the
2005-01-27 Chenthill Palanisamy <pchenthill@novell.com> * e-gw-item.c: (e_gw_item_init), (set_recipient_list_from_soap_parameter), (e_gw_item_get_completed_date), (e_gw_item_set_completed_date): * e-gw-item.h: Added functions to get and set the completed date. Added a variable in the priv structure for storing the completed date.
-rw-r--r--servers/groupwise/ChangeLog8
-rw-r--r--servers/groupwise/e-gw-item.c34
-rw-r--r--servers/groupwise/e-gw-item.h2
3 files changed, 43 insertions, 1 deletions
diff --git a/servers/groupwise/ChangeLog b/servers/groupwise/ChangeLog
index 3c5152be5..a230079b5 100644
--- a/servers/groupwise/ChangeLog
+++ b/servers/groupwise/ChangeLog
@@ -1,3 +1,11 @@
+2005-01-27 Chenthill Palanisamy <pchenthill@novell.com>
+
+ * e-gw-item.c: (e_gw_item_init),
+ (set_recipient_list_from_soap_parameter),
+ (e_gw_item_get_completed_date), (e_gw_item_set_completed_date):
+ * e-gw-item.h: Added functions to get and set the completed date.
+ Added a variable in the priv structure for storing the completed date.
+
2005-01-08 Not Zed <NotZed@Ximian.com>
* e-gw-item.c (e_gw_item_set_calendar_item_elements): cast strlen to int.
diff --git a/servers/groupwise/e-gw-item.c b/servers/groupwise/e-gw-item.c
index 6d1633b55..8b1be93c9 100644
--- a/servers/groupwise/e-gw-item.c
+++ b/servers/groupwise/e-gw-item.c
@@ -42,6 +42,7 @@ struct _EGwItemPrivate {
char *start_date;
char *end_date;
char *due_date;
+ char *completed_date;
gboolean completed;
gboolean is_allday_event;
char *subject;
@@ -328,6 +329,7 @@ e_gw_item_init (EGwItem *item, EGwItemClass *klass)
priv->start_date = NULL;
priv->end_date = NULL;
priv->due_date = NULL;
+ priv->completed_date = NULL;
priv->trigger = 0;
priv->recipient_list = NULL;
priv->organizer = NULL;
@@ -427,6 +429,9 @@ set_recipient_list_from_soap_parameter (EGwItem *item, SoupSoapParameter *param)
to none. */
subparam = soup_soap_parameter_get_first_child_by_name (param_recipient, "recipientStatus");
if (subparam) {
+ char *formatted_date, *value;
+ SoupSoapParameter *temp_param ;
+
if (soup_soap_parameter_get_first_child_by_name (subparam, "deleted"))
recipient->status = E_GW_ITEM_STAT_DECLINED;
if (soup_soap_parameter_get_first_child_by_name (subparam, "declined"))
@@ -435,6 +440,15 @@ set_recipient_list_from_soap_parameter (EGwItem *item, SoupSoapParameter *param)
recipient->status = E_GW_ITEM_STAT_ACCEPTED;
else
recipient->status = E_GW_ITEM_STAT_NONE;
+
+ temp_param = soup_soap_parameter_get_first_child_by_name (subparam, "completed");
+ if (temp_param) {
+ value = soup_soap_parameter_get_string_value (temp_param);
+ formatted_date = e_gw_connection_format_date_string (value);
+ e_gw_item_set_completed_date (item, formatted_date);
+ g_free (value);
+ g_free (formatted_date);
+ }
}
else {
/* if recipientStatus is not provided, use the
@@ -1645,6 +1659,24 @@ e_gw_item_set_due_date (EGwItem *item, const char *new_date)
item->priv->due_date = g_strdup (new_date);
}
+char *
+e_gw_item_get_completed_date (EGwItem *item)
+{
+ g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
+
+ return item->priv->completed_date;
+}
+
+void
+e_gw_item_set_completed_date (EGwItem *item, const char *new_date)
+{
+ g_return_if_fail (E_IS_GW_ITEM (item));
+
+ if (item->priv->completed_date)
+ g_free (item->priv->completed_date);
+ item->priv->completed_date = g_strdup (new_date);
+}
+
const char *
e_gw_item_get_subject (EGwItem *item)
{
@@ -1900,7 +1932,7 @@ add_distribution_to_soap_message (EGwItemOrganizer *organizer, GSList *recipient
soup_soap_message_end_element (msg);
}
-void
+static void
e_gw_item_set_calendar_item_elements (EGwItem *item, SoupSoapMessage *msg)
{
EGwItemPrivate *priv = item->priv;
diff --git a/servers/groupwise/e-gw-item.h b/servers/groupwise/e-gw-item.h
index ec2117cff..0195da730 100644
--- a/servers/groupwise/e-gw-item.h
+++ b/servers/groupwise/e-gw-item.h
@@ -119,6 +119,8 @@ char *e_gw_item_get_creation_date (EGwItem *item);
void e_gw_item_set_creation_date (EGwItem *item, const char *new_date);
char *e_gw_item_get_start_date (EGwItem *item);
void e_gw_item_set_start_date (EGwItem *item, const char *new_date);
+char *e_gw_item_get_completed_date (EGwItem *item);
+void e_gw_item_set_completed_date (EGwItem *item, const char *new_date);
char *e_gw_item_get_end_date (EGwItem *item);
void e_gw_item_set_end_date (EGwItem *item, const char *new_date);
char *e_gw_item_get_due_date (EGwItem *item);