GUPnP DLNA Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
GUPnPDLNAProfileGuesserGUPnPDLNAProfileGuesser — Utility API for discovering DLNA profile for given media. |
Synopsis
GUPnPDLNAProfileGuesser; GUPnPDLNAProfileGuesserClass; void gupnp_dlna_profile_guesser_cleanup (void
); gboolean gupnp_dlna_profile_guesser_get_extended_mode (GUPnPDLNAProfileGuesser *guesser
); GUPnPDLNAProfile * gupnp_dlna_profile_guesser_get_profile (GUPnPDLNAProfileGuesser *guesser
,const gchar *name
); gboolean gupnp_dlna_profile_guesser_get_relaxed_mode (GUPnPDLNAProfileGuesser *guesser
); gboolean gupnp_dlna_profile_guesser_guess_profile_async (GUPnPDLNAProfileGuesser *guesser
,const gchar *uri
,guint timeout_in_ms
,GError **error
); GUPnPDLNAProfile * gupnp_dlna_profile_guesser_guess_profile_from_info (GUPnPDLNAProfileGuesser *guesser
,GUPnPDLNAInformation *info
); GUPnPDLNAProfile * gupnp_dlna_profile_guesser_guess_profile_sync (GUPnPDLNAProfileGuesser *guesser
,const gchar *uri
,guint timeout_in_ms
,GUPnPDLNAInformation **dlna_info
,GError **error
); GList * gupnp_dlna_profile_guesser_list_profiles (GUPnPDLNAProfileGuesser *guesser
); GUPnPDLNAProfileGuesser * gupnp_dlna_profile_guesser_new (gboolean relaxed_mode
,gboolean extended_mode
);
Properties
"extended-mode" gboolean : Read / Write / Construct Only "relaxed-mode" gboolean : Read / Write / Construct Only
Description
The API provides synchronous and asynchronous guessing of DLNA profile. The asynchronous mode requires a running GMainLoop in the default GMainContext.
Details
GUPnPDLNAProfileGuesser
typedef struct _GUPnPDLNAProfileGuesser GUPnPDLNAProfileGuesser;
The top-level object used to for DLNA profile guessing.
GUPnPDLNAProfileGuesserClass
typedef struct { GObjectClass parent_class; } GUPnPDLNAProfileGuesserClass;
GObjectClass |
A GObjectClass - parent of this class. |
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.
gupnp_dlna_profile_guesser_get_extended_mode ()
gboolean gupnp_dlna_profile_guesser_get_extended_mode
(GUPnPDLNAProfileGuesser *guesser
);
|
The GUPnPDLNAProfileGuesser object. |
Returns : |
TRUE if guesser is in extended mode, FALSE otherwise. |
gupnp_dlna_profile_guesser_get_profile ()
GUPnPDLNAProfile * gupnp_dlna_profile_guesser_get_profile (GUPnPDLNAProfileGuesser *guesser
,const gchar *name
);
Lookups for GUPnPDLNAProfile with given name
.
|
The GUPnPDLNAProfileGuesser object. |
|
The name of the DLNA profile to be retrieved. |
Returns : |
A GUPnPDLNAProfile object on success,
NULL otherwise. [transfer none]
|
gupnp_dlna_profile_guesser_get_relaxed_mode ()
gboolean gupnp_dlna_profile_guesser_get_relaxed_mode
(GUPnPDLNAProfileGuesser *guesser
);
|
The GUPnPDLNAProfileGuesser object. |
Returns : |
TRUE if guesser is in relaxed mode, FALSE otherwise. |
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
.
|
GUPnPDLNAProfileGuesser object to use for guessing. |
|
URI of media. |
|
Timeout of guessing in miliseconds. |
|
GError object or NULL . |
Returns : |
TRUE if uri was successfully queued, FALSE otherwise. |
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
.
|
The GUPnPDLNAProfileGuesser object. |
|
The GUPnPDLNAInformation object. |
Returns : |
A GUPnPDLNAProfile object on success,
NULL otherwise. [transfer none]
|
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
.
|
GUPnPDLNAProfileGuesser object to use for guessing. |
|
URI of media. |
|
Timeout of guessing in miliseconds. |
|
A place where to
store DLNA information or NULL . [allow-none][transfer full][out]
|
|
GError object or NULL . [allow-none]
|
Returns : |
DLNA profile if any had matched, 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
.
|
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_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
.
|
TRUE to enable relaxed mode support. FALSE otherwise. |
|
TRUE to enable extended mode support. FALSE otherwise. |
Returns : |
A new GUPnPDLNAProfileGuesser object. |
Property Details
The "extended-mode"
property
"extended-mode" gboolean : Read / Write / Construct Only
Whether profile matching should be done also against DLNA profiles not being a part of DLNA specification.
Default value: FALSE
The "relaxed-mode"
property
"relaxed-mode" gboolean : Read / Write / Construct Only
Whether profile matching should not be strictly compliant with the DLNA specification.
Default value: FALSE
Signal Details
The "done"
signal
void user_function (GUPnPDLNAProfileGuesser *profile_guesser,
GUPnPDLNAInformation *info,
GUPnPDLNAProfile *dlna,
GError *error,
gpointer user_data) : Run Last
Will be emitted when guessing DLNA profile for a URI has finished.
|
The GUPnPDLNAProfileGuesser. |
|
URI metadata as GUPnPDLNAInformation. [transfer none] |
|
The results as GUPnPDLNAProfile. [allow-none][transfer none] |
|
Contains details of the error if discovery failed,
else is NULL . [allow-none]
|
|
user data set when the signal handler was connected. |