[gupnp] context-filter: Remove white-list reference



commit c22ae9e7e8cb7a69506986e6ec43ebf3e243bc71
Author: Jens Georg <mail jensge org>
Date:   Sat Aug 7 20:13:29 2021 +0200

    context-filter: Remove white-list reference

 libgupnp/gupnp-context-filter.c  | 16 ++++++++--------
 libgupnp/gupnp-context-filter.h  |  3 ---
 libgupnp/gupnp-context-manager.c |  2 +-
 3 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/libgupnp/gupnp-context-filter.c b/libgupnp/gupnp-context-filter.c
index 71f2605..cfc13ce 100644
--- a/libgupnp/gupnp-context-filter.c
+++ b/libgupnp/gupnp-context-filter.c
@@ -168,7 +168,7 @@ gupnp_context_filter_class_init (GUPnPContextFilterClass *klass)
         /**
          * GUPnPContextFilter:entries: (type GList(utf8))
          *
-         * Whether this white list is active or not.
+         * A list of items to filter for.
          *
          * Since: 1.4.0
          **/
@@ -187,7 +187,7 @@ gupnp_context_filter_class_init (GUPnPContextFilterClass *klass)
  * gupnp_context_filter_new:
  *
  * Create a new #GUPnPContextFilter.
- * The white list is disabled by default.
+ * The context filter is disabled by default.
  *
  * Returns: (transfer full): A new #GUPnPContextFilter object.
  *
@@ -368,9 +368,9 @@ gupnp_context_filter_remove_entry (GUPnPContextFilter *context_filter,
  * gupnp_context_filter_get_entries:
  * @context_filter: A #GUPnPContextFilter
  *
- * Get the #GList of entries that compose the white list. Do not free
+ * Get the #GList of entries that compose the context filter. Do not free
  *
- * Return value: (element-type utf8) (transfer none):  a #GList of entries
+ * Return value: (element-type utf8) (transfer none)(nullable):  a #GList of entries
  * used to filter networks, interfaces,... or %NULL.
  * Do not modify or free the list nor its elements.
  *
@@ -392,7 +392,7 @@ gupnp_context_filter_get_entries (GUPnPContextFilter *context_filter)
  * gupnp_context_filter_clear:
  * @context_filter: A #GUPnPContextFilter
  *
- * Remove all entries from #GList that compose the white list.
+ * Remove all entries from #GList that compose the context filter.
  * The list is now empty. Even if #GUPnPContextFilter is enabled, it will have
  * the same behavior as if it was disabled.
  *
@@ -417,9 +417,9 @@ gupnp_context_filter_clear (GUPnPContextFilter *context_filter)
  * @context: A #GUPnPContext to test.
  *
  * It will check if the @context is allowed or not. The @context_filter will
- *check all its entries againt #GUPnPContext interface, host ip and network
- *fields information. This function doesn't take into account the
- *@context_filter status (enabled or not).
+ * check all its entries againt #GUPnPContext interface, host ip and network
+ * fields information. This function doesn't take into account the
+ * @context_filter status (enabled or not).
  *
  * Return value: %TRUE if @context is matching the @context_filter criterias,
  * %FALSE otherwise.
diff --git a/libgupnp/gupnp-context-filter.h b/libgupnp/gupnp-context-filter.h
index b36226b..20ca124 100644
--- a/libgupnp/gupnp-context-filter.h
+++ b/libgupnp/gupnp-context-filter.h
@@ -27,9 +27,6 @@ struct _GUPnPContextFilterClass {
         GObjectClass parent_class;
 };
 
-GUPnPContextFilter *
-gupnp_context_filter_new (void);
-
 void
 gupnp_context_filter_set_enabled (GUPnPContextFilter *context_filter,
                                   gboolean enable);
diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c
index 0d57fde..49adc06 100644
--- a/libgupnp/gupnp-context-manager.c
+++ b/libgupnp/gupnp-context-manager.c
@@ -366,7 +366,7 @@ gupnp_context_manager_init (GUPnPContextManager *manager)
 
         priv = gupnp_context_manager_get_instance_private (manager);
 
-        priv->context_filter = gupnp_context_filter_new ();
+        priv->context_filter = g_object_new (GUPNP_TYPE_CONTEXT_FILTER, NULL);
 
         g_signal_connect_after (priv->context_filter,
                                 "notify::entries",


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