diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-11-27 05:44:57 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-11-27 06:00:55 +0800 |
commit | c9548365aa5efa853fed689f5545f9bd1ecae03b (patch) | |
tree | 44e35c1b4fa999e1cb60359716046c7cef6cf882 /calendar/gui/itip-utils.c | |
parent | 989efd6c2ee3251e72e96c40e3f2e8c71c35e7b6 (diff) | |
download | gsoc2013-evolution-c9548365aa5efa853fed689f5545f9bd1ecae03b.tar gsoc2013-evolution-c9548365aa5efa853fed689f5545f9bd1ecae03b.tar.gz gsoc2013-evolution-c9548365aa5efa853fed689f5545f9bd1ecae03b.tar.bz2 gsoc2013-evolution-c9548365aa5efa853fed689f5545f9bd1ecae03b.tar.lz gsoc2013-evolution-c9548365aa5efa853fed689f5545f9bd1ecae03b.tar.xz gsoc2013-evolution-c9548365aa5efa853fed689f5545f9bd1ecae03b.tar.zst gsoc2013-evolution-c9548365aa5efa853fed689f5545f9bd1ecae03b.zip |
Remove unused itip_publish_comp().
Diffstat (limited to 'calendar/gui/itip-utils.c')
-rw-r--r-- | calendar/gui/itip-utils.c | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 819fc897c3..a208ff4f42 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -2154,94 +2154,6 @@ comp_fb_normalize (icalcomponent *icomp) return iclone; } -gboolean -itip_publish_comp (ECalClient *cal_client, - gchar *uri, - gchar *username, - gchar *password, - ECalComponent **pub_comp) -{ - icalcomponent *toplevel = NULL, *icalcomp = NULL; - icalcomponent *icomp = NULL; - SoupSession *session; - SoupMessage *msg; - SoupURI *real_uri; - gchar *ical_string = NULL; - EProxy *proxy; - - toplevel = e_cal_util_new_top_level (); - icalcomponent_set_method (toplevel, ICAL_METHOD_PUBLISH); - - e_cal_component_set_url (*pub_comp, uri); - - icalcomp = e_cal_component_get_icalcomponent (*pub_comp); - - icomp = comp_fb_normalize (icalcomp); - - icalcomponent_add_component (toplevel, icomp); - - /* Publish the component */ - session = soup_session_new (); - g_object_set (session, SOUP_SESSION_TIMEOUT, 90, NULL); - - proxy = e_proxy_new (); - e_proxy_setup_proxy (proxy); - - if (e_proxy_require_proxy_for_uri (proxy, uri)) { - SoupURI *proxy_uri; - - proxy_uri = e_proxy_peek_uri_for (proxy, uri); - - g_object_set (session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL); - } - - g_clear_object (&proxy); - - real_uri = soup_uri_new (uri); - if (!real_uri || !real_uri->host) { - g_warning (G_STRLOC ": Invalid URL: %s", uri); - g_object_unref (session); - return FALSE; - } - - soup_uri_set_user (real_uri, username); - soup_uri_set_password (real_uri, password); - - /* build the message */ - msg = soup_message_new_from_uri (SOUP_METHOD_PUT, real_uri); - soup_uri_free (real_uri); - if (!msg) { - g_warning (G_STRLOC ": Could not build SOAP message"); - g_object_unref (session); - return FALSE; - } - - soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT); - ical_string = icalcomponent_as_ical_string_r (toplevel); - soup_message_set_request ( - msg, "text/calendar", SOUP_MEMORY_TEMPORARY, - ical_string, strlen (ical_string)); - - /* send message to server */ - soup_session_send_message (session, msg); - if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) { - g_warning ( - G_STRLOC ": Could not publish Free/Busy: %d: %s", - msg->status_code, - msg->reason_phrase); - g_object_unref (msg); - g_object_unref (session); - g_free (ical_string); - return FALSE; - } - - g_object_unref (msg); - g_object_unref (session); - g_free (ical_string); - - return TRUE; -} - static gboolean check_time (const struct icaltimetype tmval, gboolean can_null_time) |