## ESourceCollection ESourceCollection — ESource extension for grouping related resources |

## Functions

const gchar * | e_source_collection_get_identity ()
gchar * | e_source_collection_dup_identity ()
void | e_source_collection_set_identity ()
gboolean | e_source_collection_get_calendar_enabled ()
void | e_source_collection_set_calendar_enabled ()
gboolean | e_source_collection_get_contacts_enabled ()
void | e_source_collection_set_contacts_enabled ()
gboolean | e_source_collection_get_mail_enabled ()
void | e_source_collection_set_mail_enabled ()

## Types and Values

#define | E_SOURCE_EXTENSION_COLLECTION
struct | ESourceCollection

## Object Hierarchy

        GObject
        ╰── ESourceExtension
            ╰── ESourceBackend
                ╰── ESourceCollection

## Includes

    #include <libedataserver/libedataserver.h>

## Description

The ESourceCollection extension identifies the ESource as the root of a data source collection.

Access the extension as follows:

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

    ESourceCollection *extension;

    extension = e_source_get_extension (source, E_SOURCE_EXTENSION_COLLECTION);

## Functions

### e_source_collection_get_identity ()

    const gchar *
    e_source_collection_get_identity (ESourceCollection *extension);

Returns the string used to uniquely identify the user account at the service provider. Often this is an email address or user name.

#### Parameters

extension | an ESourceCollection |

#### Returns

the collection identity

Since: 3.6

### e_source_collection_dup_identity ()

    gchar *
    e_source_collection_dup_identity (ESourceCollection *extension);

Thread-safe variation of `e_source_collection_get_identity()`. 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 ESourceCollection |

#### Returns

a newly-allocated copy of “identity”

Since: 3.6

### e_source_collection_set_identity ()

    void
    e_source_collection_set_identity (ESourceCollection *extension,
                                      const gchar *identity);

Sets the string used to uniquely identify the user account at the service provider. Often this is an email address or user name.

The internal copy of `identity` is automatically stripped of leading and trailing whitespace. If the resulting string is empty, `NULL` is set instead.

#### Parameters

extension | an ESourceCollection |
identity | the collection identity, or `NULL`. | [allow-none]

Since: 3.6

### e_source_collection_get_calendar_enabled ()

    gboolean
    e_source_collection_get_calendar_enabled
                                   (ESourceCollection *extension);

Returns whether calendar sources within the collection should be enabled.

An ECollectionBackend running within the registry D-Bus service will automatically synchronize any calendar sources it maintains with the “calendar-enabled” property.

#### Parameters

extension | an ESourceCollection |

#### Returns

whether calendar sources should be enabled

Since: 3.6

### e_source_collection_set_calendar_enabled ()

    void
    e_source_collection_set_calendar_enabled
                                   (ESourceCollection *extension,
                                    gboolean calendar_enabled);

Sets whether calendar sources within the collection should be enabled.

An ECollectionBackend running within the registry D-Bus service will automatically synchronize any calendar sources it maintains with the “calendar-enabled” property.

Calling this function from a registry service client has no effect until the change is submitted to the registry service through `e_source_write()`, but there should rarely be any need for clients to call this.

#### Parameters

extension | an ESourceCollection |
calendar_enabled | whether calendar sources should be enabled |

Since: 3.6

### e_source_collection_get_contacts_enabled ()

    gboolean
    e_source_collection_get_contacts_enabled
                                   (ESourceCollection *extension);

Returns whether address book sources within the collection should be enabled.

An ECollectionBackend running within the registry D-Bus service will automatically synchronize any address book sources it maintains with the “contacts-enabled” property.

#### Parameters

extension | an ESourceCollection |

#### Returns

whether address book sources should be enabled

Since: 3.6

### e_source_collection_set_contacts_enabled ()

    void
    e_source_collection_set_contacts_enabled
                                   (ESourceCollection *extension,
                                    gboolean contacts_enabled);

Sets whether address book sources within the collection should be enabled.

An ECollectionBackend running within the registry D-Bus service will automatically synchronize any address book sources it maintains with the “contacts-enabled” property.

Calling this function from a registry service client has no effect until the change is submitted to the registry service through `e_source_write()`, but there should rarely be any need for clients to call this.

#### Parameters

extension | an ESourceCollection |
contacts_enabled | whether address book sources should be enabled |

Since: 3.6

### e_source_collection_get_mail_enabled ()

    gboolean
    e_source_collection_get_mail_enabled (ESourceCollection *extension);

Returns whether mail sources within the collection should be enabled.

An ECollectionBackend running within the registry D-Bus service will automatically synchronize any mail sources it maintains with the “mail-enabled” property.

#### Parameters

extension | an ESourceCollection |

#### Returns

whether mail sources should be enabled

Since: 3.6

### e_source_collection_set_mail_enabled ()

    void
    e_source_collection_set_mail_enabled (ESourceCollection *extension,
                                          gboolean mail_enabled);

Sets whether mail sources within the collection should be enabled.

An ECollectionBackend running within the registry D-Bus service will automatically synchronize any mail sources it maintains with the “mail-enabled” property.

Calling this function from a registry service client has no effect until the changes is submitted to the registry service through `e_source_write()`, but there should rarely be any need for clients to call this.

#### Parameters

extension | an ESourceCollection |
mail_enabled | whether mail sources should be enabled |

Since: 3.6

## Types and Values

### E_SOURCE_EXTENSION_COLLECTION

    #define E_SOURCE_EXTENSION_COLLECTION "Collection"

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

Since: 3.6

### struct ESourceCollection

    struct ESourceCollection;

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

Since: 3.6