![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package evolution-rss for openSUSE:Factory checked in at 2014-05-05 21:14:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/evolution-rss (Old) and /work/SRC/openSUSE:Factory/.evolution-rss.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "evolution-rss" Changes: -------- --- /work/SRC/openSUSE:Factory/evolution-rss/evolution-rss.changes 2013-09-09 19:43:26.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.evolution-rss.new/evolution-rss.changes 2014-05-05 21:15:01.000000000 +0200 @@ -1,0 +2,18 @@ +Tue Mar 4 21:02:09 UTC 2014 - dimstar@opensuse.org + +- Add evolution-rss-evo3.11.91.patch: Fix build with evolution + 3.11.91. +- Drop evolution-rss-soup-linking.patch: obsoleted by above patch. + +------------------------------------------------------------------- +Sat Jan 11 23:55:00 UTC 2014 - dimstar@opensuse.org + +- Add evolution-rss-evo3.11.3.patch: Fix build with evolution + 3.11.3. + +------------------------------------------------------------------- +Mon Dec 2 18:17:13 UTC 2013 - dimstar@opensuse.org + +- Add evolution-rss-evo3.11.patch: Fix build with evolution 3.11.2. + +------------------------------------------------------------------- Old: ---- evolution-rss-soup-linking.patch New: ---- evolution-rss-evo3.11.3.patch evolution-rss-evo3.11.91.patch evolution-rss-evo3.11.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ evolution-rss.spec ++++++ --- /var/tmp/diff_new_pack.uvoEfz/_old 2014-05-05 21:15:02.000000000 +0200 +++ /var/tmp/diff_new_pack.uvoEfz/_new 2014-05-05 21:15:02.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package evolution-rss # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,8 +17,8 @@ %define _evo_branch %(pkg-config --variable execversion evolution-shell-3.0) -%define _evo_plugindir %(pkg-config --variable plugindir evolution-plugin-3.0) -%define _evo_errordir %(pkg-config --variable errordir evolution-plugin-3.0) +%define _evo_plugindir %(pkg-config --variable privlibdir evolution-shell-3.0)/plugins +%define _evo_errordir %(pkg-config --variable errordir evolution-shell-3.0) %define _evo_imagesdir %(pkg-config --variable imagesdir evolution-shell-3.0) Name: evolution-rss @@ -31,14 +31,18 @@ Group: Productivity/Networking/Email/Clients Url: http://gnome.eu.org/evo/index.php/Evolution_RSS_Reader_Plugin Source: http://gnome.eu.org/%{name}-%{version}.tar.xz -# PATCH-FIX-UPSTREAM evolution-rss-soup-linking.patch bgo#695586 dimstar@opensuse.org -- Link the plugin against libsoup. -Patch0: evolution-rss-soup-linking.patch # PATCH-FIX-UPSTREAM evolution-rss-remove-EShellSettings-requirements.patch dimstar@opensuse.org -- Remove EShellSettings requirement, taken from git. Patch1: evolution-rss-remove-EShellSettings-requirements.patch # PATCH-FIX-UPSTREAM evolution-rss-EMailPart.patch dimstar@opensuse.org -- Adapt to EMailPart changes of evolution 3.9.3, taken from git. Patch2: evolution-rss-EMailPart.patch # PATCH-FIX-UPSTREAM evolution-rss-ESEvent.patch dimstar@opensuse.org -- Adapt to ESEvent changes in Evolution 3.9; taken frmo git. Patch3: evolution-rss-ESEvent.patch +# PATCH-FIX-UPSTREAM evolution-rss-evo3.11.patch dimstar@opensuse.org -- Fix build with evolution 3.11.2 +Patch4: evolution-rss-evo3.11.patch +# PATCH-FIX-UPSTREAM evolution-rss-evo3.11.3.patch bgo#720966 dimstar@opensuse.org -- Fix build with evolution 3.11.3 +Patch5: evolution-rss-evo3.11.3.patch +# PATCH-FIX-UPSTREAM evolution-rss-evo3.11.91 bgo#720459 bgo#725573 dimstar@opensuse.org -- Fix build with evolution 3.11.91 +Patch6: evolution-rss-evo3.11.91.patch BuildRequires: gcc-c++ # Needed only for patch0, in order to bootstrap BuildRequires: gconf2-devel @@ -47,7 +51,6 @@ BuildRequires: intltool BuildRequires: update-desktop-files BuildRequires: pkgconfig(evolution-data-server-1.2) -BuildRequires: pkgconfig(evolution-plugin-3.0) BuildRequires: pkgconfig(evolution-shell-3.0) BuildRequires: pkgconfig(glib-2.0) >= 2.26 BuildRequires: pkgconfig(gtk+-3.0) @@ -75,10 +78,12 @@ %lang_package -n %{_name} %prep %setup -q -%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build # Needed for patch0 and patch2 ++++++ evolution-rss-evo3.11.3.patch ++++++
From e7b34dc4e36d7e40a8db06d289b655bca79a6624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com> Date: Sun, 12 Jan 2014 00:36:06 +0100 Subject: [PATCH] Bug #720966 - Evo 3.11.3 - em_folder_tree_model_lookup_store_info() now private
--- src/rss-image.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rss-image.c b/src/rss-image.c index 9dfb636..3a3bd86 100644 --- a/src/rss-image.c +++ b/src/rss-image.c @@ -539,7 +539,6 @@ display_folder_icon(GtkTreeStore *tree_store, gchar *key) GtkTreePath *path; GtkTreeRowReference *row; EMFolderTreeModel *mod = (EMFolderTreeModel *)tree_store; - struct _EMFolderTreeModelStoreInfo *si; CamelStore *store = rss_component_peek_local_store(); CamelFolderInfo *rssi = NULL; gint i=0, size; @@ -589,9 +588,8 @@ display_folder_icon(GtkTreeStore *tree_store, gchar *key) icon); g_free(sizes); - si = em_folder_tree_model_lookup_store_info ( - EM_FOLDER_TREE_MODEL (mod), store); - row = g_hash_table_lookup (si->full_hash, full_name); + row = em_folder_tree_model_get_row_reference ( + EM_FOLDER_TREE_MODEL (mod), store, full_name); if (!row) goto out; path = gtk_tree_row_reference_get_path (row); gtk_tree_model_get_iter ( -- 1.8.4.2 ++++++ evolution-rss-evo3.11.91.patch ++++++ Index: evolution-rss-0.3.93/configure.ac =================================================================== --- evolution-rss-0.3.93.orig/configure.ac +++ evolution-rss-0.3.93/configure.ac @@ -92,11 +92,17 @@ if test "$EVOLUTION_BASE_VERSION_S" = "- EVOLUTION_ADDITIONAL="libemail-engine" fi +EVOLUTION_PLUGIN_CHECK="evolution-plugin$EVOLUTION_BASE_VERSION_S >= $EVOLUTION_REQUIRED" + +if test "$evolution_version_int" -ge "31191"; then + EVOLUTION_PLUGIN_CHECK= +fi + PKG_CHECK_MODULES(EVOLUTION_RSS_EPLUGIN, [ glib-2.0 >= $LIBGLIB_REQUIRED dnl gtk+-$LIBGTK_VERSION.0 >= $LIBGTK_REQUIRED dnl libsoup$SOUP >= $LIBSOUP_REQUIRED dnl - evolution-plugin$EVOLUTION_BASE_VERSION_S >= $EVOLUTION_REQUIRED dnl + $EVOLUTION_PLUGIN_CHECK dnl evolution-shell$EVOLUTION_BASE_VERSION_S >= $EVOLUTION_REQUIRED dnl $EVOLUTION_ADDITIONAL dnl libebook-1.2 dnl Index: evolution-rss-0.3.93/m4/evolution.m4 =================================================================== --- evolution-rss-0.3.93.orig/m4/evolution.m4 +++ evolution-rss-0.3.93/m4/evolution.m4 @@ -78,10 +78,17 @@ AC_SUBST(MINOR_VERSION) dnl Evolution plugin install directory AC_ARG_WITH(plugin-install-dir, [ --with-plugin-install-dir=PATH path to evolution plugin directory]) if test "x$with_plugin_install_dir" = "x"; then - PLUGIN_INSTALL_DIR=`$PKG_CONFIG --variable=plugindir evolution-plugin$EVOLUTION_BASE_VERSION_S` - if test "x$PLUGIN_INSTALL_DIR" = "x"; then - AC_MSG_ERROR(Unable to find plugin directory) - break; + if test "$evolution_version_int" -ge "031191"; then + PLUGIN_INSTALL_DIR=`$PKG_CONFIG --variable=plugindir evolution-shell$EVOLUTION_BASE_VERSION_S` + if test "x$PLUGIN_INSTALL_DIR" = "x"; then + PLUGIN_INSTALL_DIR=`$PKG_CONFIG --variable=privlibdir evolution-shell$EVOLUTION_BASE_VERSION_S`/plugins + fi + else + PLUGIN_INSTALL_DIR=`$PKG_CONFIG --variable=plugindir evolution-plugin$EVOLUTION_BASE_VERSION_S` + if test "x$PLUGIN_INSTALL_DIR" = "x"; then + AC_MSG_ERROR(Unable to find plugin directory) + break; + fi fi fi AC_SUBST(PLUGIN_INSTALL_DIR) @@ -97,7 +104,11 @@ fi AC_SUBST(ICON_DIR) dnl Evolution e-error install directory -ERROR_DIR=`$PKG_CONFIG --variable=errordir evolution-plugin$EVOLUTION_BASE_VERSION_S` +if test "$evolution_version_int" -ge "031191"; then + ERROR_DIR=`$PKG_CONFIG --variable=errordir evolution-shell$EVOLUTION_BASE_VERSION_S` +else + ERROR_DIR=`$PKG_CONFIG --variable=errordir evolution-plugin$EVOLUTION_BASE_VERSION_S` +fi if test "x$ERROR_DIR" = "x"; then AC_MSG_ERROR(Unable to find error file directory) fi @@ -107,7 +118,7 @@ dnl test required for bonobo server inst dnl dnl user might specify wrong prefix or not specify at all AC_ARG_WITH(bonobo-servers-dir, [ --with-bonobo-servers-dir=PATH path to bonobo servers directory]) if test "x$with_bonobo_servers_dir" = "x" ; then - BONOBO_LIBDIR=`$PKG_CONFIG --variable=libdir evolution-plugin$EVOLUTION_BASE_VERSION_S` + BONOBO_LIBDIR=`$PKG_CONFIG --variable=libdir evolution-shell$EVOLUTION_BASE_VERSION_S` if test "x$BONOBO_LIBDIR" = "x"; then AC_MSG_ERROR(Unable to find bonobo servers file directory) fi Index: evolution-rss-0.3.93/src/network-soup.c =================================================================== --- evolution-rss-0.3.93.orig/src/network-soup.c +++ evolution-rss-0.3.93/src/network-soup.c @@ -288,7 +288,7 @@ proxify_webkit_session_async(EProxy *pro case 0: soup_session_add_feature_by_type ( webkit_session, - SOUP_TYPE_PROXY_RESOLVER_GNOME); + SOUP_TYPE_PROXY_RESOLVER_DEFAULT); break; #endif } @@ -337,7 +337,7 @@ proxify_session(EProxy *proxy, SoupSessi #ifdef HAVE_LIBSOUP_GNOME case 0: soup_session_add_feature_by_type ( - session, SOUP_TYPE_PROXY_RESOLVER_GNOME); + session, SOUP_TYPE_PROXY_RESOLVER_DEFAULT); break; #endif } @@ -464,7 +464,7 @@ proxify_session_async(EProxy *proxy, STN #ifdef HAVE_LIBSOUP_GNOME case 0: soup_session_add_feature_by_type ( - stnet->ss, SOUP_TYPE_PROXY_RESOLVER_GNOME); + stnet->ss, SOUP_TYPE_PROXY_RESOLVER_DEFAULT); break; #endif } @@ -1240,7 +1240,7 @@ rss_soup_init(void) g_free(feed_dir); rss_soup_jar = - soup_cookie_jar_sqlite_new (cookie_path, FALSE); + soup_cookie_jar_db_new (cookie_path, FALSE); if (!g_file_test(moz_cookie_path, G_FILE_TEST_EXISTS|G_FILE_TEST_IS_SYMLINK)) { sync_gecko_cookies(); Index: evolution-rss-0.3.93/src/rss-config-factory.c =================================================================== --- evolution-rss-0.3.93.orig/src/rss-config-factory.c +++ evolution-rss-0.3.93/src/rss-config-factory.c @@ -3016,7 +3016,7 @@ import_cookies(gchar *file) fclose(f); if (!g_ascii_strncasecmp(header, SQLITE_MAGIC, sizeof(SQLITE_MAGIC))) { #ifdef HAVE_LIBSOUP_GNOME - jar = soup_cookie_jar_sqlite_new(file, TRUE); + jar = soup_cookie_jar_db_new(file, TRUE); #else g_print("Importing sqlite format requires libsoup-gnome\n"); #endif Index: evolution-rss-0.3.93/src/misc.c =================================================================== --- evolution-rss-0.3.93.orig/src/misc.c +++ evolution-rss-0.3.93/src/misc.c @@ -31,6 +31,7 @@ #include <camel/camel-mime-utils.h> #endif +#include <mail/e-mail-reader-utils.h> #include "rss.h" #include "parser.h" @@ -683,3 +684,9 @@ textcb(NetStatusType status, gpointer st #endif +gchar * +rss_component_peek_base_directory(void) +{ + return g_strdup_printf("%s" G_DIR_SEPARATOR_S "rss", + mail_session_get_data_dir ()); +} Index: evolution-rss-0.3.93/src/misc.h =================================================================== --- evolution-rss-0.3.93.orig/src/misc.h +++ evolution-rss-0.3.93/src/misc.h @@ -53,5 +53,6 @@ void write_feed_status_line(gchar *file, void dup_auth_data(gchar *origurl, gchar *url); void sanitize_path_separator(gchar *); void textcb(NetStatusType status, gpointer statusdata, gpointer data); +gchar *rss_component_peek_base_directory(void); #endif Index: evolution-rss-0.3.93/src/rss-formatter.c =================================================================== --- evolution-rss-0.3.93.orig/src/rss-formatter.c +++ evolution-rss-0.3.93/src/rss-formatter.c @@ -172,11 +172,3 @@ rss_get_display(void) reader = E_MAIL_READER (shell_content); return e_mail_reader_get_mail_display (reader); } - -gchar * -rss_component_peek_base_directory(void) -{ - return g_strdup_printf("%s" G_DIR_SEPARATOR_S "rss", - mail_session_get_data_dir ()); -} - Index: evolution-rss-0.3.93/src/rss-formatter.h =================================================================== --- evolution-rss-0.3.93.orig/src/rss-formatter.h +++ evolution-rss-0.3.93/src/rss-formatter.h @@ -28,7 +28,6 @@ gchar *rss_process_feed(gchar *feed, gui gchar *rss_process_website(gchar *content, gchar *website); gboolean rss_get_current_view(void); void rss_set_current_view(gboolean value); -gchar *rss_component_peek_base_directory(void); gboolean rss_get_changed_view(void); void rss_set_changed_view(gboolean value); gboolean rss_get_is_html(gchar *feedid); Index: evolution-rss-0.3.93/src/e-mail-formatter-evolution-rss.c =================================================================== --- evolution-rss-0.3.93.orig/src/e-mail-formatter-evolution-rss.c +++ evolution-rss-0.3.93/src/e-mail-formatter-evolution-rss.c @@ -91,13 +91,23 @@ emfe_evolution_rss_format (EMailFormatte EMailFormatter *formatter, EMailFormatterContext *context, EMailPart *part, +#if EVOLUTION_VERSION < 31191 CamelStream *stream, +#else + GOutputStream *stream, +#endif GCancellable *cancellable) { - CamelStream *decoded_stream; CamelDataWrapper *dw; gchar *str; +#if EVOLUTION_VERSION < 31191 + CamelStream *decoded_stream; GByteArray *ba; +#else + GOutputStream *decoded_stream; + gpointer data; + gsize len; +#endif gchar *src; CamelMimePart *message = e_mail_part_ref_mime_part (part); gchar *website, *subject, *category, *feedid, *comments; @@ -123,8 +133,13 @@ emfe_evolution_rss_format (EMailFormatte "height=\"0\" width=\"100%%\" data=\"%s\" id=\"%s\"></object>", e_mail_part_get_id(part), e_mail_part_get_id(part)); +#if EVOLUTION_VERSION < 31191 camel_stream_write_string ( stream, str, cancellable, NULL); +#else + g_output_stream_write_all(stream, str, + strlen(str), NULL, cancellable, NULL); +#endif gchar *h = g_strdup(e_web_view_get_html (E_WEB_VIEW (rss_get_display()))); website = camel_medium_get_header ( @@ -189,25 +204,53 @@ emfe_evolution_rss_format (EMailFormatte text_col & 0xffffff, iconfile, website, subject); +#if EVOLUTION_VERSION < 31191 camel_stream_write_string ( stream, str, cancellable, NULL); +#else + g_output_stream_write_all(stream, str, + strlen(str), NULL, cancellable, NULL); +#endif +#if EVOLUTION_VERSION < 31191 decoded_stream = camel_stream_mem_new (); +#else + decoded_stream = g_memory_output_stream_new_resizable (); +#endif e_mail_formatter_format_text ( formatter, part, decoded_stream, cancellable); +#if EVOLUTION_VERSION < 31191 g_seekable_seek (G_SEEKABLE (decoded_stream), 0, G_SEEK_SET, cancellable, NULL); ba = camel_stream_mem_get_byte_array (CAMEL_STREAM_MEM (decoded_stream)); src = rss_process_feed((gchar *)ba->data, ba->len); +#else + data = g_memory_output_stream_get_data ( + G_MEMORY_OUTPUT_STREAM (decoded_stream)); + len = g_memory_output_stream_get_data_size ( + G_MEMORY_OUTPUT_STREAM (decoded_stream)); + src = rss_process_feed((gchar *)data, len); +#endif +#if EVOLUTION_VERSION < 31191 camel_stream_write_string(stream, src, cancellable, NULL); +#else + g_output_stream_write_all(stream, src, strlen(src), NULL, cancellable, NULL); +#endif g_free(src); g_object_unref (decoded_stream); +#if EVOLUTION_VERSION < 31191 camel_stream_write_string ( stream, "</div></div>", cancellable, NULL); +#else + gchar *tstr = g_strdup("</div></div>"); + g_output_stream_write_all(stream, tstr, + strlen(tstr), NULL, cancellable, NULL); + g_free(tstr); +#endif } else { GError *err = NULL; gchar *str; @@ -226,12 +269,28 @@ emfe_evolution_rss_format (EMailFormatte frame_col & 0xffffff, cont_col & 0xffffff, text_col & 0xffffff); +#if EVOLUTION_VERSION < 31191 camel_stream_write_string (stream, str, cancellable, NULL); - g_free (str); camel_stream_write_string (stream, "<div style=\"border: solid 0px; padding: 4px;\">\n", cancellable, NULL); camel_stream_write_string (stream, "<h3>Error!</h3>", cancellable, NULL); camel_stream_write_string (stream, err->message, cancellable, NULL); camel_stream_write_string (stream, "</div>", cancellable, NULL); +#else + g_output_stream_write_all(stream, str, strlen(str), NULL, cancellable, NULL); + gchar *tstr; + tstr = g_strdup("<div style=\"border: solid 0px; padding: 4px;\">\n"); + g_output_stream_write_all(stream, tstr, strlen(tstr), NULL, cancellable, NULL); + g_free(tstr); + tstr = g_strdup("<h3>Error!</h3>"); + g_output_stream_write_all(stream, tstr, strlen(tstr), NULL, cancellable, NULL); + g_free(tstr); + g_output_stream_write_all(stream, err->message, strlen(err->message), NULL, cancellable, NULL); + tstr = g_strdup("</div>"); + g_output_stream_write_all(stream, tstr, strlen(tstr), NULL, cancellable, NULL); + g_free(tstr); +#endif + g_free (str); + return TRUE; } ++++++ evolution-rss-evo3.11.patch ++++++
From 87ae939abd5ef896130bab49d84660309a1826d1 Mon Sep 17 00:00:00 2001 From: Lucian Langa <lucilanga@gnome.org> Date: Wed, 09 Oct 2013 20:32:38 +0000 Subject: adapt to Camel changes
--- diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c index 10b4301..84a1d6e 100644 --- a/src/rss-config-factory.c +++ b/src/rss-config-factory.c @@ -1273,7 +1273,11 @@ rss_delete_folders (CamelStore *store, d("call rss_delete_rec()\n"); rss_delete_rec (store, fi, error); +#if (DATASERVER_VERSION >= 3011001) + camel_folder_info_free (fi); +#else camel_store_free_folder_info (store, fi); +#endif } void diff --git a/src/rss-image.c b/src/rss-image.c index 5169cb2..12ab7fc 100644 --- a/src/rss-image.c +++ b/src/rss-image.c @@ -509,7 +509,11 @@ display_folder_icon(GtkTreeStore *tree_store, gchar *key) COL_STRING_ICON_NAME, key, -1); g_free(full_name); +#if (DATASERVER_VERSION >= 3011001) + camel_folder_info_free (rssi); +#else camel_store_free_folder_info (store, rssi); +#endif g_object_unref(pixbuf); result = TRUE; } diff --git a/src/rss.c b/src/rss.c index 4c9b06b..1dcf192 100644 --- a/src/rss.c +++ b/src/rss.c @@ -4134,7 +4134,11 @@ create_mail(create_feed *CF) camel_object_unref(new); camel_object_unref(mail_folder); #endif +#if (DATASERVER_VERSION >= 3011001) + camel_message_info_unref(info); +#else camel_message_info_free(info); +#endif g_free(buf); } @@ -4593,7 +4597,12 @@ delete_oldest_article(CamelFolder *folder, guint unread) } // d("uid:%d j:%d/%d, absdate:%d, date:%s, imax:%d\n", // i, j, q, min_date, ctime(&min_date), imax); -out: camel_message_info_free(info); +out: +#if (DATASERVER_VERSION >= 3011001) + camel_message_info_unref(info); +#else + camel_message_info_free(info); +#endif } camel_folder_freeze(folder); if (min_date) { @@ -4689,7 +4698,11 @@ get_feed_age(RDF *r, gpointer name) feedid); g_free(feed_name); } +#if (DATASERVER_VERSION >= 3011001) + camel_message_info_unref(info); +#else camel_folder_free_message_info(folder, info); +#endif } #if (DATASERVER_VERSION >= 2031001) g_object_unref (message); @@ -4728,7 +4741,11 @@ get_feed_age(RDF *r, gpointer name) } } } +#if (DATASERVER_VERSION >= 3011001) + camel_message_info_unref(info); +#else camel_folder_free_message_info(folder, info); +#endif } camel_folder_free_uids (folder, uids); #if (DATASERVER_VERSION >= 2033001) -- cgit v0.9.2
From a9805199c18b1a8b6b2c48d83b3c78be21b2ab91 Mon Sep 17 00:00:00 2001 From: Milan Crha <mcrha@redhat.com> Date: Fri, 29 Nov 2013 17:01:12 +0000 Subject: Bug 712709 - Adapt to evolution-data-server/evolution 3.11.2 changes
--- diff --git a/src/parser.c b/src/parser.c index d3b3ed6..ef20856 100644 --- a/src/parser.c +++ b/src/parser.c @@ -25,11 +25,16 @@ #include <libxml/HTMLparser.h> #include <libxml/HTMLtree.h> #include <libxml/debugXML.h> + +#if EVOLUTION_VERSION >= 31102 +#include <libemail-engine/libemail-engine.h> +#else #if EVOLUTION_VERSION >= 30305 #include <libemail-engine/mail-ops.h> #else #include <mail/mail-ops.h> #endif +#endif #if EVOLUTION_VERSION >= 30505 #include <mail/e-mail-reader-utils.h> #endif diff --git a/src/rss-cache.c b/src/rss-cache.c index b075659..65f926d 100644 --- a/src/rss-cache.c +++ b/src/rss-cache.c @@ -98,12 +98,6 @@ rss_cache_get_path(int create, const char *key) return real; } -CamelStream* -rss_cache_get(gchar *url) -{ - return camel_data_cache_get(cache, HTTP_CACHE_PATH, url, NULL); -} - #if DATASERVER_VERSION <= 2025004 #define CAMEL_DATA_CACHE_BITS (6) #define CAMEL_DATA_CACHE_MASK ((1<<CAMEL_DATA_CACHE_BITS)-1) @@ -145,7 +139,7 @@ rss_cache_get_filename(gchar *url) #endif } -CamelStream* +RssCacheStream * rss_cache_add(gchar *url) { return camel_data_cache_add(cache, HTTP_CACHE_PATH, url, NULL); diff --git a/src/rss-cache.h b/src/rss-cache.h index eabee01..845178c 100644 --- a/src/rss-cache.h +++ b/src/rss-cache.h @@ -17,14 +17,24 @@ * 02110-1301 USA */ +#ifndef RSS_CACHE_H +#define RSS_CACHE_H + #if (DATASERVER_VERSION >= 2031001) #include <camel/camel.h> #else #include <camel/camel-data-cache.h> #endif +#if (DATASERVER_VERSION >= 3011002) +#define RssCacheStream GIOStream +#else +#define RssCacheStream CamelStream +#endif + void rss_cache_init(void); -CamelStream *rss_cache_get(gchar *url); gchar *rss_cache_get_filename(gchar *url); char* rss_cache_get_path(int create, const char *path); -CamelStream* rss_cache_add(gchar *url); +RssCacheStream *rss_cache_add(gchar *url); + +#endif /* RSS_CACHE_H */ diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c index 84a1d6e..7105d01 100644 --- a/src/rss-config-factory.c +++ b/src/rss-config-factory.c @@ -46,6 +46,9 @@ #endif #include <mail/em-folder-selector.h> +#if EVOLUTION_VERSION >= 31102 +#include <libemail-engine/libemail-engine.h> +#else #if EVOLUTION_VERSION >= 30305 #include <libemail-engine/e-mail-folder-utils.h> #else @@ -53,7 +56,7 @@ #include <mail/e-mail-folder-utils.h> #endif #endif - +#endif #include <mail/em-utils.h> #include <shell/e-shell.h> diff --git a/src/rss-evo-common.c b/src/rss-evo-common.c index 2f893df..0145b8c 100644 --- a/src/rss-evo-common.c +++ b/src/rss-evo-common.c @@ -26,6 +26,9 @@ #if (EVOLUTION_VERSION < 30303) #include <mail/e-mail-local.h> #endif +#if EVOLUTION_VERSION >= 31102 +#include <libemail-engine/libemail-engine.h> +#else #if EVOLUTION_VERSION >= 30305 #include <libemail-engine/e-mail-folder-utils.h> #else @@ -33,6 +36,7 @@ #include <mail/e-mail-folder-utils.h> #endif #endif +#endif #include <mail/e-mail-reader.h> #include <mail/em-folder-utils.h> diff --git a/src/rss-image.c b/src/rss-image.c index 12ab7fc..9dfb636 100644 --- a/src/rss-image.c +++ b/src/rss-image.c @@ -303,7 +303,7 @@ finish_image_feedback (SoupMessage *msg, FEED_IMAGE *user_data) finish_image_feedback (SoupSession *soup_sess, SoupMessage *msg, FEED_IMAGE *user_data) #endif { - CamelStream *stream = NULL; + RssCacheStream *stream = NULL; gchar *mime_type; d("finish_image_feedback()"); stream = rss_cache_add(user_data->url); @@ -337,9 +337,9 @@ finish_image_feedback (SoupSession *soup_sess, SoupMessage *msg, FEED_IMAGE *use void #if LIBSOUP_VERSION < 2003000 -finish_image (SoupMessage *msg, CamelStream *user_data) +finish_image (SoupMessage *msg, RssCacheStream *user_data) #else -finish_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data) +finish_image (SoupSession *soup_sess, SoupMessage *msg, RssCacheStream *user_data) #endif { d("CODE:%d\n", msg->status_code); @@ -362,6 +362,19 @@ finish_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data) msg->response.length); #else if (msg->response_body->data) { +#if (DATASERVER_VERSION >= 3011002) + GOutputStream *out; + + out = g_io_stream_get_output_stream (user_data); + g_output_stream_write_all (out, + msg->response_body->data, + msg->response_body->length, + NULL, + NULL, + NULL); + g_output_stream_flush (out, NULL, NULL); + g_output_stream_close (out, NULL, NULL); +#else #if (DATASERVER_VERSION >= 2033001) camel_stream_write (user_data, msg->response_body->data, @@ -377,6 +390,7 @@ finish_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data) camel_stream_close(user_data, NULL); #endif #endif +#endif #if (DATASERVER_VERSION >= 2031001) g_object_unref(user_data); #else @@ -384,6 +398,19 @@ finish_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data) #endif } } else { +#if (DATASERVER_VERSION >= 3011002) + GOutputStream *out; + + out = g_io_stream_get_output_stream (user_data); + g_output_stream_write_all (out, + msg->response_body->data, + msg->response_body->length, + NULL, + NULL, + NULL); + g_output_stream_flush (out, NULL, NULL); + g_output_stream_close (out, NULL, NULL); +#else #if (DATASERVER_VERSION >= 2033001) camel_stream_write (user_data, pixfilebuf, pixfilelen, NULL, NULL); camel_stream_close (user_data, NULL, NULL); @@ -391,6 +418,73 @@ finish_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data) camel_stream_write(user_data, pixfilebuf, pixfilelen, NULL); camel_stream_close(user_data, NULL); #endif +#endif + +#if (DATASERVER_VERSION >= 2031001) + g_object_unref(user_data); +#else + camel_object_unref(user_data); +#endif + } +} + +static void +#if LIBSOUP_VERSION < 2003000 +finish_image_camel (SoupMessage *msg, CamelStream *user_data) +#else +finish_image_camel (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data) +#endif +{ + d("CODE:%d\n", msg->status_code); + // we might need to handle more error codes here + if (503 != msg->status_code && //handle this timedly fasion + 404 != msg->status_code && //NOT FOUND + 400 != msg->status_code && //bad request + 2 != msg->status_code && //STATUS_CANT_RESOLVE + 1 != msg->status_code && //TIMEOUT (CANCELLED) ? + 7 != msg->status_code && // STATUS_IO_ERROR +#if LIBSOUP_VERSION < 2003000 + msg->response.length) { //ZERO SIZE +#else + msg->response_body->length) { //ZERO SIZE +#endif +#if LIBSOUP_VERSION < 2003000 + if (msg->response.body) { + camel_stream_write(user_data, + msg->response.body, + msg->response.length); +#else + if (msg->response_body->data) { +#if (DATASERVER_VERSION >= 2033001) + camel_stream_write (user_data, + msg->response_body->data, + msg->response_body->length, + NULL, + NULL); + camel_stream_close(user_data, NULL, NULL); +#else + camel_stream_write (user_data, + msg->response_body->data, + msg->response_body->length, + NULL); + camel_stream_close(user_data, NULL); +#endif +#endif +#if (DATASERVER_VERSION >= 2031001) + g_object_unref(user_data); +#else + camel_object_unref(user_data); +#endif + } + } else { +#if (DATASERVER_VERSION >= 2033001) + camel_stream_write (user_data, pixfilebuf, pixfilelen, NULL, NULL); + camel_stream_close (user_data, NULL, NULL); +#else + camel_stream_write(user_data, pixfilebuf, pixfilelen, NULL); + camel_stream_close(user_data, NULL); +#endif + #if (DATASERVER_VERSION >= 2031001) g_object_unref(user_data); #else @@ -412,7 +506,7 @@ finish_create_icon (SoupSession *soup_sess, SoupMessage *msg, FEED_IMAGE *user_d CamelStream *feed_fs = camel_stream_fs_new_with_name( user_data->img_file, O_RDWR|O_CREAT, 0666, NULL); - finish_image(soup_sess, msg, feed_fs); + finish_image_camel(soup_sess, msg, feed_fs); display_folder_icon(evolution_store, user_data->key); } g_free(user_data->key); @@ -428,7 +522,7 @@ finish_create_icon_stream ( SoupSession *soup_sess, SoupMessage *msg, FEED_IMAGE *user_data) #endif { - finish_image(soup_sess, msg, user_data->feed_fs); + finish_image_camel(soup_sess, msg, user_data->feed_fs); display_folder_icon(evolution_store, user_data->key); g_free(user_data->key); g_free(user_data); @@ -768,7 +862,7 @@ fetch_image_redraw(gchar *url, gchar *link, gpointer data) 1, &err); } else { - CamelStream *stream = rss_cache_add(intern); + RssCacheStream *stream = rss_cache_add(intern); fetch_unblocking(tmpurl, textcb, NULL, diff --git a/src/rss-image.h b/src/rss-image.h index 739c413..72e6853 100644 --- a/src/rss-image.h +++ b/src/rss-image.h @@ -19,6 +19,7 @@ #include <mail/e-mail-reader.h> +#include <rss-cache.h> typedef struct _FEED_IMAGE { gchar *img_file; @@ -51,10 +52,10 @@ gchar *verify_image(gchar *uri, EMailDisplay *format); void #if LIBSOUP_VERSION < 2003000 -finish_image (SoupMessage *msg, CamelStream *user_data); +finish_image (SoupMessage *msg, RssCacheStream *user_data); #else finish_image (SoupSession *soup_sess, - SoupMessage *msg, CamelStream *user_data); + SoupMessage *msg, RssCacheStream *user_data); #endif void #if LIBSOUP_VERSION < 2003000 diff --git a/src/rss.c b/src/rss.c index 1dcf192..5ebf5e1 100644 --- a/src/rss.c +++ b/src/rss.c @@ -67,6 +67,9 @@ int rss_verbose_debug = 0; #include <mail/e-mail-reader-utils.h> #endif +#if EVOLUTION_VERSION >= 31102 +#include <libemail-engine/libemail-engine.h> +#else #if EVOLUTION_VERSION >= 30305 #include <libemail-engine/mail-tools.h> #include <libemail-engine/mail-ops.h> @@ -82,6 +85,7 @@ int rss_verbose_debug = 0; #include <mail/e-mail-session.h> #endif #endif +#endif #if (EVOLUTION_VERSION > 30501) #include <em-format/e-mail-formatter.h> -- cgit v0.9.2 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org