GUPnPAV.DIDLLiteObject

g GObject.Object GObject.Object GUPnPAV.DIDLLiteObject GUPnPAV.DIDLLiteObject GObject.Object->GUPnPAV.DIDLLiteObject

Subclasses:

GUPnPAV.DIDLLiteContainer, GUPnPAV.DIDLLiteItem

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

add_artist ()

add_author ()

add_creator ()

add_descriptor ()

add_resource ()

apply_fragments (current_fragments, new_fragments)

get_album ()

get_album_art ()

get_album_xml_string ()

get_artist ()

get_artists ()

get_artists_xml_string ()

get_author ()

get_authors ()

get_compat_resource (sink_protocol_info, lenient)

get_creator ()

get_creators ()

get_date ()

get_date_xml_string ()

get_dc_namespace ()

get_description ()

get_descriptors ()

get_dlna_managed ()

get_dlna_namespace ()

get_genre ()

get_id ()

get_parent_id ()

get_properties (name)

get_pv_namespace ()

get_resources ()

get_restricted ()

get_title ()

get_title_xml_string ()

get_track_number ()

get_track_number_xml_string ()

get_update_id ()

get_upnp_class ()

get_upnp_class_xml_string ()

get_upnp_namespace ()

get_write_status ()

get_xml_node ()

get_xml_string ()

is_restricted_set ()

set_album (album)

set_album_art (album_art)

set_artist (artist)

set_author (author)

set_creator (creator)

set_date (date)

set_description (description)

set_dlna_managed (dlna_managed)

set_genre (genre)

set_id (id)

set_parent_id (parent_id)

set_restricted (restricted)

set_title (title)

set_track_number (track_number)

set_update_id (update_id)

set_upnp_class (upnp_class)

set_write_status (write_status)

unset_artists ()

unset_update_id ()

update_id_is_set ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

album

str

r/w

The album of this object.

album-art

str

r/w

The URI to album art of this object.

artist

str

r/w

The artist of this object. deprecated

author

str

r/w

The author of this object. deprecated

creator

str

r/w

The creator of this object.

date

str

r/w

The date of this object.

dc-namespace

int

r/w/co

Pointer to the Dublin Core XML namespace registered with the XML document containing this object.

description

str

r/w

The description of this object.

dlna-managed

GUPnPAV.OCMFlags

r/w

The ‘dlna:dlnaManaged’ attribute

dlna-namespace

int

r/w/co

Pointer to the DLNA metadata namespace registered with the XML document containing this object.

genre

str

r/w

The genre of this object.

id

str

r/w

The ID of this object.

parent-id

str

r/w

The ID of the parent container of this object.

pv-namespace

int

r/w/co

Pointer to the PV metadata namespace registered with the XML document containing this object.

restricted

bool

r/w

Whether this object is restricted.

title

str

r/w

The title of this object.

track-number

int

r/w

The original track number of this object.

update-id

int

r/w

Update ID of this object.

upnp-class

str

r/w

The UPnP class of this object.

upnp-namespace

int

r/w/co

Pointer to the UPnP XML namespace registered with the XML document containing this object.

write-status

str

r/w

The write status of this object.

xml-node

int

r/w/co

