## e-cal-component-alarm e-cal-component-alarm — An ECalComponentAlarm structure |

## Functions

ECalComponentAlarm * | e_cal_component_alarm_new ()
ECalComponentAlarm * | e_cal_component_alarm_new_from_component ()
ECalComponentAlarm * | e_cal_component_alarm_copy ()
void | e_cal_component_alarm_free ()
void | e_cal_component_alarm_set_from_component ()
ICalComponent * | e_cal_component_alarm_get_as_component ()
void | e_cal_component_alarm_fill_component ()
const gchar * | e_cal_component_alarm_get_uid ()
void | e_cal_component_alarm_set_uid ()
ECalComponentAlarmAction | e_cal_component_alarm_get_action ()
void | e_cal_component_alarm_set_action ()
ECalComponentText * | e_cal_component_alarm_get_summary ()
void | e_cal_component_alarm_set_summary ()
void | e_cal_component_alarm_take_summary ()
ECalComponentText * | e_cal_component_alarm_get_description ()
void | e_cal_component_alarm_set_description ()
void | e_cal_component_alarm_take_description ()
ECalComponentAlarmRepeat * | e_cal_component_alarm_get_repeat ()
void | e_cal_component_alarm_set_repeat ()
void | e_cal_component_alarm_take_repeat ()
ECalComponentAlarmTrigger * | e_cal_component_alarm_get_trigger ()
void | e_cal_component_alarm_set_trigger ()
void | e_cal_component_alarm_take_trigger ()
gboolean | e_cal_component_alarm_has_attendees ()
void | e_cal_component_alarm_set_attendees ()
void | e_cal_component_alarm_take_attendees ()
gboolean | e_cal_component_alarm_has_attachments ()
void | e_cal_component_alarm_set_attachments ()
void | e_cal_component_alarm_take_attachments ()
ECalComponentPropertyBag * | e_cal_component_alarm_get_property_bag ()
ICalTime * | e_cal_component_alarm_get_acknowledged ()
void | e_cal_component_alarm_set_acknowledged ()
void | e_cal_component_alarm_take_acknowledged ()

## Types and Values

#define | E_CAL_EVOLUTION_ALARM_UID_PROPERTY
| ECalComponentAlarm

## Object Hierarchy

        GBoxed
        ╰── ECalComponentAlarm

## Includes

    #include <libecal/libecal.h>

## Description

Contains functions to work with the ECalComponentAlarm structure.

## Functions

### e_cal_component_alarm_new ()

    ECalComponentAlarm *
    e_cal_component_alarm_new (void);

Creates a new empty ECalComponentAlarm structure. Free it with `e_cal_component_alarm_free()`, when no longer needed.

#### Returns

a newly allocated ECalComponentAlarm.

[transfer full]

Since: 3.34

### e_cal_component_alarm_new_from_component ()

    ECalComponentAlarm *
    e_cal_component_alarm_new_from_component
                                   (const ICalComponent *component);

Creates a new ECalComponentAlarm, filled with values from `component` , which should be of kind `I_CAL_VALARM_COMPONENT`. The function returns `NULL` when it is not of the expected kind. Free the structure with `e_cal_component_alarm_free()`, when no longer needed.

#### Parameters

component | an ICalComponent of kind `I_CAL_VALARM_COMPONENT` |

#### Returns

a newly allocated ECalComponentAlarm.

[transfer full][nullable]

Since: 3.34

### e_cal_component_alarm_copy ()

    ECalComponentAlarm *
    e_cal_component_alarm_copy (const ECalComponentAlarm *alarm);

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

#### Parameters

alarm | an ECalComponentAlarm. | [not nullable]

#### Returns

a newly allocated copy of `alarm` .

[transfer full]

Since: 3.34

### e_cal_component_alarm_free ()

    void
    e_cal_component_alarm_free (gpointer alarm);

Free `alarm` , previously created by `e_cal_component_alarm_new()`, `e_cal_component_alarm_new_from_component()` or `e_cal_component_alarm_copy()`. The function does nothing, if `alarm` is `NULL`.

