Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:pchenthill
evolution-data-server
gw-reminder-notes.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gw-reminder-notes.patch of Package evolution-data-server
Index: servers/groupwise/e-gw-connection.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.c,v retrieving revision 1.143 diff -u -p -r1.143 e-gw-connection.c --- servers/groupwise/e-gw-connection.c 12 Jun 2006 09:19:39 -0000 1.143 +++ servers/groupwise/e-gw-connection.c 22 Jul 2006 08:24:14 -0000 @@ -3542,8 +3542,7 @@ e_gw_connection_read_cal_ids (EGwConnect else if (g_str_equal (item_type, "Task")) type = E_GW_ITEM_TYPE_TASK; else { - g_free (item_type); - continue; + type = E_GW_ITEM_TYPE_NOTE; } g_free (item_type); Index: servers/groupwise/e-gw-item.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-item.c,v retrieving revision 1.103 diff -u -p -r1.103 e-gw-item.c --- servers/gorupwise/e-gw-item.c 17 Jul 2006 11:00:50 -0000 1.103 +++ servers/groupwise/e-gw-item.c 22 Jul 2006 08:24:15 -0000 @@ -3234,6 +3234,11 @@ e_gw_item_append_to_soap_message (EGwIte e_gw_message_write_string_parameter (msg, "completed", NULL, "0"); break; + case E_GW_ITEM_TYPE_NOTE: + soup_soap_message_add_attribute (msg, "type", "Note", "xsi", NULL); + + e_gw_item_set_calendar_item_elements (item, msg); + break; case E_GW_ITEM_TYPE_CONTACT : soup_soap_message_add_attribute (msg, "type", "Contact", "xsi", NULL); append_contact_fields_to_soap_message (item, msg); @@ -3454,6 +3459,7 @@ e_gw_item_append_changes_to_soap_message return TRUE; case E_GW_ITEM_TYPE_APPOINTMENT: case E_GW_ITEM_TYPE_TASK : + case E_GW_ITEM_TYPE_NOTE: append_event_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_ADD); append_event_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_UPDATE); append_event_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_DELETE); Index: camel/providers/groupwise/camel-groupwise-folder.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-folder.c,v retrieving revision 1.140 diff -u -p -r1.140 camel-groupwise-folder.c --- camel/providers/groupwise/camel-groupwise-folder.c 5 Jul 2006 10:03:16 -0000 1.140 +++ camel/providers/groupwise/camel-groupwise-folder.c 22 Jul 2006 08:41:00 -0000 @@ -79,6 +79,7 @@ static void groupwise_transfer_messages_ static int gw_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args); void convert_to_calendar (EGwItem *item, char **str, int *len); static void convert_to_task (EGwItem *item, char **str, int *len); +static void convert_to_note (EGwItem *item, char **str, int *len); static void gw_update_all_items ( CamelFolder *folder, GList *item_list, CamelException *ex); static void groupwise_populate_details_from_item (CamelMimeMessage *msg, EGwItem *item); static void groupwise_populate_msg_body_from_item (EGwConnection *cnc, CamelMultipart *multipart, EGwItem *item, char *body); @@ -256,20 +257,23 @@ groupwise_populate_msg_body_from_item (E case E_GW_ITEM_TYPE_APPOINTMENT: case E_GW_ITEM_TYPE_TASK: + case E_GW_ITEM_TYPE_NOTE: { char *cal_buffer = NULL; int len = 0; if (type==E_GW_ITEM_TYPE_APPOINTMENT) convert_to_calendar (item, &cal_buffer, &len); - else + else if (type == E_GW_ITEM_TYPE_TASK) convert_to_task (item, &cal_buffer, &len); + else + convert_to_note (item, &cal_buffer, &len); + camel_mime_part_set_content(part, cal_buffer, len, "text/calendar"); g_free (cal_buffer); break; } case E_GW_ITEM_TYPE_NOTIFICATION: case E_GW_ITEM_TYPE_MAIL: - case E_GW_ITEM_TYPE_NOTE: if (body) camel_mime_part_set_content(part, body, strlen(body), "text/html"); else if (temp_body) @@ -2361,7 +2365,7 @@ convert_to_calendar (EGwItem *item, char g_strfreev (tmp); } -void +static void convert_to_task (EGwItem *item, char **str, int *len) { EGwItemOrganizer *org = NULL; @@ -2419,6 +2423,41 @@ convert_to_task (EGwItem *item, char **s gstr = g_string_append (gstr, "END:VTODO\n"); gstr = g_string_append (gstr, "END:VCALENDAR\n"); + + *str = g_strdup (gstr->str); + *len = gstr->len; + + g_string_free (gstr, TRUE); + g_strfreev (tmp); +} + +static void +convert_to_note (EGwItem *item, char **str, int *len) +{ + EGwItemOrganizer *org = NULL; + GString *gstr = g_string_new (NULL); + char **tmp = NULL; + + tmp = g_strsplit (e_gw_item_get_id (item), "@", -1); + + gstr = g_string_append (gstr, "BEGIN:VCALENDAR\n"); + gstr = g_string_append (gstr, "METHOD:PUBLISH\n"); + gstr = g_string_append (gstr, "BEGIN:VJOURNAL\n"); + g_string_append_printf (gstr, "UID:%s\n",e_gw_item_get_icalid (item)); + g_string_append_printf (gstr, "DTSTART:%s\n",e_gw_item_get_start_date (item)); + g_string_append_printf (gstr, "SUMMARY:%s\n", e_gw_item_get_subject (item)); + g_string_append_printf (gstr, "DESCRIPTION:%s\n", e_gw_item_get_message (item)); + g_string_append_printf (gstr, "DTSTAMP:%s\n", e_gw_item_get_creation_date (item)); + g_string_append_printf (gstr, "X-GWMESSAGEID:%s\n", e_gw_item_get_id (item)); + g_string_append_printf (gstr, "X-GWRECORDID:%s\n", tmp[0]); + + org = e_gw_item_get_organizer (item); + if (org) + g_string_append_printf (gstr, "ORGANIZER;CN= %s;ROLE= CHAIR;\n MAILTO:%s\n", + org->display_name, org->email); + + gstr = g_string_append (gstr, "END:VJOURNAL\n"); + gstr = g_string_append (gstr, "END:VCALENDAR\n"); *str = g_strdup (gstr->str); *len = gstr->len; Index: calendar/backends/groupwise/e-cal-backend-groupwise-factory.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-factory.c,v retrieving revision 1.3 diff -u -p -r1.3 e-cal-backend-groupwise-factory.c --- calendar/backends/groupwise/e-cal-backend-groupwise-factory.c 10 Aug 2005 21:25:00 -0000 1.3 +++ calendar/backends/groupwise/e-cal-backend-groupwise-factory.c 22 Jul 2006 08:08:46 -0000 @@ -51,6 +51,21 @@ _todos_get_kind (ECalBackendFactory *fac } static ECalBackend* +_journal_new_backend (ECalBackendFactory *factory, ESource *source) +{ + return g_object_new (e_cal_backend_groupwise_get_type (), + "source", source, + "kind", ICAL_VJOURNAL_COMPONENT, + NULL); +} + +static icalcomponent_kind +_journal_get_kind (ECalBackendFactory *factory) +{ + return ICAL_VJOURNAL_COMPONENT; +} + +static ECalBackend* _events_new_backend (ECalBackendFactory *factory, ESource *source) { return g_object_new (e_cal_backend_groupwise_get_type (), @@ -81,6 +96,14 @@ events_backend_factory_class_init (ECalB E_CAL_BACKEND_FACTORY_CLASS (klass)->new_backend = _events_new_backend; } +static void +journal_backend_factory_class_init (ECalBackendGroupwiseFactoryClass *klass) +{ + E_CAL_BACKEND_FACTORY_CLASS (klass)->get_protocol = _get_protocol; + E_CAL_BACKEND_FACTORY_CLASS (klass)->get_kind = _journal_get_kind; + E_CAL_BACKEND_FACTORY_CLASS (klass)->new_backend = _journal_new_backend; +} + static GType events_backend_factory_get_type (GTypeModule *module) { @@ -131,15 +154,40 @@ todos_backend_factory_get_type (GTypeMod return type; } +static GType +journal_backend_factory_get_type (GTypeModule *module) +{ + GType type; + + GTypeInfo info = { + sizeof (ECalBackendGroupwiseFactoryClass), + NULL, /* base_class_init */ + NULL, /* base_class_finalize */ + (GClassInitFunc) journal_backend_factory_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (ECalBackend), + 0, /* n_preallocs */ + (GInstanceInitFunc) e_cal_backend_groupwise_factory_instance_init + }; + + type = g_type_module_register_type (module, + E_TYPE_CAL_BACKEND_FACTORY, + "ECalBackendGroupwiseJournalFactory", + &info, 0); + + return type; +} -static GType groupwise_types[2]; +static GType groupwise_types[3]; void eds_module_initialize (GTypeModule *module) { groupwise_types[0] = todos_backend_factory_get_type (module); groupwise_types[1] = events_backend_factory_get_type (module); + groupwise_types[2] = journal_backend_factory_get_type (module); } void @@ -151,5 +199,5 @@ void eds_module_list_types (const GType **types, int *num_types) { *types = groupwise_types; - *num_types = 2; + *num_types = 3; } Index: calendar/libecal/e-cal-recur.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-recur.c,v retrieving revision 1.9 diff -u -p -r1.9 e-cal-recur.c --- calendar/libecal/e-cal-recur.c 31 Aug 2005 04:21:54 -0000 1.9 +++ calendar/libecal/e-cal-recur.c 22 Jul 2006 08:08:48 -0000 @@ -781,7 +781,13 @@ e_cal_recur_generate_instances_of_rule ( intersects the given interval. */ if (!(e_cal_component_has_recurrences (comp) || e_cal_component_has_exceptions (comp))) { - if ((end == -1 || dtstart_time < end) && dtend_time > start) { + if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_JOURNAL) { + icaltimetype start_t = icaltime_from_timet_with_zone (start, FALSE, default_timezone); + icaltimetype end_t = icaltime_from_timet_with_zone (end, FALSE, default_timezone); + + if ((icaltime_compare_date_only (*dtstart.value, start_t) >= 0) && ((icaltime_compare_date_only (*dtstart.value, end_t) < 0))) + (* cb) (comp, dtstart_time, dtend_time, cb_data); + } else if ((end == -1 || dtstart_time < end) && dtend_time > start) { (* cb) (comp, dtstart_time, dtend_time, cb_data); } Index: calendar/libedata-cal/e-cal-backend-cache.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-cache.c,v retrieving revision 1.29 diff -u -p -r1.29 e-cal-backend-cache.c --- calendar/libedata-cal/e-cal-backend-cache.c 10 Jul 2006 10:33:00 -0000 1.29 +++ calendar/libedata-cal/e-cal-backend-cache.c 22 Jul 2006 08:08:48 -0000 @@ -438,7 +438,7 @@ e_cal_backend_cache_get_components (ECal icalcomponent_kind kind; kind = icalcomponent_isa (icalcomp); - if (kind == ICAL_VEVENT_COMPONENT || kind == ICAL_VTODO_COMPONENT) { + if (kind == ICAL_VEVENT_COMPONENT || kind == ICAL_VTODO_COMPONENT || kind == ICAL_VJOURNAL_COMPONENT) { comp = e_cal_component_new (); if (e_cal_component_set_icalcomponent (comp, icalcomp)) list = g_list_prepend (list, comp); Index: calendar/libedata-cal/e-cal-backend-sexp.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sexp.c,v retrieving revision 1.22 diff -u -p -r1.22 e-cal-backend-sexp.c --- calendar/libedata-cal/e-cal-backend-sexp.c 10 Jan 2006 07:55:35 -0000 1.22 +++ calendar/libedata-cal/e-cal-backend-sexp.c 22 Jul 2006 08:08:48 -0000 @@ -454,6 +454,9 @@ matches_summary (ECalComponent *comp, co e_cal_component_get_summary (comp, &text); + if (str && !*str) + return TRUE; + if (!text.value) return FALSE; Index: calendar/libedata-cal/e-data-cal.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-data-cal.c,v retrieving revision 1.20 diff -u -p -r1.20 e-data-cal.c --- calendar/libedata-cal/e-data-cal.c 10 Jul 2006 10:35:53 -0000 1.20 +++ calendar/libedata-cal/e-data-cal.c 22 Jul 2006 08:08:48 -0000 @@ -907,7 +907,9 @@ e_data_cal_notify_object_created (EDataC priv = cal->priv; g_return_if_fail (priv->listener != CORBA_OBJECT_NIL); - if (status == GNOME_Evolution_Calendar_Success) + /* If the object is NULL, it means the object has been created on the server sucessfully, + but it is not shown in the UI if delay delivery is set */ + if (status == GNOME_Evolution_Calendar_Success && object) e_cal_backend_notify_object_created (priv->backend, object); CORBA_exception_init (&ev); Index: calendar/backends/groupwise/e-cal-backend-groupwise-utils.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c,v retrieving revision 1.74 diff -u -p -r1.74 e-cal-backend-groupwise-utils.c --- calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 10 Jul 2006 10:35:49 -0000 1.74 +++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 22 Jul 2006 08:08:46 -0000 @@ -340,7 +340,46 @@ get_attendee_prop (icalcomponent *icalco static void set_attendees_to_item (EGwItem *item, ECalComponent *comp, icaltimezone *default_zone, gboolean delegate, const char *user_email) { - if (e_cal_component_has_attendees (comp)) { + if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_JOURNAL) { + if (e_cal_component_has_organizer (comp)) { + icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp); + icalproperty *icalprop; + GSList *recipient_list = NULL; + const char *attendees = NULL; + char **emails, **iter; + + for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); icalprop; + icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) { + if (g_str_equal (icalproperty_get_x_name (icalprop), "X-EVOLUTION-RECIPIENTS")) { + break; + } + } + + if (icalprop) { + attendees = icalproperty_get_x (icalprop); + emails = g_strsplit (attendees, ";", -1); + + iter = emails; + while (*iter) { + EGwItemRecipient *recipient; + + recipient = g_new0 (EGwItemRecipient, 1); + + recipient->email = g_strdup (*iter); + recipient->type = E_GW_ITEM_RECIPIENT_TO; + + recipient_list = g_slist_prepend (recipient_list, recipient); + iter++; + } + + e_gw_item_set_recipient_list (item, recipient_list); + + g_strfreev (emails); + icalcomponent_remove_property (icalcomp, icalprop); + icalproperty_free (icalprop); + } + } + } else if (e_cal_component_has_attendees (comp)) { GSList *attendee_list, *recipient_list = NULL, *al; e_cal_component_get_attendee_list (comp, &attendee_list); @@ -384,12 +424,13 @@ set_attendees_to_item (EGwItem *item, EC /* recipient_list shouldn't be freed. Look into the function below. */ e_gw_item_set_recipient_list (item, recipient_list); - + } + + if (e_cal_component_has_organizer (comp)) { /* Send Options */ add_send_options_data_to_item (item, comp, default_zone); - } - + if (!delegate && e_cal_component_has_organizer (comp)) { ECalComponentOrganizer cal_organizer; EGwItemOrganizer *organizer = NULL; @@ -579,7 +620,9 @@ set_properties_from_cal_component (EGwIt e_gw_item_set_completed (item, FALSE); break; - + case E_CAL_COMPONENT_JOURNAL: + e_gw_item_set_item_type (item, E_GW_ITEM_TYPE_NOTE); + break; default : g_object_unref (item); return NULL; @@ -631,7 +674,7 @@ set_properties_from_cal_component (EGwIt } /* all day event */ - if (!dt.tzid && e_gw_item_get_item_type (item) == E_GW_ITEM_TYPE_APPOINTMENT) + if (dt.value && dt.value->is_date && e_gw_item_get_item_type (item) == E_GW_ITEM_TYPE_APPOINTMENT) e_gw_item_set_is_allday_event (item, TRUE); /* creation date */ @@ -690,7 +733,7 @@ set_properties_from_cal_component (EGwIt if (e_cal_component_has_attachments (comp)) { e_cal_backend_groupwise_set_attachments_from_comp (comp, item); } - + return item; } @@ -838,6 +881,8 @@ e_gw_item_to_cal_component (EGwItem *ite e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT); else if (item_type == E_GW_ITEM_TYPE_TASK) e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_TODO); + else if (item_type == E_GW_ITEM_TYPE_NOTE) + e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_JOURNAL); else { g_object_unref (comp); return NULL; @@ -940,7 +985,7 @@ e_gw_item_to_cal_component (EGwItem *ite if (t) { itt_utc = icaltime_from_string (t); - if (!is_allday) { + if (!is_allday && (item_type != E_GW_ITEM_TYPE_NOTE)) { if (!icaltime_get_timezone (itt_utc)) icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone()); if (default_zone) { @@ -959,8 +1004,7 @@ e_gw_item_to_cal_component (EGwItem *ite } e_cal_component_set_dtstart (comp, &dt); - } - else + } else return NULL; /* UID */ @@ -1004,42 +1048,44 @@ e_gw_item_to_cal_component (EGwItem *ite } else e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_NONE); - recipient_list = e_gw_item_get_recipient_list (item); - if (recipient_list != NULL) { - for (rl = recipient_list; rl != NULL; rl = rl->next) { - EGwItemRecipient *recipient = (EGwItemRecipient *) rl->data; - ECalComponentAttendee *attendee = g_new0 (ECalComponentAttendee, 1); - - attendee->cn = g_strdup (recipient->display_name); - attendee->value = g_strconcat("MAILTO:", recipient->email, NULL); - if (recipient->type == E_GW_ITEM_RECIPIENT_TO) - attendee->role = ICAL_ROLE_REQPARTICIPANT; - else if (recipient->type == E_GW_ITEM_RECIPIENT_CC || recipient->type == E_GW_ITEM_RECIPIENT_BC) - attendee->role = ICAL_ROLE_OPTPARTICIPANT; - else - attendee->role = ICAL_ROLE_NONE; - /* FIXME needs a server fix on the interface - * for getting cutype and the status */ - attendee->cutype = ICAL_CUTYPE_INDIVIDUAL; - - if (recipient->status == E_GW_ITEM_STAT_ACCEPTED) { - const char *accept_level = e_gw_item_get_accept_level (item); - - if(accept_level && !strcmp (e_gw_item_get_accept_level (item),"Tentative")) - attendee->status = ICAL_PARTSTAT_TENTATIVE; + if (item_type != E_GW_ITEM_TYPE_NOTE) { + recipient_list = e_gw_item_get_recipient_list (item); + if (recipient_list != NULL) { + for (rl = recipient_list; rl != NULL; rl = rl->next) { + EGwItemRecipient *recipient = (EGwItemRecipient *) rl->data; + ECalComponentAttendee *attendee = g_new0 (ECalComponentAttendee, 1); + + attendee->cn = g_strdup (recipient->display_name); + attendee->value = g_strconcat("MAILTO:", recipient->email, NULL); + if (recipient->type == E_GW_ITEM_RECIPIENT_TO) + attendee->role = ICAL_ROLE_REQPARTICIPANT; + else if (recipient->type == E_GW_ITEM_RECIPIENT_CC || recipient->type == E_GW_ITEM_RECIPIENT_BC) + attendee->role = ICAL_ROLE_OPTPARTICIPANT; + else + attendee->role = ICAL_ROLE_NONE; + /* FIXME needs a server fix on the interface + * for getting cutype and the status */ + attendee->cutype = ICAL_CUTYPE_INDIVIDUAL; + + if (recipient->status == E_GW_ITEM_STAT_ACCEPTED) { + const char *accept_level = e_gw_item_get_accept_level (item); + + if(accept_level && !strcmp (e_gw_item_get_accept_level (item),"Tentative")) + attendee->status = ICAL_PARTSTAT_TENTATIVE; + else + attendee->status = ICAL_PARTSTAT_ACCEPTED; + } + else if (recipient->status == E_GW_ITEM_STAT_DECLINED) + attendee->status = ICAL_PARTSTAT_DECLINED; else - attendee->status = ICAL_PARTSTAT_ACCEPTED; + attendee->status = ICAL_PARTSTAT_NEEDSACTION; + + + attendee_list = g_slist_append (attendee_list, attendee); } - else if (recipient->status == E_GW_ITEM_STAT_DECLINED) - attendee->status = ICAL_PARTSTAT_DECLINED; - else - attendee->status = ICAL_PARTSTAT_NEEDSACTION; - - - attendee_list = g_slist_append (attendee_list, attendee); - } - e_cal_component_set_attendee_list (comp, attendee_list); + e_cal_component_set_attendee_list (comp, attendee_list); + } } /* set organizer if it exists */ @@ -1175,6 +1221,8 @@ e_gw_item_to_cal_component (EGwItem *ite e_cal_component_set_percent (comp, &percent); break; + case E_GW_ITEM_TYPE_NOTE: + break; default : return NULL; } @@ -1193,19 +1242,23 @@ e_gw_connection_send_appointment (ECalBa char *item_id = NULL; const char *gw_id; const char *recurrence_key = NULL; - gboolean need_to_get = FALSE; + gboolean need_to_get = FALSE, decline = FALSE; + ECalComponentVType type; cnc = e_cal_backend_groupwise_get_connection (cbgw); g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_CONNECTION); g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), E_GW_CONNECTION_STATUS_INVALID_OBJECT); e_cal_component_commit_sequence (comp); + type = e_cal_component_get_vtype (comp); gw_id = e_cal_component_get_gw_id (comp); - switch (e_cal_component_get_vtype (comp)) { + switch (type) { case E_CAL_COMPONENT_EVENT: + case E_CAL_COMPONENT_TODO: + case E_CAL_COMPONENT_JOURNAL: if (!g_str_has_suffix (gw_id, container)) { item_id = g_strconcat (e_cal_component_get_gw_id (comp), GW_EVENT_TYPE_ID, container, NULL); need_to_get = TRUE; @@ -1214,15 +1267,6 @@ e_gw_connection_send_appointment (ECalBa else item_id = g_strdup (gw_id); break; - case E_CAL_COMPONENT_TODO: - if (!g_str_has_suffix (gw_id, container)) { - item_id = g_strconcat (e_cal_component_get_gw_id (comp), GW_TODO_TYPE_ID, container, NULL); - need_to_get = TRUE; - - } - else - item_id = g_strdup (gw_id); - break; default: return E_GW_CONNECTION_STATUS_INVALID_OBJECT; } @@ -1242,6 +1286,24 @@ e_gw_connection_send_appointment (ECalBa g_object_unref (item); } + if (type == E_CAL_COMPONENT_JOURNAL) { + icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp); + icalproperty *icalprop; + + icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); + while (icalprop) { + const char *x_name; + + x_name = icalproperty_get_x_name (icalprop); + if (!strcmp (x_name, "X-GW-DECLINED")) { + decline = TRUE; + *pstatus = ICAL_PARTSTAT_DECLINED; + break; + } + icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY); + } + } + switch (method) { case ICAL_METHOD_REQUEST: /* get attendee here and add the list along. */ @@ -1324,6 +1386,12 @@ e_gw_connection_send_appointment (ECalBa case ICAL_METHOD_CANCEL: status = e_gw_connection_retract_request (cnc, item_id, NULL, FALSE, FALSE); break; + case ICAL_METHOD_PUBLISH: + if (decline) + status = e_gw_connection_decline_request (cnc, item_id, NULL, NULL); + else + status = e_gw_connection_accept_request (cnc, item_id, "Free", NULL, NULL); + break; default: return E_GW_CONNECTION_STATUS_INVALID_OBJECT; } @@ -1802,15 +1870,19 @@ e_cal_backend_groupwise_store_settings ( source = e_cal_backend_get_source (E_CAL_BACKEND (cbgw)); kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw)); + /* TODO implement send options for Notes */ + if (kind == ICAL_VJOURNAL_COMPONENT) + return; + gopts = e_gw_sendoptions_get_general_options (opts); if (kind == ICAL_VEVENT_COMPONENT) { - sopts = e_gw_sendoptions_get_status_tracking_options (opts, "calendar"); source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources"); + sopts = e_gw_sendoptions_get_status_tracking_options (opts, "calendar"); } else { source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/tasks/sources"); sopts = e_gw_sendoptions_get_status_tracking_options (opts, "task"); - } - + } + uid = e_source_peek_uid (source); source = e_source_list_peek_source_by_uid (source_list, uid); if (gopts) { Index: calendar/backends/groupwise/e-cal-backend-groupwise.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v retrieving revision 1.182 diff -u -p -r1.182 e-cal-backend-groupwise.c --- calendar/backends/groupwise/e-cal-backend-groupwise.c 10 Jul 2006 10:35:49 -0000 1.182 +++ calendar/backends/groupwise/e-cal-backend-groupwise.c 22 Jul 2006 08:08:47 -0000 @@ -169,8 +169,10 @@ populate_cache (ECalBackendGroupwise *cb if (kind == ICAL_VEVENT_COMPONENT) type = "Calendar"; - else + else if (kind == ICAL_VTODO_COMPONENT) type = "Task"; + else + type = "Notes"; /* Fetch the data with a bias to present, near past/future */ temp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ()); @@ -712,9 +714,9 @@ cache_init (ECalBackendGroupwise *cbgw) e_cal_backend_cache_put_server_utc_time (priv->cache, utc_str); /* Set up deltas only if it is a Calendar backend */ - if (kind == ICAL_VEVENT_COMPONENT) - priv->timeout_id = g_timeout_add (time_interval, (GSourceFunc) get_deltas_timeout, (gpointer) cbgw); + priv->timeout_id = g_timeout_add (time_interval, (GSourceFunc) get_deltas_timeout, (gpointer) cbgw); priv->mode = CAL_MODE_REMOTE; + return GNOME_Evolution_Calendar_Success; } @@ -739,8 +741,7 @@ cache_init (ECalBackendGroupwise *cbgw) /* get the deltas from the cache */ if (get_deltas (cbgw)) { - if (kind == ICAL_VEVENT_COMPONENT) - priv->timeout_id = g_timeout_add (time_interval, (GSourceFunc) get_deltas_timeout, (gpointer) cbgw); + priv->timeout_id = g_timeout_add (time_interval, (GSourceFunc) get_deltas_timeout, (gpointer) cbgw); priv->mode = CAL_MODE_REMOTE; return GNOME_Evolution_Calendar_Success; } else { @@ -768,6 +769,7 @@ set_container_id_with_count (ECalBackend switch (kind) { case ICAL_VEVENT_COMPONENT: case ICAL_VTODO_COMPONENT: + case ICAL_VJOURNAL_COMPONENT: e_source_set_name (e_cal_backend_get_source (E_CAL_BACKEND (cbgw)), _("Calendar")); break; default: @@ -861,6 +863,8 @@ connect_to_server (ECalBackendGroupwise cbgw->priv->read_only = FALSE; else if (kind == ICAL_VTODO_COMPONENT && (permissions & E_GW_PROXY_TASK_WRITE)) cbgw->priv->read_only = FALSE; + else if (kind == ICAL_VJOURNAL_COMPONENT && (permissions & E_GW_PROXY_NOTES_WRITE)) + cbgw->priv->read_only = FALSE; } else { @@ -881,7 +885,7 @@ connect_to_server (ECalBackendGroupwise if (priv->cnc && priv->cache && priv->container_id) { char *utc_str; priv->mode = CAL_MODE_REMOTE; - if (priv->mode_changed && !priv->timeout_id && (e_cal_backend_get_kind (E_CAL_BACKEND (cbgw)) == ICAL_VEVENT_COMPONENT)) { + if (priv->mode_changed && !priv->timeout_id ) { GThread *thread1; priv->mode_changed = FALSE; @@ -1694,9 +1701,10 @@ e_cal_backend_groupwise_discard_alarm (E static icaltimezone * e_cal_backend_groupwise_internal_get_default_timezone (ECalBackend *backend) -{ - /* Groupwise server maintains data in UTC */ - return icaltimezone_get_utc_timezone (); +{ + ECalBackendGroupwise *cbgw = E_CAL_BACKEND_GROUPWISE (backend); + + return cbgw->priv->default_zone; } static icaltimezone * @@ -1797,8 +1805,11 @@ e_cal_backend_groupwise_create_object (E } /* If delay deliver has been set, server will not send the uid */ - if (!uid_list) + if (!uid_list || ((e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_JOURNAL) && e_cal_component_has_organizer (comp))) { + *calobj = NULL; + g_object_unref (comp); return GNOME_Evolution_Calendar_Success; + } if (g_slist_length (uid_list) == 1) { server_uid = (char *) uid_list->data;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor