ESourceCollection

ESourceCollection — ESource extension for grouping related resources

Synopsis

#include <libedataserver/libedataserver.h>

struct              ESourceCollection;
#define             E_SOURCE_EXTENSION_COLLECTION
const gchar *       e_source_collection_get_identity    (ESourceCollection *extension);
gchar *             e_source_collection_dup_identity    (ESourceCollection *extension);
void                e_source_collection_set_identity    (ESourceCollection *extension,
                                                         const gchar *identity);
gboolean            e_source_collection_get_calendar_enabled
                                                        (ESourceCollection *extension);
void                e_source_collection_set_calendar_enabled
                                                        (ESourceCollection *extension,
                                                         gboolean calendar_enabled);
gboolean            e_source_collection_get_contacts_enabled
                                                        (ESourceCollection *extension);
void                e_source_collection_set_contacts_enabled
                                                        (ESourceCollection *extension,
                                                         gboolean contacts_enabled);
gboolean            e_source_collection_get_mail_enabled
                                                        (ESourceCollection *extension);
void                e_source_collection_set_mail_enabled
                                                        (ESourceCollection *extension,
                                                         gboolean mail_enabled);

Object Hierarchy

  GObject
   +----ESourceExtension
         +----ESourceBackend
               +----ESourceCollection

Properties

  "calendar-enabled"         gboolean              : Read / Write / Construct
  "contacts-enabled"         gboolean              : Read / Write / Construct
  "identity"                 gchar*                : Read / Write / Construct
  "mail-enabled"             gboolean              : Read / Write / Construct

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);

Details

struct ESourceCollection

struct ESourceCollection;

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

Since 3.6


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


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.

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.

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.

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.

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.

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.

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.

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.

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.

extension :

an ESourceCollection

mail_enabled :

whether mail sources should be enabled

Since 3.6

Property Details

The "calendar-enabled" property

  "calendar-enabled"         gboolean              : Read / Write / Construct

Whether calendar resources are enabled.

Default value: TRUE


The "contacts-enabled" property

  "contacts-enabled"         gboolean              : Read / Write / Construct

Whether contact resources are enabled.

Default value: TRUE


The "identity" property

  "identity"                 gchar*                : Read / Write / Construct

Uniquely identifies the account at the service provider.

Default value: NULL


The "mail-enabled" property

  "mail-enabled"             gboolean              : Read / Write / Construct

Whether mail resources are enabled.

Default value: TRUE