[skip]

#### Parameters

alarm | an ECalComponentAlarm to free. | [type ECalComponentAlarm][nullable]

Since: 3.34

### e_cal_component_alarm_set_from_component ()

    void
    e_cal_component_alarm_set_from_component
                                   (ECalComponentAlarm *alarm,
                                    const ICalComponent *component);

Fill the `alarm` structure with the information from the `component` , which should be of `I_CAL_VALARM_COMPONENT` kind.

#### Parameters

alarm | an ECalComponentAlarm |
component | an ICalComponent |

Since: 3.34

### e_cal_component_alarm_get_as_component ()

    ICalComponent *
    e_cal_component_alarm_get_as_component
                                   (ECalComponentAlarm *alarm);

Creates a VALARM ICalComponent filled with data from the `alarm` . In case the `alarm` doesn't have set 'uid', a new is assigned. Free the returned component with `g_object_unref()`, when no longer needed.

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

a newly created ICalComponent of `I_CAL_VALARM_COMPONENT` kind.

[transfer full]

Since: 3.34

### e_cal_component_alarm_fill_component ()

    void
    e_cal_component_alarm_fill_component (ECalComponentAlarm *alarm,
                                          ICalComponent *component);

Fills `component` with data from `alarm` . The `component` should be of `I_CAL_VALARM_COMPONENT` kind - the function does nothing, if it's not. In case the `alarm` doesn't have set 'uid', a new is assigned.

#### Parameters

alarm | an ECalComponentAlarm |
component | an ICalComponent of `I_CAL_VALARM_COMPONENT` kind |

Since: 3.34

### e_cal_component_alarm_get_uid ()

    const gchar *
    e_cal_component_alarm_get_uid (const ECalComponentAlarm *alarm);

Get the `alarm` UID.

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

the `alarm` UID, or `NULL`, when none is set.

[nullable]

Since: 3.34

### e_cal_component_alarm_set_uid ()

    void
    e_cal_component_alarm_set_uid (ECalComponentAlarm *alarm,
                                   const gchar *uid);

Set the `alarm` UID, or generates a new UID, if `uid` is `NULL` or an empty string.

#### Parameters

alarm | an ECalComponentAlarm |
uid | a UID to set, or `NULL` or empty string to generate new. | [nullable]

Since: 3.34

### e_cal_component_alarm_get_action ()

    ECalComponentAlarmAction
    e_cal_component_alarm_get_action (const ECalComponentAlarm *alarm);

Get the `alarm` action, as an ECalComponentAlarmAction.

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

the `alarm` action, or `E_CAL_COMPONENT_ALARM_NONE`, when none is set

Since: 3.34

### e_cal_component_alarm_set_action ()

    void
    e_cal_component_alarm_set_action (ECalComponentAlarm *alarm,
                                      ECalComponentAlarmAction action);

Set the `alarm` action, as an ECalComponentAlarmAction.

#### Parameters

alarm | an ECalComponentAlarm |
action | an ECalComponentAlarmAction |

Since: 3.34

### e_cal_component_alarm_get_summary ()

    ECalComponentText *
    e_cal_component_alarm_get_summary (const ECalComponentAlarm *alarm);

Get the `alarm` summary, as an ECalComponentText.

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

the `alarm` summary, or `NULL`, when none is set.

[transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_set_summary ()

    void
    e_cal_component_alarm_set_summary (ECalComponentAlarm *alarm,
                                       const ECalComponentText *summary);

Set the `alarm` summary, as an ECalComponentText.

#### Parameters

alarm | an ECalComponentAlarm |
summary | a summary to set, or `NULL` to unset. | [transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_take_summary ()

    void
    e_cal_component_alarm_take_summary (ECalComponentAlarm *alarm,
                                        ECalComponentText *summary);

Set the `alarm` summary, as an ECalComponentText, and assumes ownership of the `summary` .

[skip]

#### Parameters

alarm | an ECalComponentAlarm |
summary | a summary to set, or `NULL` to unset. | [transfer full][nullable]

Since: 3.34

### e_cal_component_alarm_get_description ()

    ECalComponentText *
    e_cal_component_alarm_get_description (const ECalComponentAlarm *alarm);

Get the `alarm` description, as an ECalComponentText.

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

the `alarm` description, or `NULL`, when none is set.

[transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_set_description ()

    void
    e_cal_component_alarm_set_description (ECalComponentAlarm *alarm,
                                           const ECalComponentText *description);

Set the `alarm` description, as an ECalComponentText.

#### Parameters

alarm | an ECalComponentAlarm |
description | a description to set, or `NULL` to unset. | [transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_take_description ()

    void
    e_cal_component_alarm_take_description
                                   (ECalComponentAlarm *alarm,
                                    ECalComponentText *description);

Set the `alarm` description, as an ECalComponentText, and assumes ownership of the `description` .

[skip]

#### Parameters

alarm | an ECalComponentAlarm |
description | a description to set, or `NULL` to unset. | [transfer full][nullable]

Since: 3.34

### e_cal_component_alarm_get_repeat ()

    ECalComponentAlarmRepeat *
    e_cal_component_alarm_get_repeat (const ECalComponentAlarm *alarm);

Get the `alarm` repeat information, as an ECalComponentAlarmRepeat.

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

the `alarm` repeat information, or `NULL`, when none is set.

[transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_set_repeat ()

    void
    e_cal_component_alarm_set_repeat (ECalComponentAlarm *alarm,
                                      const ECalComponentAlarmRepeat *repeat);

Set the `alarm` repeat information, as an ECalComponentAlarmRepeat.

#### Parameters

alarm | an ECalComponentAlarm |
repeat | a repeat information to set, or `NULL` to unset. | [transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_take_repeat ()

    void
    e_cal_component_alarm_take_repeat (ECalComponentAlarm *alarm,
                                       ECalComponentAlarmRepeat *repeat);

Set the `alarm` repeat information, as an ECalComponentAlarmRepeat and assumes ownership of the `trigger` .

[skip]

#### Parameters

alarm | an ECalComponentAlarm |
repeat | a repeat information to set, or `NULL` to unset. | [transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_get_trigger ()

    ECalComponentAlarmTrigger *
    e_cal_component_alarm_get_trigger (const ECalComponentAlarm *alarm);

Get the `alarm` trigger, as an ECalComponentAlarmTrigger.

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

the `alarm` trigger, or `NULL` when, none is set.

[transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_set_trigger ()

    void
    e_cal_component_alarm_set_trigger (ECalComponentAlarm *alarm,
                                       const ECalComponentAlarmTrigger *trigger);

Set the `alarm` trigger, as an ECalComponentAlarmTrigger.

#### Parameters

alarm | an ECalComponentAlarm |
trigger | a trigger to set, or `NULL` to unset. | [transfer none][nullable]

Since: 3.34

### e_cal_component_alarm_take_trigger ()

    void
    e_cal_component_alarm_take_trigger (ECalComponentAlarm *alarm,
                                        ECalComponentAlarmTrigger *trigger);

Set the `alarm` trigger, as an ECalComponentAlarmTrigger and assumes ownership of the `trigger` .

[skip]

#### Parameters

alarm | an ECalComponentAlarm |
trigger | a trigger to set, or `NULL` to unset. | [transfer full][nullable]

Since: 3.34

### e_cal_component_alarm_has_attendees ()

    gboolean
    e_cal_component_alarm_has_attendees (const ECalComponentAlarm *alarm);

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

whether the `alarm` has any attendees

Since: 3.34

### e_cal_component_alarm_set_attendees ()

    void
    e_cal_component_alarm_set_attendees (ECalComponentAlarm *alarm,
                                         const GSList *attendees);

Set the list of attendees, as a GSList of an ECalComponentAttendee.

#### Parameters

alarm | an ECalComponentAlarm |
attendees | a GSList of an ECalComponentAttendee objects to set as attendees, or `NULL` to unset. | [transfer none][nullable][element-type ECalComponentAttendee]

Since: 3.34

### e_cal_component_alarm_take_attendees ()

    void
    e_cal_component_alarm_take_attendees (ECalComponentAlarm *alarm,
                                          GSList *attendees);

Sets the list of attendees, as a GSList of an ECalComponentAttendee and assumes ownership of the `attendees` and its content.

[skip]

#### Parameters

alarm | an ECalComponentAlarm |
attendees | a GSList of an ECalComponentAttendee objects to set as attendees, or `NULL` to unset. | [transfer full][nullable][element-type ECalComponentAttendee]

Since: 3.34

### e_cal_component_alarm_has_attachments ()

    gboolean
    e_cal_component_alarm_has_attachments (const ECalComponentAlarm *alarm);

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

whether the `alarm` has any attachments

Since: 3.34

### e_cal_component_alarm_set_attachments ()

    void
    e_cal_component_alarm_set_attachments (ECalComponentAlarm *alarm,
                                           const GSList *attachments);

Set the list of attachments, as a GSList of an ICalAttach.

#### Parameters

alarm | an ECalComponentAlarm |
attachments | a GSList of an ICalAttach objects to set as attachments, or `NULL` to unset. | [transfer none][nullable][element-type ICalAttach]

Since: 3.34

### e_cal_component_alarm_take_attachments ()

    void
    e_cal_component_alarm_take_attachments
                                   (ECalComponentAlarm *alarm,
                                    GSList *attachments);

Sets the list of attachments, as a GSList of an ICalAttach and assumes ownership of the `attachments` and its content.

[skip]

#### Parameters

alarm | an ECalComponentAlarm |
attachments | a GSList of an ICalAttach objects to set as attachments, or `NULL` to unset. | [transfer full][nullable][element-type ICalAttach]

Since: 3.34

### e_cal_component_alarm_get_property_bag ()

    ECalComponentPropertyBag *
    e_cal_component_alarm_get_property_bag
                                   (const ECalComponentAlarm *alarm);

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

an ECalComponentPropertyBag with additional properties stored with an alarm component, other than those accessible with the other functions of the `alarm` .

[transfer none]

Since: 3.34

### e_cal_component_alarm_get_acknowledged ()

    ICalTime *
    e_cal_component_alarm_get_acknowledged
                                   (const ECalComponentAlarm *alarm);

Get the last time the alarm had been acknowledged, that is, when its reminder had been triggered. The returned ICalTime is owned by `alarm` and should not be modified, neither its content.

#### Parameters

alarm | an ECalComponentAlarm |

#### Returns

the `alarm` acknowledged time, or `NULL`, when none is set.

[transfer none][nullable]

Since: 3.40

### e_cal_component_alarm_set_acknowledged ()

    void
    e_cal_component_alarm_set_acknowledged
                                   (ECalComponentAlarm *alarm,
                                    const ICalTime *when);

Set the acknowledged time of the `alarm` . Use `NULL` to unset it.

#### Parameters

alarm | an ECalComponentAlarm |
when | an ICalTime when the `alarm` had been acknowledged, or `NULL` to unset. | [transfer none][nullable]

Since: 3.40

### e_cal_component_alarm_take_acknowledged ()

    void
    e_cal_component_alarm_take_acknowledged
                                   (ECalComponentAlarm *alarm,
                                    ICalTime *when);

Set the acknowledged time of the `alarm` . Use `NULL` to unset it. The function assumes ownership of the `when` .

#### Parameters

alarm | an ECalComponentAlarm |
when | an ICalTime when the `alarm` had been acknowledged, or `NULL` to unset. | [transfer full][nullable]

Since: 3.40

## Types and Values

### E_CAL_EVOLUTION_ALARM_UID_PROPERTY

    #define E_CAL_EVOLUTION_ALARM_UID_PROPERTY "X-EVOLUTION-ALARM-UID"

Extension property for alarm components so that we can reference them by UID.

Since: 3.34

### ECalComponentAlarm

    typedef struct _ECalComponentAlarm ECalComponentAlarm;

Opaque structure, which represents alarm subcomponents. Use the functions below to work with it.