GUPnPDLNAProfileGuesser

GUPnPDLNAProfileGuesser — Utility API for discovering DLNA profile for given media.

Functions

Properties

gboolean extended-mode Read / Write / Construct Only
gboolean relaxed-mode Read / Write / Construct Only

Signals

void done Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GUPnPDLNAProfileGuesser

Description

The API provides synchronous and asynchronous guessing of DLNA profile. The asynchronous mode requires a running GMainLoop in the default GMainContext.

Functions

gupnp_dlna_profile_guesser_new ()

GUPnPDLNAProfileGuesser *
gupnp_dlna_profile_guesser_new (gboolean relaxed_mode,
                                gboolean extended_mode);

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 .

Parameters

relaxed_mode

TRUE to enable relaxed mode support. FALSE otherwise.

 

extended_mode

TRUE to enable extended mode support. FALSE otherwise.

 

Returns

A new GUPnPDLNAProfileGuesser object.


gupnp_dlna_profile_guesser_guess_profile_async ()

gboolean
gupnp_dlna_profile_guesser_guess_profile_async
                               (GUPnPDLNAProfileGuesser *guesser,
                                const gchar *uri,
                                guint timeout_in_ms,
                                GError **error);

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

Parameters

guesser

GUPnPDLNAProfileGuesser object to use for guessing.

 

uri

URI of media.

 

timeout_in_ms

Timeout of guessing in miliseconds.

 

error

GError object or NULL.

 

Returns

TRUE if uri was successfully queued, FALSE otherwise.


gupnp_dlna_profile_guesser_guess_profile_sync ()

GUPnPDLNAProfile *
gupnp_dlna_profile_guesser_guess_profile_sync
                               (GUPnPDLNAProfileGuesser *guesser,
                                const gchar *uri,
                                guint timeout_in_ms,
                                GUPnPDLNAInformation **dlna_info,
                                GError **error);

Synchronously guesses DLNA profile for given uri .

Parameters

guesser

GUPnPDLNAProfileGuesser object to use for guessing.

 

uri

URI of media.

 

timeout_in_ms

Timeout of guessing in miliseconds.

 

dlna_info

A place where to store DLNA information or NULL.

[allow-none][transfer full][out]

error

GError object or NULL.

[allow-none]

Returns

DLNA profile if any had matched, NULL otherwise.

[transfer none]


gupnp_dlna_profile_guesser_guess_profile_from_info ()

GUPnPDLNAProfile *
gupnp_dlna_profile_guesser_guess_profile_from_info
                               (GUPnPDLNAProfileGuesser *guesser,
                                GUPnPDLNAInformation *info);

Guesses the profile which fits to passed info .

Parameters

guesser

The GUPnPDLNAProfileGuesser object.

 

info

The GUPnPDLNAInformation object.

 

Returns

A GUPnPDLNAProfile object on success, NULL otherwise.

[transfer none]


gupnp_dlna_profile_guesser_get_profile ()

GUPnPDLNAProfile *
gupnp_dlna_profile_guesser_get_profile
                               (GUPnPDLNAProfileGuesser *guesser,
                                const gchar *name);

Lookups for GUPnPDLNAProfile with given name .

Parameters

guesser

The GUPnPDLNAProfileGuesser object.

 

name

The name of the DLNA profile to be retrieved.

 

Returns

A GUPnPDLNAProfile object on success, NULL otherwise.

[transfer none]


gupnp_dlna_profile_guesser_list_profiles ()

GList *
gupnp_dlna_profile_guesser_list_profiles
                               (GUPnPDLNAProfileGuesser *guesser);

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

Parameters

guesser

The GUPnPDLNAProfileGuesser whose profile list is required.

 

Returns

A GList of GUPnPDLNAProfile on success, NULL otherwise.

[transfer none][element-type GUPnPDLNAProfile]


gupnp_dlna_profile_guesser_get_relaxed_mode ()

gboolean
gupnp_dlna_profile_guesser_get_relaxed_mode
                               (GUPnPDLNAProfileGuesser *guesser);

Parameters

guesser

The GUPnPDLNAProfileGuesser object.

 

Returns

TRUE if guesser is in relaxed mode, FALSE otherwise.


gupnp_dlna_profile_guesser_get_extended_mode ()

gboolean
gupnp_dlna_profile_guesser_get_extended_mode
                               (GUPnPDLNAProfileGuesser *guesser);

Parameters

guesser

The GUPnPDLNAProfileGuesser object.

 

Returns

TRUE if guesser is in extended mode, FALSE otherwise.


gupnp_dlna_profile_guesser_cleanup ()

void
gupnp_dlna_profile_guesser_cleanup (void);

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.

Types and Values

GUPnPDLNAProfileGuesser

typedef struct _GUPnPDLNAProfileGuesser GUPnPDLNAProfileGuesser;

The top-level object used to for DLNA profile guessing.


GUPnPDLNAProfileGuesserClass

typedef struct {
        GObjectClass parent_class;
} GUPnPDLNAProfileGuesserClass;

Members

Property Details

The “extended-mode” property

  “extended-mode”            gboolean

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

Flags: Read / Write / Construct Only

Default value: FALSE


The “relaxed-mode” property

  “relaxed-mode”             gboolean

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

Flags: Read / Write / Construct Only

Default value: FALSE

Signal Details

The “done” signal

void
user_function (GUPnPDLNAProfileGuesser *profile_guesser,
               GUPnPDLNAInformation    *info,
               GUPnPDLNAProfile        *dlna,
               GError                  *error,
               gpointer                 user_data)

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

Parameters

profile_guesser

The GUPnPDLNAProfileGuesser.

 

info

URI metadata as GUPnPDLNAInformation.

[transfer none]

dlna

The results as GUPnPDLNAProfile.

[allow-none][transfer none]

error

Contains details of the error if discovery failed, else is NULL.

[allow-none]

user_data

user data set when the signal handler was connected.

 

Flags: Run Last