Grl.OperationOptions¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Grl.OperationOptions(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(caps)¶
- Parameters:
caps (
Grl.Caps
orNone
) – caps that options will have to match. IfNone
, all options will be accepted.- Returns:
a new
Grl.OperationOptions
instance.- Return type:
Creates a new
Grl.OperationOptions
object.New in version 0.2.0.
- copy()¶
- Returns:
a new
Grl.OperationOptions
instance with its values being copies of the values of self.- Return type:
New in version 0.2.0.
- get_count()¶
- Returns:
the value of the count option, or a default value if it is not set.
- Return type:
Get the count option, that is, the number of elements to retrieve in an operation done with self.
New in version 0.2.0.
- get_key_range_filter(key)¶
- Parameters:
key (
int
) – a #GrlKeyID- Returns:
- min_value:
the minimum value for the range
- max_value:
the maximum value for the range
- Return type:
(min_value:
GObject.Value
, max_value:GObject.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
None
.New in version 0.2.0.
- get_resolution_flags()¶
- Returns:
resolution flags of self.
- Return type:
New in version 0.2.12.
- get_skip()¶
- Returns:
the value of the skip option, or a default value if it is not set.
- Return type:
Get the skip option, that is, the number of elements to skip before retrieving media items in an operation done with self.
New in version 0.2.0.
- get_type_filter()¶
- Returns:
resolution flags of self
- Return type:
New in version 0.2.0.
- obey_caps(caps)¶
- Parameters:
caps (
Grl.Caps
) – capabilities against which we want to test self- Returns:
True
if self obey to caps,False
otherwise.- supported_options:
if not
None
, will contain a newly-allocatedGrl.OperationOptions
instance containing all the values of self that match caps.- unsupported_options:
if not
None
, will contain a newly-allocatedGrl.OperationOptions
instance containing all the values of self that do not match caps.
- Return type:
(
bool
, supported_options:Grl.OperationOptions
, unsupported_options:Grl.OperationOptions
)
Check whether self 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
Grl.OperationOptions
instance that was created withNone
caps.New in version 0.2.0.
- set_count(count)¶
- Parameters:
count (
int
) – number of elements to retrieve in an operation- Returns:
- Return type:
Set the count option for an operation. Will only succeed if count obey to the inherent capabilities of self.
New in version 0.2.0.
- set_key_filter_value(key, value)¶
- Parameters:
key (
int
) – a #GrlKeyIDvalue (
GObject.Value
) – aGObject.Value
- Returns:
True
on success- Return type:
Set filter as “key == value".
New in version 0.2.0.
- set_key_filters(filters)¶
- Parameters:
filters ({
int
:GObject.Value
}) –- Returns:
True
on success- Return type:
New in version 0.2.0.
- set_key_range_filter_value(key, min_value, max_value)¶
- Parameters:
key (
int
) – a #GrlKeyIDmin_value (
GObject.Value
orNone
) – minimum value for rangemax_value (
GObject.Value
orNone
) – maximum value for range
- Returns:
True
on success- Return type:
Set filter as “min_value <= key <= max_value".
If min_value is
None
, then filter is “key <= max_value".If max_value is
None
, then filter is “key >= min_value".Note that key will always respect the limits defined at creation time. e.g: Core’s
Grl.METADATA_KEY_ORIENTATION
has “max = 359” and “min = 0”, user can set “max_value = 180” but “max_value = 720” would be ignored.New in version 0.2.0.
- set_resolution_flags(flags)¶
- Parameters:
flags (
Grl.ResolutionFlags
) – the resolution flags to be set for an operation. SeeGrl.ResolutionFlags
for possible values.- Returns:
- Return type:
Set the resolution flags for an operation. Will only succeed if flags obey to the inherent capabilities of self.
New in version 0.2.12.
- set_skip(skip)¶
- Parameters:
skip (
int
) – number of elements to skip in an operation- Returns:
- Return type:
Set the skip option for an operation. Will only succeed if skip obeys to the inherent capabilities of self.
New in version 0.2.0.
- set_type_filter(filter)¶
- Parameters:
filter (
Grl.TypeFilter
) – the type of media to get- Returns:
- Return type:
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 self.
New in version 0.2.0.