Initializes the Grilo library
list of arguments
Returns a #GOptionGroup with Grilo's argument specifications.
This function is useful if you want to integrate Grilo with other libraries that use the GOption commandline parser (see g_option_context_add_group() ).
Configure a set of log domains. The default configuration is to display warning and error messages only for all the log domains.
The configuration string follows the following grammar:
|[ config-list: config | config ',' config-list config: domain ':' level domain: '' | [a-zA-Z0-9]+ level: '' | '-' | named-level | num-level named-level: "none" | "error" | "warning" | "message" | "info" | "debug" num-level: [0-5]
examples:
<itemizedlist>
<listitem><para>"*:*": maximum verbosity for all the log domains</para>
</listitem>
<listitem><para>"*:-": don't print any message</para></listitem>
<listitem><para>"media-source:debug,metadata-source:debug": prints debug,
info, message warning and error messages for the media-source and
metadata-source log domains</para></listitem>
</itemizedlist>
<note>It's possible to override the log configuration at runtime by
defining the GRL_DEBUG environment variable to a configuration string
as described above</note>
@param config A string describing the wanted log configuration
Retrieves the description associated with the key
key to look up
Retrieves the name associated with the key
key to look up
Retrieves the expected type for values associated with this key
key to look up
Goes though all available media sources until it finds one capable of
constructing a GrlMedia object representing the media resource exposed
by uri
.
This method is asynchronous.
A URI that can be used to identify a media resource
List of metadata keys we want to obtain.
options wanted for that operation
the user defined callback
Search for text
in all the sources specified in sources
.
If text
is NULL
then NULL-text searchs will be used for each searchable
plugin (see #grl_source_search for more details).
This method is asynchronous.
a #GList of #GrlSources to search from (%NULL for all searchable sources)
the text to search for
the #GList of #GrlKeyID to retrieve
options wanted for that operation
the user defined callback
Search for text
in all the sources specified in sources
.
This method is synchronous.
a #GList of #GrlSources where to search from (%NULL for all available sources with search capability)
the text to search for
the #GList of #GrlKeyID to retrieve
options wanted for that operation
Cancel an operation.
the identifier of a running operation
Obtains the previously attached data
the identifier of a running operation
Attach a pointer to the specific operation.
the identifier of a running operation
the data to attach
Attach a pointer to the specific operation.
Note that the destroy_func
callback is not called if user_data
is %NULL.
the identifier of a running operation
the data to attach
function to release user_data
when the operation terminates
Grilo browsing implements a paging mechanism through skip
and count
values.
But there are some services (like Jamendo or Flickr) where paging is done through a page number and page size: user request all elements in a page, specifying in most cases what is the page size.
This function is a helper for this task, computing from skip
and count
what
is the optimal value of page size (limited by max_page_size)
, which page
should the user request, and where requested data start inside the page.
By optimal we mean that it computes those values so only one page is required to satisfy the data, using the smallest page size. If user is limiting page size, then more requests to services might be needed. But still page size will be an optimal value.
If page_size
is NULL,
then page size will be max_page_size
. If the later
is also 0, then page size will be #G_MAXUINT.
number of elements to skip
number of elements to retrieve
maximum value for page size (0 for unlimited size)
optimal page size
page which contain the first element to retrieve (starting at 1)
in the page_number,
offset where first element can be found (starting at 0)
Deinitializes the Grilo library.
Call this function after finalizing using Grilo, in order to free and clean up all the resources created.