Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame^] | 1 | From 63531558a16ac2334a59f627b2fca5576dcfbb2e Mon Sep 17 00:00:00 2001 |
| 2 | From: Jens Georg <mail@jensge.org> |
| 3 | Date: Sat, 1 Dec 2018 21:33:21 +0100 |
| 4 | Subject: [PATCH] Swtich to new GUPnP API |
| 5 | |
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 7 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gupnp-igd/commit/63531558a16ac2334a59f627b2fca5576dcfbb2e] |
| 8 | --- |
| 9 | configure.ac | 2 +- |
| 10 | gupnp-igd-1.0-uninstalled.pc.in | 2 +- |
| 11 | gupnp-igd-1.0.pc.in | 2 +- |
| 12 | libgupnp-igd/Makefile.am | 2 +- |
| 13 | tests/gtest/gupnp-simple-igd.c | 6 ++++-- |
| 14 | 5 files changed, 8 insertions(+), 6 deletions(-) |
| 15 | |
| 16 | diff --git a/configure.ac b/configure.ac |
| 17 | index f03921f..aa7f0ca 100644 |
| 18 | --- a/configure.ac |
| 19 | +++ b/configure.ac |
| 20 | @@ -11,7 +11,7 @@ AC_STDC_HEADERS |
| 21 | AC_PROG_LIBTOOL |
| 22 | AC_FUNC_MMAP |
| 23 | |
| 24 | -PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.26 gobject-2.0 >= 2.26 gssdp-1.0 gupnp-1.0 >= 0.18 gthread-2.0) |
| 25 | +PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.26 gobject-2.0 >= 2.26 gssdp-1.2 gupnp-1.2 >= 0.18 gthread-2.0) |
| 26 | |
| 27 | # glib-genmarshal |
| 28 | GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` |
| 29 | diff --git a/gupnp-igd-1.0-uninstalled.pc.in b/gupnp-igd-1.0-uninstalled.pc.in |
| 30 | index 483956f..6db3bee 100644 |
| 31 | --- a/gupnp-igd-1.0-uninstalled.pc.in |
| 32 | +++ b/gupnp-igd-1.0-uninstalled.pc.in |
| 33 | @@ -5,7 +5,7 @@ includedir=${pcfiledir}/ |
| 34 | |
| 35 | Name: gupnp-igd-1.0 |
| 36 | Description: GUPnP Simple IGD library |
| 37 | -Requires: gupnp-1.0 |
| 38 | +Requires: gupnp-1.2 |
| 39 | Version: @VERSION@ |
| 40 | Libs: ${libdir}/libgupnp-av-1.0.la |
| 41 | Cflags: -I${includedir} |
| 42 | diff --git a/gupnp-igd-1.0.pc.in b/gupnp-igd-1.0.pc.in |
| 43 | index 6660d63..aa74ed3 100644 |
| 44 | --- a/gupnp-igd-1.0.pc.in |
| 45 | +++ b/gupnp-igd-1.0.pc.in |
| 46 | @@ -5,7 +5,7 @@ includedir=@includedir@ |
| 47 | |
| 48 | Name: gupnp-igd-1.0 |
| 49 | Description: GUPnP Simple IGD library |
| 50 | -Requires: gupnp-1.0 |
| 51 | +Requires: gupnp-1.2 |
| 52 | Version: @VERSION@ |
| 53 | Libs: -L${libdir} -lgupnp-igd-1.0 |
| 54 | Cflags: -I${includedir}/gupnp-igd-1.0 |
| 55 | diff --git a/libgupnp-igd/Makefile.am b/libgupnp-igd/Makefile.am |
| 56 | index fe020b5..e10d857 100644 |
| 57 | --- a/libgupnp-igd/Makefile.am |
| 58 | +++ b/libgupnp-igd/Makefile.am |
| 59 | @@ -60,7 +60,7 @@ GUPnPIgd_1_0_gir_VERSION = 1.0 |
| 60 | GUPnPIgd_1_0_gir_LIBS = $(lib_LTLIBRARIES) |
| 61 | GUPnPIgd_1_0_gir_FILES = $(libgupnp_igd_1_0_la_SOURCES) $(libgupnp_igd_inc_HEADERS) |
| 62 | GUPnPIgd_1_0_gir_INCLUDES=GObject-2.0 |
| 63 | -GUPnPIgd_1_0_gir_PACKAGES=gupnp-1.0 |
| 64 | +GUPnPIgd_1_0_gir_PACKAGES=gupnp-1.2 |
| 65 | GUPnPIgd_1_0_gir_CFLAGS=-I$(srcdir) -I$(top_srcdir) |
| 66 | |
| 67 | if HAVE_INTROSPECTION |
| 68 | diff --git a/tests/gtest/gupnp-simple-igd.c b/tests/gtest/gupnp-simple-igd.c |
| 69 | index 9b32b2a..d051d13 100644 |
| 70 | --- a/tests/gtest/gupnp-simple-igd.c |
| 71 | +++ b/tests/gtest/gupnp-simple-igd.c |
| 72 | @@ -273,13 +273,14 @@ run_gupnp_simple_igd_test (GMainContext *mainctx, GUPnPSimpleIgd *igd, |
| 73 | GUPnPDeviceInfo *subdev1; |
| 74 | GUPnPDeviceInfo *subdev2; |
| 75 | const gchar *xml_path = "."; |
| 76 | + GError *error = NULL; |
| 77 | |
| 78 | g_signal_connect (igd, "context-available", |
| 79 | G_CALLBACK (ignore_non_localhost), NULL); |
| 80 | |
| 81 | if (mainctx) |
| 82 | g_main_context_push_thread_default (mainctx); |
| 83 | - context = gupnp_context_new (NULL, "lo", 0, NULL); |
| 84 | + context = gupnp_context_new ("lo", 0, NULL); |
| 85 | g_assert (context); |
| 86 | |
| 87 | if (g_getenv ("XML_PATH")) |
| 88 | @@ -293,8 +294,9 @@ run_gupnp_simple_igd_test (GMainContext *mainctx, GUPnPSimpleIgd *igd, |
| 89 | gupnp_context_host_path (context, "WANPPPConnection.xml", "/WANPPPConnection.xml"); |
| 90 | */ |
| 91 | |
| 92 | - dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", xml_path); |
| 93 | + dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", xml_path, &error); |
| 94 | g_assert (dev); |
| 95 | + g_assert (error == NULL); |
| 96 | |
| 97 | subdev1 = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (dev), |
| 98 | "urn:schemas-upnp-org:device:WANDevice:1"); |
| 99 | -- |
| 100 | 2.25.1 |
| 101 | |