e-cal-component-alarms: Evolution-Data-Server Reference Manual

## e-cal-component-alarms e-cal-component-alarms — An ECalComponentAlarms structure |

## Functions

ECalComponentAlarms * | e_cal_component_alarms_new ()
ECalComponentAlarms * | e_cal_component_alarms_copy ()
void | e_cal_component_alarms_free ()
struct _ECalComponent * | e_cal_component_alarms_get_component ()
void | e_cal_component_alarms_set_instances ()
void | e_cal_component_alarms_take_instances ()
void | e_cal_component_alarms_add_instance ()
void | e_cal_component_alarms_take_instance ()
gboolean | e_cal_component_alarms_remove_instance ()

## Types and Values

| ECalComponentAlarms

## Object Hierarchy

        GBoxed
        ╰── ECalComponentAlarms

## Includes

    #include <libecal/libecal.h>

## Description

Contains functions to work with the ECalComponentAlarms structure.

## Functions

### e_cal_component_alarms_new ()

    ECalComponentAlarms *
    e_cal_component_alarms_new (struct _ECalComponent *comp);

Creates a new ECalComponentAlarms structure, associated with `comp` . Free the alarms with `e_cal_component_alarms_free()`, when no longer needed.

The `comp` can be `NULL` since 3.48, in which case the respective instances hold the component they belong to.

#### Parameters

comp | the actual alarm component, as ECalComponent, or `NULL`. | [type ECalComponent][nullable]

#### Returns

a newly allocated ECalComponentAlarms.

[transfer full]

Since: 3.34

### e_cal_component_alarms_copy ()

    ECalComponentAlarms *
    e_cal_component_alarms_copy (const ECalComponentAlarms *alarms);

Returns a newly allocated copy of `alarms` , which should be freed with `e_cal_component_alarms_free()`, when no longer needed.

#### Parameters

alarms | an ECalComponentAlarms. | [not nullable]

#### Returns

a newly allocated copy of `alarms` .

[transfer full]

Since: 3.34

### e_cal_component_alarms_free ()

    void
    e_cal_component_alarms_free (gpointer alarms);

Free `alarms` , previously created by `e_cal_component_alarms_new()` or `e_cal_component_alarms_copy()`. The function does nothing, if `alarms` is `NULL`.

[skip]

#### Parameters

alarms | an ECalComponentAlarms to free. | [type ECalComponentAlarms][nullable]

Since: 3.34

### e_cal_component_alarms_get_component ()

    struct _ECalComponent *
    e_cal_component_alarms_get_component (const ECalComponentAlarms *alarms);

The returned component is valid until the `alarms` is freed.

#### Parameters

alarms | an ECalComponentAlarms |

#### Returns

an ECalComponent associated with the `alarms` structure, or `NULL`.

[type ECalComponent][transfer none][nullable]

Since: 3.34

### e_cal_component_alarms_set_instances ()

    void
    e_cal_component_alarms_set_instances (ECalComponentAlarms *alarms,
                                          const GSList *instances);

Modifies the list of instances to copy of the given `instances` .

#### Parameters

alarms | an ECalComponentAlarms |
instances | ECalComponentAlarmInstance objects to set. | [nullable][element-type ECalComponentAlarmInstance]

Since: 3.34

### e_cal_component_alarms_take_instances ()

    void
    e_cal_component_alarms_take_instances (ECalComponentAlarms *alarms,
                                           GSList *instances);

Replaces the list of instances with the given `instances` and assumes ownership of it. Neither the GSList, nor its items, should contain the same structures.

#### Parameters

alarms | an ECalComponentAlarms |
instances | ECalComponentAlarmInstance objects to take. | [nullable][transfer full][element-type ECalComponentAlarmInstance]

Since: 3.34

### e_cal_component_alarms_add_instance ()

    void
    e_cal_component_alarms_add_instance (ECalComponentAlarms *alarms,
                                         const ECalComponentAlarmInstance *instance);

Add a copy of `instance` into the list of instances. It is added in no particular order.

#### Parameters

alarms | an ECalComponentAlarms |
instance | an ECalComponentAlarmInstance. | [not nullable]

Since: 3.34

### e_cal_component_alarms_take_instance ()

    void
    e_cal_component_alarms_take_instance (ECalComponentAlarms *alarms,
                                          ECalComponentAlarmInstance *instance);

Add the `instance` into the list of instances and assume ownership of it. It is added in no particular order.

#### Parameters

alarms | an ECalComponentAlarms |
instance | an ECalComponentAlarmInstance. | [not nullable][transfer full]

Since: 3.34

### e_cal_component_alarms_remove_instance ()

    gboolean
    e_cal_component_alarms_remove_instance
                                   (ECalComponentAlarms *alarms,
                                    const ECalComponentAlarmInstance *instance);

Remove the `instance` from the list of instances. If found, the `instance` is also freed.

#### Parameters

alarms | an ECalComponentAlarms |
instance | an ECalComponentAlarmInstance. | [not nullable]

#### Returns

whether the `instance` had been found and freed

Since: 3.34

## Types and Values

### ECalComponentAlarms

    typedef struct _ECalComponentAlarms ECalComponentAlarms;

Opaque structure, which represents alarm trigger instances for a particular component. Use the functions below to work with it.