ESourceGoa

## ESourceGoa ESourceGoa — ESource extension for GNOME Online Accounts |

## Synopsis

    #include <libedataserver/libedataserver.h>

    struct              ESourceGoa;
    #define             E_SOURCE_EXTENSION_GOA
    const gchar *       e_source_goa_get_account_id         (ESourceGoa *extension);
    gchar *             e_source_goa_dup_account_id         (ESourceGoa *extension);
    void                e_source_goa_set_account_id         (ESourceGoa *extension,
                                                             const gchar *account_id);
    const gchar *       e_source_goa_get_calendar_url       (ESourceGoa *extension);
    gchar *             e_source_goa_dup_calendar_url       (ESourceGoa *extension);
    void                e_source_goa_set_calendar_url       (ESourceGoa *extension,
                                                             const gchar *calendar_url);
    const gchar *       e_source_goa_get_contacts_url       (ESourceGoa *extension);
    gchar *             e_source_goa_dup_contacts_url       (ESourceGoa *extension);
    void                e_source_goa_set_contacts_url       (ESourceGoa *extension,
                                                             const gchar *contacts_url);

## Object Hierarchy

      GObject
       +----ESourceExtension
             +----ESourceGoa

## Properties

      "account-id"               gchar*                : Read / Write / Construct
      "calendar-url"             gchar*                : Read / Write / Construct
      "contacts-url"             gchar*                : Read / Write / Construct

## Description

The ESourceGoa extension associates an ESource with a GoaAccount. This extension is usually found in a top-level ESource, with various mail, calendar and address book data sources as children.

Access the extension as follows:

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

    ESourceGoa *extension;

    extension = e_source_get_extension (source, E_SOURCE_EXTENSION_GOA);

## Details

### struct ESourceGoa

    struct ESourceGoa;

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

Since 3.6

### E_SOURCE_EXTENSION_GOA

    #define E_SOURCE_EXTENSION_GOA "GNOME Online Accounts"

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

Since 3.6

### e_source_goa_get_account_id ()

    const gchar *       e_source_goa_get_account_id         (ESourceGoa *extension);

Returns the identifier string of the GNOME Online Account associated with the ESource to which `extension` belongs.

`extension` : | an ESourceGoa
Returns : | the associated GNOME Online Account ID

Since 3.6

### e_source_goa_dup_account_id ()

    gchar *             e_source_goa_dup_account_id         (ESourceGoa *extension);

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

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

`extension` : | an ESourceGoa
Returns : | a newly-allocated copy of "account-id"

Since 3.6

### e_source_goa_set_account_id ()

    void                e_source_goa_set_account_id         (ESourceGoa *extension,
                                                             const gchar *account_id);

Sets the identifier string of the GNOME Online Account associated with the ESource to which `extension` belongs.

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

`extension` : | an ESourceGoa
`account_id` : | the associated GNOME Online Account ID, or `NULL`. [allow-none]

Since 3.6

### e_source_goa_get_calendar_url ()

    const gchar *       e_source_goa_get_calendar_url       (ESourceGoa *extension);

Returns the calendar URL string of the GNOME Online Account associated with the ESource to which `extension` belongs. Can be `NULL` or an empty string for accounts not supporting this property.

`extension` : | an ESourceGoa
Returns : | the associated GNOME Online Account calendar URL

Since 3.8

### e_source_goa_dup_calendar_url ()

    gchar *             e_source_goa_dup_calendar_url       (ESourceGoa *extension);

Thread-safe variation of `e_source_goa_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.

`extension` : | an ESourceGoa
Returns : | a newly-allocated copy of "calendar-url"

Since 3.8

### e_source_goa_set_calendar_url ()

    void                e_source_goa_set_calendar_url       (ESourceGoa *extension,
                                                             const gchar *calendar_url);

Sets the calendar URL of the GNOME Online Account associated with the ESource to which `extension` belongs.

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

`extension` : | an ESourceGoa
`calendar_url` : | the associated GNOME Online Account calendar URL, or `NULL`. [allow-none]

Since 3.8

### e_source_goa_get_contacts_url ()

    const gchar *       e_source_goa_get_contacts_url       (ESourceGoa *extension);

Returns the contacts URL string of the GNOME Online Account associated with the ESource to which `extension` belongs. Can be `NULL` or an empty string for accounts not supporting this property.

`extension` : | an ESourceGoa
Returns : | the associated GNOME Online Account contacts URL

Since 3.8

### e_source_goa_dup_contacts_url ()

    gchar *             e_source_goa_dup_contacts_url       (ESourceGoa *extension);

Thread-safe variation of `e_source_goa_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.

`extension` : | an ESourceGoa
Returns : | a newly-allocated copy of "contacts-url"

Since 3.8

### e_source_goa_set_contacts_url ()

    void                e_source_goa_set_contacts_url       (ESourceGoa *extension,
                                                             const gchar *contacts_url);

Sets the contacts URL of the GNOME Online Account associated with the ESource to which `extension` belongs.

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

`extension` : | an ESourceGoa
`contacts_url` : | the associated GNOME Online Account contacts URL, or `NULL`. [allow-none]

Since 3.8

## Property Details

### The `"account-id"` property

      "account-id"               gchar*                : Read / Write / Construct

GNOME Online Account ID.

Default value: NULL

### The `"calendar-url"` property

      "calendar-url"             gchar*                : Read / Write / Construct

GNOME Online Calendar URL.

Default value: NULL

### The `"contacts-url"` property

      "contacts-url"             gchar*                : Read / Write / Construct

GNOME Online Contacts URL.

Default value: NULL