Top |
GrlOperationOptions *
grl_operation_options_new (GrlCaps *caps
);
Creates a new GrlOperationOptions object.
caps |
caps that options will have to match. If |
[allow-none] |
Since: 0.2.0
GrlOperationOptions *
grl_operation_options_copy (GrlOperationOptions *options
);
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
.
Since: 0.2.0
GrlResolutionFlags
grl_operation_options_get_resolution_flags
(GrlOperationOptions *options
);
Since: 0.2.12
GValue * grl_operation_options_get_key_filter (GrlOperationOptions *options
,GrlKeyID key
);
Since: 0.2.0
GList *
grl_operation_options_get_key_filter_list
(GrlOperationOptions *options
);
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
.
options |
a GrlOperationOptions instance |
|
key |
a GrlKeyID |
|
min_value |
the minimum value for the range. |
[out][allow-none][transfer none] |
max_value |
the maximum value for the range. |
[out][allow-none][transfer none] |
Since: 0.2.0
GList *
grl_operation_options_get_key_range_filter_list
(GrlOperationOptions *options
);
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
.
Since: 0.2.0
GrlTypeFilter
grl_operation_options_get_type_filter (GrlOperationOptions *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.
options |
a GrlOperationOptions instance |
|
caps |
capabilities against which we want to test |
|
supported_options |
if not |
[out callee-allocates] |
unsupported_options |
if not |
[out callee-allocates] |
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
.
options |
a GrlOperationOptions instance |
|
count |
number of elements to retrieve in an operation |
Since: 0.2.0
gboolean grl_operation_options_set_resolution_flags (GrlOperationOptions *options
,GrlResolutionFlags flags
);
Set the resolution flags for an operation. Will only succeed if flags
obey
to the inherent capabilities of options
.
options |
a GrlOperationOptions instance |
|
flags |
the resolution flags to be set for an operation. See GrlResolutionFlags for possible values. |
Since: 0.2.12
gboolean grl_operation_options_set_key_filter_dictionary (GrlOperationOptions *options
,GHashTable *filters
);
[rename-to grl_operation_options_set_key_filters]
options |
a GrlOperationOptions instance |
|
filters |
. |
[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
".
Since: 0.2.0
gboolean grl_operation_options_set_key_filters (GrlOperationOptions *options
,...
);
Set filter as "k1 == v1 AND k2 == v2 AND ..."
Example 2.
grl_operation_options_set_key_filters (my_options, GRL_METADATA_KEY_ALBUM, "Frozen", GRL_METADATA_KEY_BITRATE, 256, NULL);
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 3.
grl_operation_options_set_key_range_filters (my_options, GRL_METADATA_KEY_ALBUM, "Ta", "Tz", GRL_METADATA_KEY_BITRATE, 256, NULL, NULL);
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
".
options |
a GrlOperationOptions instance |
|
key |
a GrlKeyID |
|
min_value |
minimum value for range. |
[in][allow-none] |
max_value |
maximum value for range. |
[in][allow-none] |
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
.
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
.
Since: 0.2.0