![]() |
![]() |
![]() |
Grilo Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <grilo.h> GrlOperationOptions; GrlOperationOptionsClass; void (*GrlOperationCancelCb) (gpointer data
); GrlOperationOptions * grl_operation_options_new (GrlCaps *caps
); GrlOperationOptions * grl_operation_options_copy (GrlOperationOptions *options
); gint grl_operation_options_get_count (GrlOperationOptions *options
); GrlResolutionFlags grl_operation_options_get_flags (GrlOperationOptions *options
); GValue * grl_operation_options_get_key_filter (GrlOperationOptions *options
,GrlKeyID key
); GList * grl_operation_options_get_key_filter_list (GrlOperationOptions *options
); void grl_operation_options_get_key_range_filter (GrlOperationOptions *options
,GrlKeyID key
,GValue **min_value
,GValue **max_value
); GList * grl_operation_options_get_key_range_filter_list (GrlOperationOptions *options
); guint grl_operation_options_get_skip (GrlOperationOptions *options
); GrlTypeFilter grl_operation_options_get_type_filter (GrlOperationOptions *options
); gboolean grl_operation_options_key_is_set (GrlOperationOptions *options
,const gchar *key
); gboolean grl_operation_options_obey_caps (GrlOperationOptions *options
,GrlCaps *caps
,GrlOperationOptions **supported_options
,GrlOperationOptions **unsupported_options
); gboolean grl_operation_options_set_count (GrlOperationOptions *options
,gint count
); gboolean grl_operation_options_set_flags (GrlOperationOptions *options
,GrlResolutionFlags flags
); gboolean grl_operation_options_set_key_filter_dictionary (GrlOperationOptions *options
,GHashTable *filters
); gboolean grl_operation_options_set_key_filter_value (GrlOperationOptions *options
,GrlKeyID key
,GValue *value
); gboolean grl_operation_options_set_key_filters (GrlOperationOptions *options
,...
); gboolean grl_operation_options_set_key_range_filter (GrlOperationOptions *options
,...
); gboolean grl_operation_options_set_key_range_filter_value (GrlOperationOptions *options
,GrlKeyID key
,GValue *min_value
,GValue *max_value
); gboolean grl_operation_options_set_skip (GrlOperationOptions *options
,guint skip
); gboolean grl_operation_options_set_type_filter (GrlOperationOptions *options
,GrlTypeFilter filter
);
GrlOperationOptions * grl_operation_options_new (GrlCaps *caps
);
Creates a new GrlOperationOptions object.
|
caps that options will have to match. If NULL , all
options will be accepted. [allow-none]
|
Returns : |
a new GrlOperationOptions instance. |
Since 0.2.0
GrlOperationOptions * grl_operation_options_copy (GrlOperationOptions *options
);
|
a GrlOperationOptions instance |
Returns : |
a new GrlOperationOptions instance with its values being copies of
the values of options . [transfer full]
|
Since 0.2.0
gint grl_operation_options_get_count (GrlOperationOptions *options
);
Get the count option, that is, the number of elements to retrieve in an
operation done with options
.
|
a GrlOperationOptions instance |
Returns : |
the value of the count option, or a default value if it is not set. |
Since 0.2.0
GrlResolutionFlags grl_operation_options_get_flags (GrlOperationOptions *options
);
|
a GrlOperationOptions instance |
Returns : |
resolution flags of options . |
Since 0.2.0
GValue * grl_operation_options_get_key_filter (GrlOperationOptions *options
,GrlKeyID key
);
|
a GrlOperationOptions instance |
Returns : |
the filter. [transfer none] |
Since 0.2.0
GList * grl_operation_options_get_key_filter_list
(GrlOperationOptions *options
);
|
a GrlOperationOptions instance |
Returns : |
. [transfer container][element-type GrlKeyID] |
Since 0.2.0
void grl_operation_options_get_key_range_filter (GrlOperationOptions *options
,GrlKeyID key
,GValue **min_value
,GValue **max_value
);
Stores the limits of the range in the filter for key
in min_value
and
max_value
. If some of the values has no limit, it will set a NULL
.
|
a GrlOperationOptions instance |
|
a GrlkeyId |
|
the minimum value for the range. [out][allow-none] |
|
the maximum value for the range. [out][allow-none] |
Since 0.2.0
GList * grl_operation_options_get_key_range_filter_list
(GrlOperationOptions *options
);
|
a GrlOperationOptions instance |
Returns : |
. [transfer container][element-type GrlKeyID] |
Since 0.2.0
guint grl_operation_options_get_skip (GrlOperationOptions *options
);
Get the skip option, that is, the number of elements to skip before
retrieving media items in an operation done with options
.
|
a GrlOperationOptions instance |
Returns : |
the value of the skip option, or a default value if it is not set. |
Since 0.2.0
GrlTypeFilter grl_operation_options_get_type_filter
(GrlOperationOptions *options
);
|
a GrlOperationOptions instance |
Returns : |
resolution flags of options
|
Since 0.2.0
gboolean grl_operation_options_key_is_set (GrlOperationOptions *options
,const gchar *key
);
This is an internal method that shouldn't be used outside of Grilo.
|
a GrlOperationOptions instance |
|
an operation option key |
Returns : |
whether key is set in options . |
Since 0.2.0
gboolean grl_operation_options_obey_caps (GrlOperationOptions *options
,GrlCaps *caps
,GrlOperationOptions **supported_options
,GrlOperationOptions **unsupported_options
);
Check whether options
obey to caps
.
Optionally provide the options that match (respectively don't match) caps
in supported_options
(respectively unsupported_options
).
This would typically (but not necessarily) be used with a
GrlOperationOptions instance that was created with NULL
caps.
|
a GrlOperationOptions instance |
|
capabilities against which we want to test options
|
|
if not NULL , will contain a
newly-allocated GrlOperationOptions instance containing all the values of
options that match caps . [out callee-allocates]
|
|
if not NULL , will contain a
newly-allocated GrlOperationOptions instance containing all the values of
options that do not match caps . [out callee-allocates]
|
Returns : |
TRUE if options obey to caps , FALSE otherwise. |
Since 0.2.0
gboolean grl_operation_options_set_count (GrlOperationOptions *options
,gint count
);
Set the count option for an operation. Will only succeed if count
obey to
the inherent capabilities of options
.
|
a GrlOperationOptions instance |
|
number of elements to retrieve in an operation |
Returns : |
TRUE if count could be set, FALSE otherwise. |
Since 0.2.0
gboolean grl_operation_options_set_flags (GrlOperationOptions *options
,GrlResolutionFlags flags
);
Set the resolution flags for an operation. Will only succeed if flags
obey
to the inherent capabilities of options
.
|
a GrlOperationOptions instance |
|
the resolution flags to be set for an operation. See GrlMetadataResolutionFlags for possible values. |
Returns : |
TRUE if flags could be set, FALSE otherwise. |
Since 0.2.0
gboolean grl_operation_options_set_key_filter_dictionary (GrlOperationOptions *options
,GHashTable *filters
);
Rename to: grl_operation_options_set_key_filters
|
a GrlOperationOptions instance |
|
. [transfer none][element-type GrlKeyID GValue] |
Since 0.2.0
gboolean grl_operation_options_set_key_filter_value (GrlOperationOptions *options
,GrlKeyID key
,GValue *value
);
Set filter as "key
== value
".
|
a GrlOperationOptions instance |
|
a GrlKeyID |
|
a GValue |
Returns : |
TRUE on success |
Since 0.2.0
gboolean grl_operation_options_set_key_filters (GrlOperationOptions *options
,...
);
Set filter as "k1 == v1 AND k2 == v2 AND ..."
Example 1.
grl_operation_options_set_key_filters (my_options, GRL_METADATA_KEY_ALBUM, "Frozen", GRL_METADATA_KEY_BITRATE, 256, NULL);
|
a GrlOperationOptions instance |
|
pairs of GrlKeyID, value |
Returns : |
TRUE on success |
Since 0.2.0
gboolean grl_operation_options_set_key_range_filter (GrlOperationOptions *options
,...
);
Set filter as "min1 <= k1 <= max1 AND min2 <= k2 <= max2 AND ..."
The range can be open if some of the minX, maxX values are NULL
.
Example 2.
grl_operation_options_set_key_range_filters (my_options, GRL_METADATA_KEY_ALBUM, "Ta", "Tz", GRL_METADATA_KEY_BITRATE, 256, NULL, NULL);
|
a GrlOperationOptions instance |
|
triplets of GrlKeyID, minvalue, maxvalue |
Returns : |
TRUE on success |
Since 0.2.0
gboolean grl_operation_options_set_key_range_filter_value (GrlOperationOptions *options
,GrlKeyID key
,GValue *min_value
,GValue *max_value
);
Set filter as "min_value
<= key
<= max_value
".
If min_value
is NULL
, then filter is "key
<= max_value
".
If max_value
is NULL
, then filter is "key
>= min_value
".
|
a GrlOperationOptions instance |
|
a GrlKeyId |
|
minimum value for range. [in][allow-none] |
|
maximum value for range. [in][allow-none] |
Returns : |
TRUE on success |
Since 0.2.0
gboolean grl_operation_options_set_skip (GrlOperationOptions *options
,guint skip
);
Set the skip option for an operation. Will only succeed if skip
obeys to the
inherent capabilities of options
.
|
a GrlOperationOptions instance |
|
number of elements to skip in an operation |
Returns : |
TRUE if skip could be set, FALSE otherwise. |
Since 0.2.0
gboolean grl_operation_options_set_type_filter (GrlOperationOptions *options
,GrlTypeFilter filter
);
Set the type of media filter for an operation. Only those media elements that
match the filter
will be returned. Will only succeed if filter
obey to the
inherent capabilities of options
.
|
a GrlOperationOptions instance |
|
the type of media to get |
Returns : |
TRUE if flags could be set, FALSE otherwise |
Since 0.2.0
grl_metadata_source_resolve()
,
grl_media_source_search()
, grl_media_source_browse()
,
grl_media_source_query()