![]() |
![]() |
![]() |
GUPnP Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct GUPnPWhiteList; gboolean gupnp_white_list_add_entry (GUPnPWhiteList *white_list
,gchar *entry
); void gupnp_white_list_add_entryv (GUPnPWhiteList *white_list
,gchar **entries
); gboolean gupnp_white_list_check_context (GUPnPWhiteList *white_list
,GUPnPContext *context
); void gupnp_white_list_clear (GUPnPWhiteList *white_list
); void gupnp_white_list_set_enabled (GUPnPWhiteList *white_list
,gboolean enable
); GList * gupnp_white_list_get_entries (GUPnPWhiteList *white_list
); gboolean gupnp_white_list_is_empty (GUPnPWhiteList *white_list
); gboolean gupnp_white_list_get_enabled (GUPnPWhiteList *white_list
); GUPnPWhiteList * gupnp_white_list_new (void
); gboolean gupnp_white_list_remove_entry (GUPnPWhiteList *white_list
,gchar *entry
);
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.
struct GUPnPWhiteList;
This struct contains private data only, and should be accessed using the functions below.
gboolean gupnp_white_list_add_entry (GUPnPWhiteList *white_list
,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.
|
A GUPnPWhiteList |
|
A value used to filter network |
Returns : |
TRUE if entry is added, FALSE otherwise. |
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.
|
A GUPnPWhiteList |
|
A NULL -terminated list of strings. [array zero-terminated=1]
|
Since 0.20.8
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).
|
A GUPnPWhiteList |
|
A GUPnPContext to test. |
Returns : |
TRUE if context is matching the white_list criterias,
FALSE otherwise. |
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.
|
A GUPnPWhiteList |
void gupnp_white_list_set_enabled (GUPnPWhiteList *white_list
,gboolean enable
);
Enable or disable the GUPnPWhiteList to perform the network filtering.
|
A GUPnPWhiteList |
|
TRUE to enable white_list , FALSE otherwise |
GList * gupnp_white_list_get_entries (GUPnPWhiteList *white_list
);
Get the GList of entries that compose the white list. Do not free
|
A GUPnPWhiteList |
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]
|
gboolean gupnp_white_list_is_empty (GUPnPWhiteList *white_list
);
Return the state of the entries list of GUPnPWhiteList
|
A GUPnPWhiteList |
Returns : |
TRUE if white_list is empty, FALSE otherwise. |
gboolean gupnp_white_list_get_enabled (GUPnPWhiteList *white_list
);
Return the status of the GUPnPWhiteList
|
A GUPnPWhiteList |
Returns : |
TRUE if white_list is enabled, FALSE otherwise. |
GUPnPWhiteList * gupnp_white_list_new (void
);
Create a new GUPnPWhiteList. The white list is disabled by default.
Returns : |
A new GUPnPWhiteList object. [transfer full] |
gboolean gupnp_white_list_remove_entry (GUPnPWhiteList *white_list
,gchar *entry
);
Remove entry
in the list of valid criteria used by white_list
to
filter networks.
|
A GUPnPWhiteList |
|
A value to remove from the filter list. |
Returns : |
TRUE if entry is removed, FALSE otherwise. |