[gupnp-tools] control points: Remove deprecated white list calls



commit 43ea1b585d3be334417a41d67e9280186213e4b2
Author: Jens Georg <mail jensge org>
Date:   Tue Nov 16 20:21:35 2021 +0100

    control points: Remove deprecated white list calls

 meson.build             |  2 +-
 src/av-cp/main.c        | 10 +++++-----
 src/universal-cp/main.c | 11 ++++++-----
 3 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/meson.build b/meson.build
index 3c1b52d..db84969 100644
--- a/meson.build
+++ b/meson.build
@@ -8,7 +8,7 @@ if host_machine.system() == 'windows'
 endif
 
 gssdp = dependency('gssdp-1.2', version: '>= 1.2.0', default_options: ['sniffer=false'])
-gupnp = dependency('gupnp-1.2', version: '>= 1.2.0')
+gupnp = dependency('gupnp-1.2', version: '>= 1.4.0')
 soup = dependency('libsoup-2.4', version: '>= 2.42')
 gupnp_av = dependency('gupnp-av-1.0', version: '>= 0.5.5', required: get_option('av-tools'))
 gtk = dependency('gtk+-3.0', version: '>= 3.10')
diff --git a/src/av-cp/main.c b/src/av-cp/main.c
index 130eb6a..647e8ef 100644
--- a/src/av-cp/main.c
+++ b/src/av-cp/main.c
@@ -146,7 +146,7 @@ on_context_available (GUPnPContextManager *cm,
 static gboolean
 init_upnp (int port)
 {
-        GUPnPWhiteList *white_list;
+        GUPnPContextFilter *context_filter;
         GtkButton *button;
         GUPnPResourceFactory *factory;
         GSocketFamily family = G_SOCKET_FAMILY_INVALID;
@@ -190,10 +190,10 @@ init_upnp (int port)
         g_assert (context_manager != NULL);
 
         if (interfaces != NULL) {
-                white_list = gupnp_context_manager_get_white_list
-                                            (context_manager);
-                gupnp_white_list_add_entryv (white_list, interfaces);
-                gupnp_white_list_set_enabled (white_list, TRUE);
+                context_filter = gupnp_context_manager_get_context_filter (
+                        context_manager);
+                gupnp_context_filter_add_entryv (context_filter, interfaces);
+                gupnp_context_filter_set_enabled (context_filter, TRUE);
         }
 
         g_signal_connect (context_manager,
diff --git a/src/universal-cp/main.c b/src/universal-cp/main.c
index f4f7f11..05e0704 100644
--- a/src/universal-cp/main.c
+++ b/src/universal-cp/main.c
@@ -131,7 +131,8 @@ on_context_available (GUPnPContextManager *manager,
 static gboolean
 init_upnp (void)
 {
-        GUPnPWhiteList *white_list;
+        GUPnPContextFilter *context_filter;
+
         GSocketFamily family = G_SOCKET_FAMILY_INVALID;
 
         if (!(ipv4 && ipv6)) {
@@ -148,10 +149,10 @@ init_upnp (void)
         g_assert (context_manager != NULL);
 
         if (interfaces != NULL) {
-                white_list = gupnp_context_manager_get_white_list
-                                            (context_manager);
-                gupnp_white_list_add_entryv (white_list, interfaces);
-                gupnp_white_list_set_enabled (white_list, TRUE);
+                context_filter = gupnp_context_manager_get_context_filter (
+                        context_manager);
+                gupnp_context_filter_add_entryv (context_filter, interfaces);
+                gupnp_context_filter_set_enabled (context_filter, TRUE);
         }
 
         g_signal_connect (context_manager,


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