[grilo] net: Remove support for libsoup < 2.42



commit 75f2306f85f34fa95bbcb7e5ea158ef6f20eefb4
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 23 11:34:22 2015 +0200

    net: Remove support for libsoup < 2.42
    
    Was released 2.5 years ago.

 configure.ac          |    7 +------
 libs/net/Makefile.am  |    5 -----
 libs/net/grl-net-wc.c |   25 ++-----------------------
 3 files changed, 3 insertions(+), 34 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 88a6bcf..5af4a72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,14 +164,10 @@ AM_CONDITIONAL(BUILD_GRILO_TEST_UI, test "x$HAVE_GTK" = "xyes")
 # NET LIBRARY
 # ----------------------------------------------------------
 
-PKG_CHECK_MODULES(NET, libsoup-2.4 >= 2.33.4,
+PKG_CHECK_MODULES(NET, libsoup-2.4 >= 2.41.3,
                        HAVE_LIBSOUP=yes,
                        HAVE_LIBSOUP=no)
 
-PKG_CHECK_EXISTS([libsoup-2.4 >= 2.41.3],
-                 [HAVE_LIBSOUP_REQUESTER_DEPRECATED=yes],
-                 [HAVE_LIBSOUP_REQUESTER_DEPRECATED=no])
-
 AC_ARG_ENABLE([grl_net],
         AS_HELP_STRING([--enable-grl-net],
                 [Enable Grilo Net library (default: auto)]),
@@ -189,7 +185,6 @@ AC_ARG_ENABLE([grl_net],
         ])
 
 AM_CONDITIONAL(BUILD_GRILO_NET, test "x$HAVE_LIBSOUP" = "xyes")
-AM_CONDITIONAL(BUILD_GRILO_NET_WITH_DEPRECATED_REQUESTER, test "x$HAVE_LIBSOUP_REQUESTER_DEPRECATED" = 
"xyes")
 
 # ----------------------------------------------------------
 # PLS LIBRARY
diff --git a/libs/net/Makefile.am b/libs/net/Makefile.am
index 277f095..d119bca 100644
--- a/libs/net/Makefile.am
+++ b/libs/net/Makefile.am
@@ -22,11 +22,6 @@ libgrlnet_ GRL_MAJORMINOR@_la_CFLAGS =       \
        $(DEPS_CFLAGS)                  \
        $(NET_CFLAGS)
 
-if BUILD_GRILO_NET_WITH_DEPRECATED_REQUESTER
-libgrlnet_ GRL_MAJORMINOR@_la_CFLAGS += \
-       -DLIBSOUP_REQUESTER_DEPRECATED
-endif
-
 libgrlnet_ GRL_MAJORMINOR@_la_LIBADD = \
        $(top_builddir)/src/lib GRL_NAME@.la    \
        $(DEPS_LIBS)                            \
diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c
index b513199..659e4a0 100644
--- a/libs/net/grl-net-wc.c
+++ b/libs/net/grl-net-wc.c
@@ -49,10 +49,6 @@
 #include <libsoup/soup.h>
 #include <string.h>
 
-#ifndef LIBSOUP_REQUESTER_DEPRECATED
-#include <libsoup/soup-requester.h>
-#endif
-
 #include <grilo.h>
 #include "grl-net-wc.h"
 #include "grl-net-mock-private.h"
@@ -89,9 +85,6 @@ struct _GrlNetWcPrivate {
   GQueue *pending;
   /* cache size in Mb */
   guint cache_size;
-#ifndef LIBSOUP_REQUESTER_DEPRECATED
-  void *requester;
-#endif
   gchar *previous_data;
 };
 
@@ -308,13 +301,6 @@ cache_is_available (GrlNetWc *self)
 static void
 init_requester (GrlNetWc *self)
 {
-#ifndef LIBSOUP_REQUESTER_DEPRECATED
-  GrlNetWcPrivate *priv = self->priv;
-
-  priv->requester = soup_requester_new ();
-  soup_session_add_feature (priv->session,
-                            SOUP_SESSION_FEATURE (priv->requester));
-#endif
   init_dump_directory ();
 }
 
@@ -325,10 +311,6 @@ finalize_requester (GrlNetWc *self)
 
   cache_down (self);
   g_free (priv->previous_data);
-
-#ifndef LIBSOUP_REQUESTER_DEPRECATED
-  g_object_unref (priv->requester);
-#endif
 }
 
 static void
@@ -687,23 +669,20 @@ get_url_now (GrlNetWc *self,
              GCancellable *cancellable)
 {
   GrlNetWcPrivate *priv = self->priv;
+  SoupURI *uri;
   struct request_res *rr = g_slice_new0 (struct request_res);
 
   g_simple_async_result_set_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (result),
                                              rr,
                                              NULL);
 
-#ifdef LIBSOUP_REQUESTER_DEPRECATED
-  SoupURI *uri = soup_uri_new (url);
+  uri = soup_uri_new (url);
   if (uri) {
     rr->request = soup_session_request_uri (priv->session, uri, NULL);
     soup_uri_free (uri);
   } else {
     rr->request = NULL;
   }
-#else
-  rr->request = soup_requester_request (priv->requester, url, NULL);
-#endif
 
   if (!rr->request) {
     g_simple_async_result_set_error (G_SIMPLE_ASYNC_RESULT (result),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]