manpagez: man pages & more
html files: gupnp
Home | html | info | man

GUPnPWhiteList

GUPnPWhiteList — Class for network filtering.

Properties

gboolean enabled Read / Write / Construct
gpointer entries Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GUPnPWhiteList

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.

Parameters

white_list

A GUPnPWhiteList

 

entry

A value used to filter network

 

Returns

TRUE if entry is added, FALSE otherwise.

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.

Parameters

white_list

A GUPnPWhiteList

 

entries

A NULL-terminated list of strings.

[array zero-terminated=1]

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).

Parameters

white_list

A GUPnPWhiteList

 

context

A GUPnPContext to test.

 

Returns

TRUE if context is matching the white_list criterias, FALSE otherwise.

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.

Parameters

white_list

A GUPnPWhiteList

 

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.

Parameters

white_list

A GUPnPWhiteList

 

enable

TRUE to enable white_list , FALSE otherwise

 

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

Parameters

white_list

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]

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

Parameters

white_list

A GUPnPWhiteList

 

Returns

TRUE if white_list is empty, FALSE otherwise.

Since: 0.20.5


gupnp_white_list_get_enabled ()

gboolean
gupnp_white_list_get_enabled (GUPnPWhiteList *white_list);

Return the status of the GUPnPWhiteList

Parameters

white_list

A GUPnPWhiteList

 

Returns

TRUE if white_list is enabled, FALSE otherwise.

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.

Returns

A new GUPnPWhiteList object.

[transfer full]

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.

Parameters

white_list

A GUPnPWhiteList

 

entry

A value to remove from the filter list.

 

Returns

TRUE if entry is removed, FALSE otherwise.

Since: 0.20.5

Types and Values

struct GUPnPWhiteList

struct GUPnPWhiteList;

This struct contains private data only, and should be accessed using the functions below.

Property Details

The “enabled” property

  “enabled”                  gboolean

Whether this white list is active or not.

Flags: Read / Write / Construct

Default value: FALSE

Since: 0.20.5


The “entries” property

  “entries”                  gpointer

Whether this white list is active or not.

[type GList(utf8)]

Flags: Read / Write / Construct Only

Since: 0.20.5

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.