GUPnPDLNA.ProfileGuesser

g GObject.Object GObject.Object GUPnPDLNA.ProfileGuesser GUPnPDLNA.ProfileGuesser GObject.Object->GUPnPDLNA.ProfileGuesser

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

cleanup ()

class

new (relaxed_mode, extended_mode)

get_extended_mode ()

get_profile (name)

get_relaxed_mode ()

guess_profile_async (uri, timeout_in_ms)

guess_profile_from_info (info)

guess_profile_sync (uri, timeout_in_ms)

list_profiles ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

extended-mode

bool

r/w/co

Indicates support for profiles that are not part of the DLNA specification

relaxed-mode

bool

r/w/co

Indicates that profile matching shouldbe strictly compliant with the DLNA specification

Signals

Inherited:

GObject.Object (1)

Name

Short Description

done

Will be emitted when guessing DLNA profile for a URI has finished.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class GUPnPDLNA.ProfileGuesser(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GUPnPDLNA.ProfileGuesserClass

classmethod cleanup()

Cleans up the DLNA profiles. Provided to remove Valgrind noise. Not thread-safe. Do not call it if there is even a slightest chance that profile guessing will be performed during process lifetime. The profiles are not reloaded after cleanup.

classmethod new(relaxed_mode, extended_mode)
Parameters:
  • relaxed_mode (bool) – True to enable relaxed mode support. False otherwise.

  • extended_mode (bool) – True to enable extended mode support. False otherwise.

Returns:

A new GUPnPDLNA.ProfileGuesser object.

Return type:

GUPnPDLNA.ProfileGuesser

Creates a new guesser that will use specific DLNA profiles for matching - i.e. which profiles will be used depends on relaxed_mode and extended_mode.

get_extended_mode()
Returns:

True if self is in extended mode, False otherwise.

Return type:

bool

get_profile(name)
Parameters:

name (str) – The name of the DLNA profile to be retrieved.

Returns:

A GUPnPDLNA.Profile object on success, None otherwise.

Return type:

GUPnPDLNA.Profile

Lookups for GUPnPDLNA.Profile with given name.

get_relaxed_mode()
Returns:

True if self is in relaxed mode, False otherwise.

Return type:

bool

guess_profile_async(uri, timeout_in_ms)
Parameters:
  • uri (str) – URI of media.

  • timeout_in_ms (int) – Timeout of guessing in miliseconds.

Raises:

GLib.Error

Returns:

True if uri was successfully queued, False otherwise.

Return type:

bool

Asynchronously guesses DLNA profile for given uri. When guessing is done, ::done signal is emitted on self.

guess_profile_from_info(info)
Parameters:

info (GUPnPDLNA.Information) – The GUPnPDLNA.Information object.

Returns:

A GUPnPDLNA.Profile object on success, None otherwise.

Return type:

GUPnPDLNA.Profile

Guesses the profile which fits to passed info.

guess_profile_sync(uri, timeout_in_ms)
Parameters:
  • uri (str) – URI of media.

  • timeout_in_ms (int) – Timeout of guessing in miliseconds.

Raises:

GLib.Error

Returns:

DLNA profile if any had matched, None otherwise.

dlna_info:

A place where to store DLNA information or None.

Return type:

(GUPnPDLNA.Profile, dlna_info: GUPnPDLNA.Information)

Synchronously guesses DLNA profile for given uri.

list_profiles()
Returns:

A GLib.List of GUPnPDLNA.Profile on success, None otherwise.

Return type:

[GUPnPDLNA.Profile]

Gets a list of the all DLNA profiles supported by self.

Signal Details

GUPnPDLNA.ProfileGuesser.signals.done(profile_guesser, info, dlna, error)
Signal Name:

done

Flags:

RUN_LAST

Parameters:

Will be emitted when guessing DLNA profile for a URI has finished.

Property Details

GUPnPDLNA.ProfileGuesser.props.extended_mode
Name:

extended-mode

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether profile matching should be done also against DLNA profiles not being a part of DLNA specification.

GUPnPDLNA.ProfileGuesser.props.relaxed_mode
Name:

relaxed-mode

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether profile matching should not be strictly compliant with the DLNA specification.