e-cal-component-parameter-bag

e-cal-component-parameter-bag — An ECalComponentParameterBag structure

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── ECalComponentParameterBag

Includes

#include <libecal/libecal.h>

Description

Contains functions to work with the ECalComponentParameterBag structure.

Functions

e_cal_component_parameter_bag_new ()

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.

Returns

a newly allocated ECalComponentParameterBag.

[transfer full]

Since: 3.34


e_cal_component_parameter_bag_new_from_property ()

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.

Parameters

property

an ICalProperty containing the parameters to fill the bag with

 

func

an optional ECalComponentParameterBagFilterFunc callback.

[nullable][scope call]

user_data

user data for the func .

[closure func]

Returns

a newly allocated ECalComponentParameterBag.

[transfer full]

Since: 3.34


e_cal_component_parameter_bag_copy ()

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.

Parameters

bag

an ECalComponentParameterBag.

[not nullable]

Returns

a newly allocated copy of bag .

[transfer full]

Since: 3.34


e_cal_component_parameter_bag_free ()

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]

Parameters

bag

an ECalComponentParameterBag to free.

[type ECalComponentParameterBag][nullable]

Since: 3.34


e_cal_component_parameter_bag_set_from_property ()

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.

Parameters

bag

an ECalComponentParameterBag

 

property

an ICalProperty containing the parameters to fill the bag with

 

func

an optional ECalComponentParameterBagFilterFunc callback.

[nullable][scope call]

user_data

user data for the func .

[closure func]

Since: 3.34


e_cal_component_parameter_bag_fill_property ()

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.

Parameters

bag

an ECalComponentParameterBag

 

property

an ICalProperty

 

Since: 3.34


e_cal_component_parameter_bag_assign ()

void
e_cal_component_parameter_bag_assign (ECalComponentParameterBag *bag,
                                      const ECalComponentParameterBag *src_bag);

Assigns content of the src_bag into the bag .

Parameters

bag

a destination ECalComponentParameterBag

 

src_bag

a source ECalComponentParameterBag

 

Since: 3.34


e_cal_component_parameter_bag_add ()

void
e_cal_component_parameter_bag_add (ECalComponentParameterBag *bag,
                                   const ICalParameter *param);

Adds a copy of the param into the bag .

Parameters

Since: 3.34


e_cal_component_parameter_bag_take ()

void
e_cal_component_parameter_bag_take (ECalComponentParameterBag *bag,
                                    ICalParameter *param);

Adds the param into the bag and assumes ownership of the param .

Parameters

bag

an ECalComponentParameterBag

 

param

an ICalParameter.

[transfer full]

Since: 3.34


e_cal_component_parameter_bag_get_count ()

guint
e_cal_component_parameter_bag_get_count
                               (const ECalComponentParameterBag *bag);

Parameters

Returns

how many parameters are stored in the bag

Since: 3.34


e_cal_component_parameter_bag_get ()

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.

Parameters

bag

an ECalComponentParameterBag

 

index

an index of the parameter to get

 

Returns

the ICalParameter at the given index , or NULL on error.

[transfer none][nullable]

Since: 3.34


e_cal_component_parameter_bag_get_first_by_kind ()

guint
e_cal_component_parameter_bag_get_first_by_kind
                               (const ECalComponentParameterBag *bag,
                                ICalParameterKind kind);

Parameters

bag

an ECalComponentParameterBag

 

kind

an ICalParameterKind 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

Since: 3.34


e_cal_component_parameter_bag_remove ()

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.

Parameters

bag

an ECalComponentParameterBag

 

index

an index of the parameter to remove

 

Since: 3.34


e_cal_component_parameter_bag_remove_by_kind ()

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 .

Parameters

bag

an ECalComponentParameterBag

 

kind

an ICalParameterKind to remove

 

all

TRUE to remove all parameters of the kind , or FALSE to only the first

 

Returns

how many parameters had been removed

Since: 3.34


e_cal_component_parameter_bag_clear ()

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.

Parameters

Since: 3.34

Types and Values

ECalComponentParameterBag

typedef struct _ECalComponentParameterBag ECalComponentParameterBag;

Opaque structure, which represents a bad (list) of ICalParameter objects. Use the functions below to work with it.