The pointer to object node in XML document.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class GUPnPAV.DIDLLiteObject(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

GUPnPAV.DIDLLiteObjectClass

add_artist()
Returns:

A new GUPnPAV.DIDLLiteContributor object. Unref after usage.

Return type:

GUPnPAV.DIDLLiteContributor

Add a new Artist node to the self and return the associated GUPnPAV.DIDLLiteContributor object.

add_author()
Returns:

A new GUPnPAV.DIDLLiteContributor object. Unref after usage.

Return type:

GUPnPAV.DIDLLiteContributor

Add a new author node to the self and return the associated GUPnPAV.DIDLLiteContributor object.

add_creator()
Returns:

A new GUPnPAV.DIDLLiteContributor object. Unref after usage.

Return type:

GUPnPAV.DIDLLiteContributor

Add a new creator node to the self and return the associated GUPnPAV.DIDLLiteContributor object.

add_descriptor()
Returns:

A new GUPnPAV.DIDLLiteDescriptor object. Unref after usage.

Return type:

GUPnPAV.DIDLLiteDescriptor

Creates a new descriptor, attaches it to self and returns it.

add_resource()
Returns:

A new GUPnPAV.DIDLLiteResource object. Unref after usage.

Return type:

GUPnPAV.DIDLLiteResource

Creates a new resource, attaches it to self and returns it.

apply_fragments(current_fragments, new_fragments)
Parameters:
  • current_fragments ([str]) – XML fragments of self.

  • new_fragments ([str]) – Substitutes for current_fragments.

Returns:

Result of operation.

Return type:

GUPnPAV.DIDLLiteFragmentResult

Updates object by applying new_fragments in places of current_fragments. For current_size and new_size -1 can be passed when respectively current_fragments and new_fragments are None terminated.

get_album()
Returns:

The album of the self, or None.

Return type:

str

Get the album of the self.

get_album_art()
Returns:

The URI to album art of the self, or None.

Return type:

str

Get the URI to album art of the self.

get_album_xml_string()
Returns:

A DIDL-Lite XML fragment string, or None. GLib.free after usage.

Return type:

str

Creates a string representation of the DIDL-Lite XML fragment related to the object album.

get_artist()
Returns:

The artist of the self, or None.

Return type:

str

Get the artist of the self. If role is not None, it is set to the role of the artist if available.

Deprecated since version 0.5.3: Use GUPnPAV.DIDLLiteObject.get_artists instead.

get_artists()
Returns:

The list of artists belonging to self, or None. #g_list_free the returned list after usage and unref each object in it.

Return type:

[GUPnPAV.DIDLLiteContributor]

Get the artists of the self.

get_artists_xml_string()
Returns:

A DIDL-Lite XML fragment string, or None. GLib.free after usage.

Return type:

str

Creates a string representation of the DIDL-Lite XML fragments related to the object artists.

get_author()
Returns:

The author of the self, or None.

Return type:

str

Get the author of the self.

Deprecated since version 0.5.3: Use GUPnPAV.DIDLLiteObject.get_authors instead.

get_authors()
Returns:

The list of authors belonging to self, or None. #g_list_free the returned list after usage and unref each object in it.

Return type:

[GUPnPAV.DIDLLiteContributor]

Get the authors of the self.

get_compat_resource(sink_protocol_info, lenient)
Parameters:
  • sink_protocol_info (str) – The SinkProtocolInfo string from MediaRenderer

  • lenient (bool) – Enable lenient mode

Returns:

The resource belonging to self that is comaptible with any of the protocols specified in sink_protocol_info, or None. Unref after usage.

Return type:

GUPnPAV.DIDLLiteResource

Use this function to get a resource from the self that is compatible with any of the protocols specified in the sink_protocol_info. The value of sink_protocol_info will typically be acquired from ‘Sink’ argument of ‘GetProtocolInfo’ action or ‘SinkProtocolInfo’ state-variable of a ConnectionManager service.

If lenient is True, the first resource in the list is returned instead of None if none of resources and protocols are found to be compatible.

get_creator()
Returns:

The creator of the self, or None.

Return type:

str

Get the creator of the self.

get_creators()
Returns:

The list of creators belonging to self, or None. #g_list_free the returned list after usage and unref each object in it.

Return type:

[GUPnPAV.DIDLLiteContributor]

Get the creators of the self.

get_date()
Returns:

The date of the self, or None.

Return type:

str

Get the date of the self.

get_date_xml_string()
Returns:

A DIDL-Lite XML fragment string, or None. GLib.free after usage.

Return type:

str

Creates a string representation of the DIDL-Lite XML fragment related to the object date.

get_dc_namespace()
Returns:

The pointer to DublinCore namespace in XML document.

Return type:

libxml2.NsPtr

Get the pointer to the DublinCore namespace registered with the XML document containing this object.

get_description()
Returns:

The description of the self, or None.

Return type:

str

Get the description of the self.

get_descriptors()
Returns:

The list of descriptors belonging to self, or None. #g_list_free the returned list after usage and unref each object in it.

Return type:

[GUPnPAV.DIDLLiteDescriptor]

Get the descriptors of the self.

get_dlna_managed()
Returns:

The ‘dlna:dlnaManaged’ attribute of the self.

Return type:

GUPnPAV.OCMFlags

Get the ‘dlna:dlnaManaged’ attribute of the self.

get_dlna_namespace()
Returns:

The pointer to DLNA namespace in XML document.

Return type:

libxml2.NsPtr

Get the pointer to the DLNA metadata namespace registered with the XML document containing this object.

get_genre()
Returns:

The genre of the self, or None.

Return type:

str

Get the genre of the self.

get_id()
Returns:

The ID of the self, or None.

Return type:

str

Get the ID of the self.

get_parent_id()
Returns:

The ID of parent of the self, or None.

Return type:

str

Get the ID of the parent of the self.

get_properties(name)
Parameters:

name (str) – name of the properties

Returns:

The list of property nodes by the name property_name belonging to self, or None. #g_list_free the returned list after usage but do not modify the contents.

Return type:

[libxml2.Node]

Use this function to retreive property nodes by name.

get_pv_namespace()
Returns:

The pointer to PV namespace in XML document.

Return type:

libxml2.NsPtr

Get the pointer to the PV metadata namespace registered with the XML document containing this object.

get_resources()
Returns:

The list of resources belonging to self, or None. #g_list_free the returned list after usage and unref each resource in it.

Return type:

[GUPnPAV.DIDLLiteResource]

Use this function to retreive resources from the self.

get_restricted()
Returns:

True if self is restricted.

Return type:

bool

Whether the self is restricted or not.

get_title()
Returns:

The title of the self, or None.

Return type:

str

Get the title of the self.

get_title_xml_string()
Returns:

A DIDL-Lite XML fragment string, or None. GLib.free after usage.

Return type:

str

Creates a string representation of the DIDL-Lite XML fragment related to the object title.

get_track_number()
Returns:

The original track number of the self, or -1.

Return type:

int

Get the original track number of the self.

get_track_number_xml_string()
Returns:

A DIDL-Lite XML fragment string, or None. GLib.free after usage.

Return type:

str

Creates a string representation of the DIDL-Lite XML fragment related to the object track number.

get_update_id()
Returns:

The update ID of the self.

Return type:

int

Get the update ID of the self.

get_upnp_class()
Returns:

The class of self, or None.

Return type:

str

Get the UPnP class of the self.

get_upnp_class_xml_string()
Returns:

A DIDL-Lite XML fragment string, or None. GLib.free after usage.

Return type:

str

Creates a string representation of the DIDL-Lite XML fragment related to the object UPnP class.

get_upnp_namespace()
Returns:

The pointer to UPnP namespace in XML document.

Return type:

libxml2.NsPtr

Get the pointer to the UPnP namespace registered with the XML document.

get_write_status()
Returns:

The write status of the self, or None.

Return type:

str

Get the write status of the self.

get_xml_node()
Returns:

The pointer to object node in XML document.

Return type:

libxml2.Node

Get the pointer to object node in XML document.

get_xml_string()
Returns:

XML representation of this object as string.

Return type:

str

Get the representation of this object as an XML string.

is_restricted_set()
Returns:

True if restricted exists, False otherwise.

Return type:

bool

Whehter the restricted attribute exists on self

set_album(album)
Parameters:

album (str) – The album string

Set the album of the self to album.

set_album_art(album_art)
Parameters:

album_art (str) – The URI of album art

Set the URI to album art of the self to album_art.

set_artist(artist)
Parameters:

artist (str) – The Artist

Set the Artist of the self to artist.

Deprecated since version 0.5.3: Use GUPnPAV.DIDLLiteObject.add_artist instead.

set_author(author)
Parameters:

author (str) – The Author

Set the Author of the self to author.

Deprecated since version 0.5.3: Use GUPnPAV.DIDLLiteObject.add_author instead.

set_creator(creator)
Parameters:

creator (str) – The creator

Set the creator of the self to creator.

set_date(date)
Parameters:

date (str) – The date string

Set the date of the self to date.

set_description(description)
Parameters:

description (str) – The description string

Set the description of the self to description.

set_dlna_managed(dlna_managed)
Parameters:

dlna_managed (GUPnPAV.OCMFlags) – The GUPnPAV.OCMFlags.

Set the ‘dlna:dlnaManaged’ attribute of the self to dlna_managed.

set_genre(genre)
Parameters:

genre (str) – The Genre

Set the genre of the self to genre.

set_id(id)
Parameters:

id (str) – The ID

Set the ID of the self to id.

set_parent_id(parent_id)
Parameters:

parent_id (str) – The parent ID

Set the ID of the parent of the self to parent_id.

set_restricted(restricted)
Parameters:

restricted (bool) – The restricted status

Set the restricted status of self to restricted.

set_title(title)
Parameters:

title (str) – The title

Set the title of the self to title.

set_track_number(track_number)
Parameters:

track_number (int) – The original track number

Set the original track number of the self to track_number.

set_update_id(update_id)
Parameters:

update_id (int) – Update ID

Set the update ID of the self.

set_upnp_class(upnp_class)
Parameters:

upnp_class (str) – The UPnP class as string.

Set the UPnP class of the self to upnp_class.

set_write_status(write_status)
Parameters:

write_status (str) – The write status string

Set the write status of the self to write_status.

unset_artists()

Unset the artists properties of the self.

unset_update_id()

Unset the update ID property of the self.

update_id_is_set()
Returns:

True if update ID is set, otherwise False

Return type:

bool

Get whether the update ID of the self is set.

Property Details

GUPnPAV.DIDLLiteObject.props.album
Name:

album

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The album of this object.

GUPnPAV.DIDLLiteObject.props.album_art
Name:

album-art

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The URI to album art of this object.

GUPnPAV.DIDLLiteObject.props.artist
Name:

artist

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The artist of this object.

Deprecated since version 0.5.3: Use GUPnPAV.DIDLLiteObject.get_artists and GUPnPAV.DIDLLiteObject.add_artist instead since unlike this property, they are capable of dealing with multiple artist nodes.

GUPnPAV.DIDLLiteObject.props.author
Name:

author

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The author of this object.

Deprecated since version 0.5.3: Use GUPnPAV.DIDLLiteObject.get_authors and GUPnPAV.DIDLLiteObject.add_author instead since unlike this property, they are capable of dealing with multiple author nodes.

GUPnPAV.DIDLLiteObject.props.creator
Name:

creator

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The creator of this object.

GUPnPAV.DIDLLiteObject.props.date
Name:

date

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The date of this object.

GUPnPAV.DIDLLiteObject.props.dc_namespace
Name:

dc-namespace

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Pointer to the DublinCore namespace registered with the XML document containing this object.

GUPnPAV.DIDLLiteObject.props.description
Name:

description

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The description of this object.

GUPnPAV.DIDLLiteObject.props.dlna_managed
Name:

dlna-managed

Type:

GUPnPAV.OCMFlags

Default Value:

GUPnPAV.OCMFlags.NONE

Flags:

READABLE, WRITABLE

The ‘dlna:dlnaManaged’ attribute.

GUPnPAV.DIDLLiteObject.props.dlna_namespace
Name:

dlna-namespace

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Pointer to the DLNA metadata namespace registered with the XML document containing this object.

GUPnPAV.DIDLLiteObject.props.genre
Name:

genre

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The genre of this object.

GUPnPAV.DIDLLiteObject.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The ID of this object.

GUPnPAV.DIDLLiteObject.props.parent_id
Name:

parent-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The ID of the parent container of this object.

GUPnPAV.DIDLLiteObject.props.pv_namespace
Name:

pv-namespace

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Pointer to the PV metadata namespace registered with the XML document containing this object.

GUPnPAV.DIDLLiteObject.props.restricted
Name:

restricted

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether this object is restricted.

GUPnPAV.DIDLLiteObject.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The title of this object.

GUPnPAV.DIDLLiteObject.props.track_number
Name:

track-number

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

The original track number of this object.

GUPnPAV.DIDLLiteObject.props.update_id
Name:

update-id

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Update ID of this object.

GUPnPAV.DIDLLiteObject.props.upnp_class
Name:

upnp-class

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The UPnP class of this object.

GUPnPAV.DIDLLiteObject.props.upnp_namespace
Name:

upnp-namespace

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Pointer to the UPnP namespace registered with the XML document containing this object.

GUPnPAV.DIDLLiteObject.props.write_status
Name:

write-status

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The write status of this object.

GUPnPAV.DIDLLiteObject.props.xml_node
Name:

xml-node

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The pointer to object node in XML document.