## GSSDPResourceGroup GSSDPResourceGroup — Class for controlling resource announcement. |

## Functions

GSSDPResourceGroup * | gssdp_resource_group_new ()
GSSDPClient * | gssdp_resource_group_get_client ()
void | gssdp_resource_group_set_max_age ()
guint | gssdp_resource_group_get_max_age ()
void | gssdp_resource_group_set_available ()
gboolean | gssdp_resource_group_get_available ()
void | gssdp_resource_group_set_message_delay ()
guint | gssdp_resource_group_get_message_delay ()
guint | gssdp_resource_group_add_resource ()
guint | gssdp_resource_group_add_resource_simple ()
void | gssdp_resource_group_remove_resource ()

## Properties

gboolean | available | Read / Write
GSSDPClient * | client | Read / Write / Construct Only
guint | max-age | Read / Write
guint | message-delay | Read / Write

## Types and Values

struct | GSSDPResourceGroup

## Object Hierarchy

        GObject
        ╰── GSSDPResourceGroup

## Description

A GSSDPResourceGroup is a group of SSDP resources whose availability can be controlled as one. This is useful when one needs to announce a single service as multiple SSDP resources (UPnP does this for example).

## Functions

### gssdp_resource_group_new ()

    GSSDPResourceGroup *
    gssdp_resource_group_new (GSSDPClient *client);

#### Parameters

client | The GSSDPClient to associate with |

#### Returns

A new GSSDPResourceGroup object.

### gssdp_resource_group_get_client ()

    GSSDPClient *
    gssdp_resource_group_get_client (GSSDPResourceGroup *resource_group);

#### Parameters

resource_group | A GSSDPResourceGroup |

#### Returns

The GSSDPClient `resource_group` is associated with.

[transfer none]

### gssdp_resource_group_set_max_age ()

    void
    gssdp_resource_group_set_max_age (GSSDPResourceGroup *resource_group,
                                      guint max_age);

Sets the number of seconds advertisements are valid to `max_age` .

#### Parameters

resource_group | A GSSDPResourceGroup |
max_age | The number of seconds advertisements are valid |

### gssdp_resource_group_get_max_age ()

    guint
    gssdp_resource_group_get_max_age (GSSDPResourceGroup *resource_group);

#### Parameters

resource_group | A GSSDPResourceGroup |

#### Returns

The number of seconds advertisements are valid.

### gssdp_resource_group_set_available ()

    void
    gssdp_resource_group_set_available (GSSDPResourceGroup *resource_group,
                                        gboolean available);

Sets `resource_group` s availability to `available` . Changing `resource_group` s availability causes it to announce its new state to listening SSDP clients.

#### Parameters

resource_group | A GSSDPResourceGroup |
available | `TRUE` if `resource_group` should be available (advertised) |

### gssdp_resource_group_get_available ()

    gboolean
    gssdp_resource_group_get_available (GSSDPResourceGroup *resource_group);

#### Parameters

resource_group | A GSSDPResourceGroup |

#### Returns

TRUE if `resource_group` is available (advertised).

### gssdp_resource_group_set_message_delay ()

    void
    gssdp_resource_group_set_message_delay
                                   (GSSDPResourceGroup *resource_group,
                                    guint message_delay);

Sets the minimum time between each SSDP message.

#### Parameters

resource_group | A GSSDPResourceGroup |
message_delay | The message delay in ms. |

### gssdp_resource_group_get_message_delay ()

    guint
    gssdp_resource_group_get_message_delay
                                   (GSSDPResourceGroup *resource_group);

#### Parameters

resource_group | A GSSDPResourceGroup |

#### Returns

the minimum time between each SSDP message in ms.

### gssdp_resource_group_add_resource ()

    guint
    gssdp_resource_group_add_resource (GSSDPResourceGroup *resource_group,
                                       const char *target,
                                       const char *usn,
                                       GList *locations);

Adds a resource with target `target` , USN `usn` , and locations `locations` to `resource_group` .

#### Parameters

resource_group | A GSSDPResourceGroup |
target | The resource's target |
usn | The resource's USN |
locations | A GList of the resource's locations. | [element-type utf8]

#### Returns

The ID of the added resource.

### gssdp_resource_group_add_resource_simple ()

    guint
    gssdp_resource_group_add_resource_simple
                                   (GSSDPResourceGroup *resource_group,
                                    const char *target,
                                    const char *usn,
                                    const char *location);

Adds a resource with target `target` , USN `usn` , and location `location` to `resource_group` .

#### Parameters

resource_group | A GSSDPResourceGroup |
target | The resource's target |
usn | The resource's USN |
location | The resource's location |

#### Returns

The ID of the added resource.

### gssdp_resource_group_remove_resource ()

    void
    gssdp_resource_group_remove_resource (GSSDPResourceGroup *resource_group,
                                          guint resource_id);

Removes the resource with ID `resource_id` from `resource_group` .

#### Parameters

resource_group | A GSSDPResourceGroup |
resource_id | The ID of the resource to remove |

## Types and Values

### struct GSSDPResourceGroup

    struct GSSDPResourceGroup;

## Property Details

### The `“available”` property

      “available”                gboolean

Whether this group of resources is available or not.

Flags: Read / Write

Default value: FALSE

### The `“client”` property

      “client”                   GSSDPClient *

The GSSDPClient to use.

Flags: Read / Write / Construct Only

### The `“max-age”` property

      “max-age”                  guint

The number of seconds our advertisements are valid.

Flags: Read / Write

Default value: 1800

### The `“message-delay”` property

      “message-delay”            guint

The minimum number of milliseconds between SSDP messages. The default is 120 based on DLNA specification.

Flags: Read / Write

Default value: 120