EDataServer.SourceRegistry.set_default_for_extension_name

### Method

# EDataServer SourceRegistryset_default_for_extension_name

since: 3.6

#### Declaration [src]

    void
    e_source_registry_set_default_for_extension_name (
      ESourceRegistry* registry,
      const gchar* extension_name,
      ESource* default_source
    )

#### Description [src]

This is a convenience function to set a default `ESource` based on `extension_name`. This only works with a subset of extension names.

If `extension_name` is #E_SOURCE_EXTENSION_ADDRESS_BOOK, the function sets `default_source` as the default address book. If `default_source` is `NULL`, the default address book is reset to the built-in address book.

If `extension_name` is #E_SOURCE_EXTENSION_CALENDAR, the function sets `default_source` as the default calendar. If `default_source` is `NULL`, the default calendar is reset to the built-in calendar.

If `extension_name` is #E_SOURCE_EXTENSION_MAIL_ACCOUNT, the function sets `default_source` as the default mail account. If `default_source` is `NULL`, the default mail account is reset to the built-in mail account.

If `extension_name` is #E_SOURCE_EXTENSION_MAIL_IDENTITY, the function sets `default_source` as the default mail identity. If `default_source` is `NULL`, the next request for the default mail identity will return the mail identity named by the default mail account.

If `extension_name` is #E_SOURCE_EXTENSION_MEMO_LIST, the function sets `default_source` as the default memo list. If `default_source` is `NULL`, the default memo list is reset to the built-in memo list.

If `extension_name` is #E_SOURCE_EXTENSION_TASK_LIST, the function sets `default_source` as the default task list. If `default_source` is `NULL`, the default task list is reset to the built-in task list.

For all other values of `extension_name`, the function does nothing.

Available since: 3.6

#### Parameters

`extension_name`

  Type: `const gchar*`

  An extension name.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`default_source`

  Type: `ESource`

  An `ESource`, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.