[discident-glib] ean: Use libsoup 2.42 and newer
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [discident-glib] ean: Use libsoup 2.42 and newer
- Date: Sat, 27 Apr 2013 17:58:51 +0000 (UTC)
commit e9d9b0b6fa7a1f9eadd7edc29659be1df0f4fa38
Author: Bastien Nocera <hadess hadess net>
Date: Tue Apr 2 23:49:51 2013 +0200
ean: Use libsoup 2.42 and newer
And remove the deprecated functions use.
configure.ac | 2 +-
discident-glib/discident-ean-glib.c | 14 ++++----------
2 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 155509b..d3bec50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,7 +56,7 @@ dnl Requires for the library
PKG_CHECK_MODULES(DISCIDENT,
gio-2.0
json-glib-1.0
- libsoup-gnome-2.4
+ libsoup-2.4 >= 2.42
libxml-2.0)
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
diff --git a/discident-glib/discident-ean-glib.c b/discident-glib/discident-ean-glib.c
index 0cf8e42..c64dcdc 100644
--- a/discident-glib/discident-ean-glib.c
+++ b/discident-glib/discident-ean-glib.c
@@ -22,7 +22,7 @@
#include <string.h>
-#include <libsoup/soup-gnome.h>
+#include <libsoup/soup.h>
#include <glib/gprintf.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
@@ -152,9 +152,7 @@ discident_ean_login_sync (DiscidentEan *ean,
g_return_val_if_fail (DISCIDENT_IS_EAN (ean), FALSE);
- session = soup_session_sync_new_with_options (
- SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_GNOME,
- NULL);
+ session = soup_session_new ();
msg = soup_message_new ("GET", ORIGINAL_QUERY);
g_assert (msg != NULL);
@@ -322,9 +320,7 @@ discident_ean_lookup_sync (DiscidentEan *ean,
return FALSE;
}
- session = soup_session_sync_new_with_options (
- SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_GNOME,
- NULL);
+ session = soup_session_new ();
msg = create_query_message (ean, barcode);
@@ -490,9 +486,7 @@ discident_ean_lookup (DiscidentEan *ean,
discident_ean_lookup);
g_object_set_data_full (G_OBJECT (simple), "barcode", g_strdup (barcode), g_free);
- session = soup_session_async_new_with_options (
- SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_GNOME,
- NULL);
+ session = soup_session_new ();
data = g_new0 (QueryData, 1);
data->ean = g_object_ref (ean);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]