Top | ![]() |
![]() |
![]() |
![]() |
gboolean | gupnp_context_filter_add_entry () |
void | gupnp_context_filter_add_entryv () |
gboolean | gupnp_context_filter_check_context () |
void | gupnp_context_filter_clear () |
gboolean | gupnp_context_filter_get_enabled () |
GList * | gupnp_context_filter_get_entries () |
gboolean | gupnp_context_filter_is_empty () |
gboolean | gupnp_context_filter_remove_entry () |
void | gupnp_context_filter_set_enabled () |
GUPnPContextFilter * | gupnp_context_manager_get_context_filter () |
GUPnPContextFilter handles network filtering. It provides API to manage a list of entries that will be used to filter networks. The GUPnPContextFilter could be enabled or not. If it's enabled but the entries list is empty, it behaves as disabled.
gboolean gupnp_context_filter_add_entry (GUPnPContextFilter *context_filter
,const gchar *entry
);
Add entry
in the list of valid criteria used by context_filter
to
filter networks.
if entry
already exists, it won't be added a second time.
Since: 1.4.0
void gupnp_context_filter_add_entryv (GUPnPContextFilter *context_filter
,gchar **entries
);
Add a list of entries to a GUPnPContextFilter. This is a helper function to
directly add a NULL
-terminated array of string usually aquired from
commandline args.
Since: 1.4.0
gboolean gupnp_context_filter_check_context (GUPnPContextFilter *context_filter
,GUPnPContext *context
);
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).
Since: 1.4.0
void
gupnp_context_filter_clear (GUPnPContextFilter *context_filter
);
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.
Since: 1.4.0
gboolean
gupnp_context_filter_get_enabled (GUPnPContextFilter *context_filter
);
Return the status of the GUPnPContextFilter
Since: 1.4.0
GList *
gupnp_context_filter_get_entries (GUPnPContextFilter *context_filter
);
Get the GList of entries that compose the context filter. Do not free
a GList of entries
used to filter networks, interfaces,... or NULL
.
Do not modify or free the list nor its elements.
[element-type utf8][transfer container][nullable]
Since: 1.4.0
gboolean
gupnp_context_filter_is_empty (GUPnPContextFilter *context_filter
);
Return the state of the entries list of GUPnPContextFilter
Since: 1.4.0
gboolean gupnp_context_filter_remove_entry (GUPnPContextFilter *context_filter
,const gchar *entry
);
Remove entry
in the list of valid criteria used by context_filter
to
filter networks.
Since: 1.4.0
void gupnp_context_filter_set_enabled (GUPnPContextFilter *context_filter
,gboolean enable
);
Enable or disable the GUPnPContextFilter to perform the network filtering.
Since: 1.4.0
GUPnPContextFilter *
gupnp_context_manager_get_context_filter
(GUPnPContextManager *manager
);
Get the GUPnPContextFilter associated with manager
.
typedef struct _GUPnPContextFilter GUPnPContextFilter;
Class for network context filtering.
GUPnPContextFilter handles network filtering. It provides API to manage a list of entries that will be used to filter networks. The GUPnPContextFilter could be enabled or not. If it's enabled but the entries list is empty, it behaves as disabled.
Since: 1.4.0