ECal.ComponentParameterBag¶
Fields¶
None
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class ECal.ComponentParameterBag¶
Opaque structure, which represents a bad (list) of
ICalGLib.Parameter
objects. Use the functions below to work with it.- classmethod new()¶
- Returns:
a newly allocated
ECal.ComponentParameterBag
- Return type:
Creates a new
ECal.ComponentParameterBag
. Free the structure with e_cal_component_parameter_bag_free(), when no longer needed.New in version 3.34.
- classmethod new_from_property(property, func, *user_data)¶
- Parameters:
property (
ICalGLib.Property
) – anICalGLib.Property
containing the parameters to fill the bag withfunc (
ECal.ComponentParameterBagFilterFunc
orNone
) – an optionalECal.ComponentParameterBagFilterFunc
callback
- Returns:
a newly allocated
ECal.ComponentParameterBag
- Return type:
Creates a new
ECal.ComponentParameterBag
, filled with parameters from the property, for which the func returnedTrue
. When the func isNone
, all the parameters are included.Free the structure with e_cal_component_parameter_bag_free(), when no longer needed.
New in version 3.34.
- add(param)¶
- Parameters:
param (
ICalGLib.Parameter
) – anICalGLib.Parameter
Adds a copy of the param into the self.
New in version 3.34.
- assign(src_bag)¶
- Parameters:
src_bag (
ECal.ComponentParameterBag
) – a sourceECal.ComponentParameterBag
Assigns content of the src_bag into the self.
New in version 3.34.
- clear()¶
Removes all parameters from the self, thus it doesn’t contain any parameter after this function returns.
New in version 3.34.
- copy()¶
- Returns:
a newly allocated copy of self
- Return type:
Returns a newly allocated copy of self, which should be freed with e_cal_component_parameter_bag_free(), when no longer needed.
New in version 3.34.
- fill_property(property)¶
- Parameters:
property (
ICalGLib.Property
) – anICalGLib.Property
Adds all the stored parameters in the self to the property. The function replaces any existing parameter with the new value, if any such exists. Otherwise the parameter is added.
New in version 3.34.
- get(index)¶
- Parameters:
index (
int
) – an index of the parameter to get- Returns:
the
ICalGLib.Parameter
at the given index, orNone
on error- Return type:
Returns the
ICalGLib.Parameter
at the given index. If the index is out of bounds (not lower thanECal.ComponentParameterBag.get_count
()), thenNone
is returned.The returned parameter is owned by the self and should not be freed by the caller.
New in version 3.34.
- get_count()¶
- Returns:
how many parameters are stored in the self
- Return type:
New in version 3.34.
- get_first_by_kind(kind)¶
- Parameters:
kind (
ICalGLib.ParameterKind
) – anICalGLib.ParameterKind
to search for- Returns:
the index of the first parameter of the given kind, or value out of bounds, if such parameter cannot be found
- Return type:
New in version 3.34.
- remove(index)¶
- Parameters:
index (
int
) – an index of the parameter to remove
Removes the
ICalGLib.Parameter
at the given index. If the index is out of bounds (not lower thanECal.ComponentParameterBag.get_count
()), then the function does nothing.New in version 3.34.
- remove_by_kind(kind, all)¶
- Parameters:
kind (
ICalGLib.ParameterKind
) – anICalGLib.ParameterKind
to removeall (
bool
) –True
to remove all parameters of the kind, orFalse
to only the first
- Returns:
how many parameters had been removed
- Return type:
Removes the first or all (depending on the all) parameters of the given kind.
New in version 3.34.
- set_from_property(property, func, *user_data)¶
- Parameters:
property (
ICalGLib.Property
) – anICalGLib.Property
containing the parameters to fill the self withfunc (
ECal.ComponentParameterBagFilterFunc
orNone
) – an optionalECal.ComponentParameterBagFilterFunc
callback
Fills the self with parameters from the property, for which the func returned
True
. When the func isNone
, all the parameters are included. The self content is cleared before any parameter is added.New in version 3.34.
- take(param)¶
- Parameters:
param (
ICalGLib.Parameter
) – anICalGLib.Parameter
Adds the param into the self and assumes ownership of the param.
New in version 3.34.