## 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 ()
const gchar * | e_source_collection_get_calendar_url ()
gchar * | e_source_collection_dup_calendar_url ()
void | e_source_collection_set_calendar_url ()
const gchar * | e_source_collection_get_contacts_url ()
gchar * | e_source_collection_dup_contacts_url ()
void | e_source_collection_set_contacts_url ()
gboolean | e_source_collection_get_allow_sources_rename ()
void | e_source_collection_set_allow_sources_rename ()

## 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.

[nullable]

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”.

[nullable]

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`. | [nullable]

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

### e_source_collection_get_calendar_url ()

    const gchar *
    e_source_collection_get_calendar_url (ESourceCollection *extension);

Returns the calendar top URL string, that is, where to search for calendar sources.

#### Parameters

extension | an ESourceCollection |

#### Returns

the calendar top URL, or `NULL`.

[nullable]

Since: 3.26

### e_source_collection_dup_calendar_url ()

    gchar *
    e_source_collection_dup_calendar_url (ESourceCollection *extension);

Thread-safe variation of `e_source_collection_get_calendar_url()`. 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 “calendar-url”.

[nullable]

Since: 3.26

### e_source_collection_set_calendar_url ()

    void
    e_source_collection_set_calendar_url (ESourceCollection *extension,
                                          const gchar *calendar_url);

Sets the calendar top URL, that is, where to search for calendar sources.

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

#### Parameters

extension | an ESourceCollection |
calendar_url | calendar top URL, or `NULL`. | [nullable]

Since: 3.26

### e_source_collection_get_contacts_url ()

    const gchar *
    e_source_collection_get_contacts_url (ESourceCollection *extension);

Returns the contacts top URL string, that is, where to search for contact sources.

#### Parameters

extension | an ESourceCollection |

#### Returns

the contacts top URL, or `NULL`.

[nullable]

Since: 3.26

### e_source_collection_dup_contacts_url ()

    gchar *
    e_source_collection_dup_contacts_url (ESourceCollection *extension);

Thread-safe variation of `e_source_collection_get_contacts_url()`. 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 “contacts-url”.

[nullable]

Since: 3.26

### e_source_collection_set_contacts_url ()

    void
    e_source_collection_set_contacts_url (ESourceCollection *extension,
                                          const gchar *contacts_url);

Sets the contacts top URL, that is, where to search for contact sources.

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

#### Parameters

extension | an ESourceCollection |
contacts_url | contacts top URL, or `NULL`. | [nullable]

Since: 3.26

### e_source_collection_get_allow_sources_rename ()

    gboolean
    e_source_collection_get_allow_sources_rename
                                   (ESourceCollection *extension);

Returns whether the collection backend allows a user to rename child sources. It is meant mainly for GUI. The default is `FALSE`.

#### Parameters

extension | an ESourceCollection |

#### Returns

whether the collection backend allows a user to rename child sources

Since: 3.36

### e_source_collection_set_allow_sources_rename ()

    void
    e_source_collection_set_allow_sources_rename
                                   (ESourceCollection *extension,
                                    gboolean allow_sources_rename);

Sets whether the collection backend allows a user to rename child sources. It is meant mainly for GUI. The default is `FALSE`.

#### Parameters

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

Since: 3.36

## 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