Top | ![]() |
![]() |
![]() |
![]() |
e-cal-component-parameter-bage-cal-component-parameter-bag — An ECalComponentParameterBag structure |
ECalComponentParameterBag *
e_cal_component_parameter_bag_new (void
);
Creates a new ECalComponentParameterBag. Free the structure
with e_cal_component_parameter_bag_free()
, when no longer needed.
Since: 3.34
ECalComponentParameterBag * e_cal_component_parameter_bag_new_from_property (const ICalProperty *property
,ECalComponentParameterBagFilterFunc func
,gpointer user_data
);
Creates a new ECalComponentParameterBag, filled with parameters
from the property
, for which the func
returned TRUE
. When
the func
is NULL
, all the parameters are included.
Free the structure with e_cal_component_parameter_bag_free()
, when no longer needed.
property |
an ICalProperty containing the parameters to fill the bag with |
|
func |
an optional |
[nullable][scope call] |
user_data |
user data for the |
[closure func] |
Since: 3.34
ECalComponentParameterBag *
e_cal_component_parameter_bag_copy (const ECalComponentParameterBag *bag
);
Returns a newly allocated copy of bag
, which should be freed with
e_cal_component_parameter_bag_free()
, when no longer needed.
Since: 3.34
void
e_cal_component_parameter_bag_free (gpointer bag
);
Free bag
, previously created by e_cal_component_parameter_bag_new()
,
e_cal_component_parameter_bag_new_from_component()
or
e_cal_component_parameter_bag_copy()
. The function does nothing, if bag
is NULL
.
[skip]
Since: 3.34
void e_cal_component_parameter_bag_set_from_property (ECalComponentParameterBag *bag
,const ICalProperty *property
,ECalComponentParameterBagFilterFunc func
,gpointer user_data
);
Fills the bag
with parameters from the property
, for which the func
returned TRUE
. When the func
is NULL
, all the parameters are included.
The bag
content is cleared before any parameter is added.
bag |
||
property |
an ICalProperty containing the parameters to fill the |
|
func |
an optional |
[nullable][scope call] |
user_data |
user data for the |
[closure func] |
Since: 3.34
void e_cal_component_parameter_bag_fill_property (const ECalComponentParameterBag *bag
,ICalProperty *property
);
Adds all the stored parameters in the bag
to the property
.
The function replaces any existing parameter with the new value,
if any such exists. Otherwise the parameter is added.
Since: 3.34
void e_cal_component_parameter_bag_assign (ECalComponentParameterBag *bag
,const ECalComponentParameterBag *src_bag
);
Assigns content of the src_bag
into the bag
.
Since: 3.34
void e_cal_component_parameter_bag_add (ECalComponentParameterBag *bag
,const ICalParameter *param
);
Adds a copy of the param
into the bag
.
Since: 3.34
void e_cal_component_parameter_bag_take (ECalComponentParameterBag *bag
,ICalParameter *param
);
Adds the param
into the bag
and assumes ownership of the param
.
Since: 3.34
guint
e_cal_component_parameter_bag_get_count
(const ECalComponentParameterBag *bag
);
Since: 3.34
ICalParameter * e_cal_component_parameter_bag_get (const ECalComponentParameterBag *bag
,guint index
);
Returns the ICalParameter at the given index
. If the index
is
out of bounds (not lower than e_cal_component_parameter_bag_get_count()
),
then NULL
is returned.
The returned parameter is owned by the bag
and should not be freed
by the caller.
Since: 3.34
guint e_cal_component_parameter_bag_get_first_by_kind (const ECalComponentParameterBag *bag
,ICalParameterKind kind
);
the index of the first parameter of the given kind
, or value
out of bounds, if such parameter cannot be found
Since: 3.34
void e_cal_component_parameter_bag_remove (ECalComponentParameterBag *bag
,guint index
);
Removes the ICalParameter at the given index
. If the index
is
out of bounds (not lower than e_cal_component_parameter_bag_get_count()
),
then the function does nothing.
Since: 3.34
guint e_cal_component_parameter_bag_remove_by_kind (ECalComponentParameterBag *bag
,ICalParameterKind kind
,gboolean all
);
Removes the first or all (depending on the all
) parameters of the given kind
.
bag |
||
kind |
an ICalParameterKind to remove |
|
all |
|
Since: 3.34
void
e_cal_component_parameter_bag_clear (ECalComponentParameterBag *bag
);
Removes all parameters from the bag
, thus it doesn't contain any
parameter after this function returns.
Since: 3.34