Top |
Functions
Description
GUPnPWhiteList handles network filtering. It provides API to manage a list of entries that will be used to filter networks. The GUPnPWhiteList could be enabled or not. If it's enabled but the entries list is empty, it behaves as disabled.
Functions
gupnp_white_list_add_entry ()
gboolean gupnp_white_list_add_entry (GUPnPWhiteList *white_list
,const gchar *entry
);
Add entry
in the list of valid criteria used by white_list
to
filter networks.
if entry
already exists, it won't be added a second time.
Since: 0.20.5
gupnp_white_list_add_entryv ()
void gupnp_white_list_add_entryv (GUPnPWhiteList *white_list
,gchar **entries
);
Add a list of entries to a GUPnPWhiteList. This is a helper function to
directly add a NULL
-terminated array of string usually aquired from
commandline args.
Since: 0.20.8
gupnp_white_list_check_context ()
gboolean gupnp_white_list_check_context (GUPnPWhiteList *white_list
,GUPnPContext *context
);
It will check if the context
is allowed or not. The white_list
will check
all its entries againt GUPnPContext interface, host ip and network fields
information. This function doesn't take into account the white_list
status
(enabled or not).
Since: 0.20.5
gupnp_white_list_clear ()
void
gupnp_white_list_clear (GUPnPWhiteList *white_list
);
Remove all entries from GList that compose the white list. The list is now empty. Even if GUPnPWhiteList is enabled, it will have the same behavior as if it was disabled.
Since: 0.20.5
gupnp_white_list_set_enabled ()
void gupnp_white_list_set_enabled (GUPnPWhiteList *white_list
,gboolean enable
);
Enable or disable the GUPnPWhiteList to perform the network filtering.
Since: 0.20.5
gupnp_white_list_get_entries ()
GList *
gupnp_white_list_get_entries (GUPnPWhiteList *white_list
);
Get the GList of entries that compose the white list. Do not free
Returns
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 none]
Since: 0.20.5
gupnp_white_list_is_empty ()
gboolean
gupnp_white_list_is_empty (GUPnPWhiteList *white_list
);
Return the state of the entries list of GUPnPWhiteList
Since: 0.20.5
gupnp_white_list_get_enabled ()
gboolean
gupnp_white_list_get_enabled (GUPnPWhiteList *white_list
);
Return the status of the GUPnPWhiteList
Since: 0.20.5
gupnp_white_list_new ()
GUPnPWhiteList *
gupnp_white_list_new (void
);
Create a new GUPnPWhiteList. The white list is disabled by default.
Since: 0.20.5
gupnp_white_list_remove_entry ()
gboolean gupnp_white_list_remove_entry (GUPnPWhiteList *white_list
,const gchar *entry
);
Remove entry
in the list of valid criteria used by white_list
to
filter networks.
Since: 0.20.5