Grl.OperationOptions

g GObject.Object GObject.Object Grl.OperationOptions Grl.OperationOptions GObject.Object->Grl.OperationOptions

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (caps)

copy ()

get_count ()

get_key_filter (key)

get_key_filter_list ()

get_key_range_filter (key)

get_key_range_filter_list ()

get_resolution_flags ()

get_skip ()

get_type_filter ()

obey_caps (caps)

set_count (count)

set_key_filter_value (key, value)

set_key_filters (filters)

set_key_range_filter_value (key, min_value, max_value)

set_resolution_flags (flags)

set_skip (skip)

set_type_filter (filter)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Grl.OperationOptions(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Grl.OperationOptionsClass

classmethod new(caps)
Parameters:

caps (Grl.Caps or None) – caps that options will have to match. If None, all options will be accepted.

Returns:

a new Grl.OperationOptions instance.

Return type:

Grl.OperationOptions

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:

Grl.OperationOptions

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:

int

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_filter(key)
Parameters:

key (int) –

Returns:

the filter

Return type:

GObject.Value

New in version 0.2.0.

get_key_filter_list()
Return type:

[int]

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_key_range_filter_list()
Return type:

[int]

New in version 0.2.0.

get_resolution_flags()
Returns:

resolution flags of self.

Return type:

Grl.ResolutionFlags

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:

int

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:

Grl.TypeFilter

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-allocated Grl.OperationOptions instance containing all the values of self that match caps.

unsupported_options:

if not None, will contain a newly-allocated Grl.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 with None caps.

New in version 0.2.0.

set_count(count)
Parameters:

count (int) – number of elements to retrieve in an operation

Returns:

True if count could be set, False otherwise.

Return type:

bool

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:
Returns:

True on success

Return type:

bool

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:

bool

New in version 0.2.0.

set_key_range_filter_value(key, min_value, max_value)
Parameters:
Returns:

True on success

Return type:

bool

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. See Grl.ResolutionFlags for possible values.

Returns:

True if flags could be set, False otherwise.

Return type:

bool

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:

True if skip could be set, False otherwise.

Return type:

bool

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:

True if flags could be set, False otherwise

Return type:

bool

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.