## ESourceAlarms ESourceAlarms — ESource extension for alarm state |

## Functions

gboolean | e_source_alarms_get_include_me ()
void | e_source_alarms_set_include_me ()
const gchar * | e_source_alarms_get_last_notified ()
gchar * | e_source_alarms_dup_last_notified ()
void | e_source_alarms_set_last_notified ()

## Types and Values

#define | E_SOURCE_EXTENSION_ALARMS
struct | ESourceAlarms
struct | ESourceAlarmsClass

## Includes

    #include <libedataserver/libedataserver.h>

## Description

The ESourceAlarms extension tracks alarm state for a calendar.

Access the extension as follows:

    1
    2
    3
    4
    5
    #include <libedataserver/libedataserver.h>

    ESourceAlarms *extension;

    extension = e_source_get_extension (source, E_SOURCE_EXTENSION_ALARMS);

## Functions

### e_source_alarms_get_include_me ()

    gboolean
    e_source_alarms_get_include_me (ESourceAlarms *extension);

Returns whether the user should be alerted about upcoming appointments in the calendar described by the ESource to which `extension` belongs.

Alarm daemons such as evolution-alarm-notify can use this property to decide which calendars to query for upcoming appointments.

#### Parameters

extension | an ESourceAlarms |

#### Returns

whether to show alarms for upcoming appointments

Since 3.6

### e_source_alarms_set_include_me ()

    void
    e_source_alarms_set_include_me (ESourceAlarms *extension,
                                    gboolean include_me);

Sets whether the user should be alerted about upcoming appointments in the calendar described by the ESource to which `extension` belongs.

Alarm daemons such as evolution-alarm-notify can use this property to decide which calendars to query for upcoming appointments.

#### Parameters

extension | an ESourceAlarms |
include_me | whether to show alarms for upcoming appointments |

Since 3.6

### e_source_alarms_get_last_notified ()

    const gchar *
    e_source_alarms_get_last_notified (ESourceAlarms *extension);

Returns an ISO 8601 formatted timestamp of when the user was last alerted about an upcoming appointment in the calendar described by the ESource to which `extension` belongs. If no valid timestamp has been set, the function will return `NULL`.

#### Parameters

extension | an ESourceAlarms |

#### Returns

an ISO 8601 timestamp, or `NULL`

Since 3.6

### e_source_alarms_dup_last_notified ()

    gchar *
    e_source_alarms_dup_last_notified (ESourceAlarms *extension);

Thread-safe variation of `e_source_alarms_get_last_notified()`. Use this function when accessing `extension` from multiple threads.

The returned string should be freed with `g_free()` when no longer needed.

#### Parameters

extension | an ESourceAlarms |

#### Returns

a newly-allocated copy of “last-notified”

Since 3.6

### e_source_alarms_set_last_notified ()

    void
    e_source_alarms_set_last_notified (ESourceAlarms *extension,
                                       const gchar *last_notified);

Sets an ISO 8601 formatted timestamp of when the user was last alerted about an upcoming appointment in the calendar described by the ESource to which `extension` belongs.

If `last_notified` is non-`NULL`, the function will validate the timestamp before setting the “last-notified” property. Invalid timestamps are discarded with a runtime warning.

Generally, this function should only be called by an alarm daemon such as evolution-alarm-notify.

#### Parameters

extension | an ESourceAlarms |
last_notified | an ISO 8601 timestamp, or `NULL`. | [allow-none]

Since 3.6

## Types and Values

### E_SOURCE_EXTENSION_ALARMS

    #define E_SOURCE_EXTENSION_ALARMS "Alarms"

Pass this extension name to `e_source_get_extension()` to access ESourceAlarms. This is also used as a group name in key files.

Since 3.6

### struct ESourceAlarms

    struct ESourceAlarms {
    	ESourceExtension parent;
    	ESourceAlarmsPrivate *priv;
    };

Contains only private data that should be read and manipulated using the functions below.

Since 3.6

### struct ESourceAlarmsClass

    struct ESourceAlarmsClass {
    	ESourceExtensionClass parent_class;
    };