GSSDP.ResourceGroup

g GObject.Object GObject.Object GSSDP.ResourceGroup GSSDP.ResourceGroup GObject.Object->GSSDP.ResourceGroup

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class new (client)
  add_resource (target, usn, locations)
  add_resource_simple (target, usn, location)
  get_available ()
  get_client ()
  get_max_age ()
  get_message_delay ()
  remove_resource (resource_id)
  set_available (available)
  set_max_age (max_age)
  set_message_delay (message_delay)
  update (new_boot_id)

Virtual Methods

Inherited:GObject.Object (7)

Properties

Name Type Flags Short Description
available bool r/w Whether this group of resources is available or not.
client GSSDP.Client r/w/co The associated client.
max-age int r/w The number of seconds advertisements are valid.
message-delay int r/w The minimum number of milliseconds between SSDP messages.

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent_instance GObject.Object r  

Class Details

class GSSDP.ResourceGroup(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:GSSDP.ResourceGroupClass
classmethod new(client)
Parameters:client (GSSDP.Client) – The GSSDP.Client to associate with
Returns:A new GSSDP.ResourceGroup object.
Return type:GSSDP.ResourceGroup
add_resource(target, usn, locations)
Parameters:
  • target (str) – The resource’s target
  • usn (str) – The resource’s USN
  • locations ([str]) – A GLib.List of the resource’s locations
Returns:

The ID of the added resource.

Return type:

int

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

add_resource_simple(target, usn, location)
Parameters:
  • target (str) – The resource’s target
  • usn (str) – The resource’s USN
  • location (str) – The resource’s location
Returns:

The ID of the added resource.

Return type:

int

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

get_available()
Returns:True if self is available (advertised).
Return type:bool
get_client()
Returns:The GSSDP.Client self is associated with.
Return type:GSSDP.Client
get_max_age()
Returns:The number of seconds advertisements are valid.
Return type:int
get_message_delay()
Returns:the minimum time between each SSDP message in ms.
Return type:int
remove_resource(resource_id)
Parameters:resource_id (int) – The ID of the resource to remove

Removes the resource with ID resource_id from self.

set_available(available)
Parameters:available (bool) – True if self should be available (advertised)

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

set_max_age(max_age)
Parameters:max_age (int) – The number of seconds advertisements are valid

Sets the number of seconds advertisements are valid to max_age.

set_message_delay(message_delay)
Parameters:message_delay (int) – The message delay in ms.

Sets the minimum time between each SSDP message.

update(new_boot_id)
Parameters:new_boot_id (int) – The new boot id of the device

Send an ssdp::update message if the underlying GSSDP.Client is running the UDA 1.1 protocol. Does nothing otherwise.

Property Details

GSSDP.ResourceGroup.props.available
Name:available
Type:bool
Default Value:False
Flags:READABLE, WRITABLE

Whether this group of resources is available or not.

GSSDP.ResourceGroup.props.client
Name:client
Type:GSSDP.Client
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The GSSDP.Client to use.

GSSDP.ResourceGroup.props.max_age
Name:max-age
Type:int
Default Value:1800
Flags:READABLE, WRITABLE

The number of seconds our advertisements are valid.

GSSDP.ResourceGroup.props.message_delay
Name:message-delay
Type:int
Default Value:120
Flags:READABLE, WRITABLE

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