## ESourceLocal

ESourceLocal

## Functions

GFile * | e_source_local_get_custom_file ()
GFile * | e_source_local_dup_custom_file ()
void | e_source_local_set_custom_file ()
gboolean | e_source_local_get_writable ()
void | e_source_local_set_writable ()
const gchar * | e_source_local_get_email_address ()
gchar * | e_source_local_dup_email_address ()
void | e_source_local_set_email_address ()

## Types and Values

#define | E_SOURCE_EXTENSION_LOCAL_BACKEND

## Object Hierarchy

        GObject
        ╰── ESourceExtension
            ╰── ESourceLocal

## Description

## Functions

### e_source_local_get_custom_file ()

    GFile *
    e_source_local_get_custom_file (ESourceLocal *extension);

Get the custom file being set on the `extension` . The returned GFile is owned by the `extension` .

For thread safety use `e_source_local_dup_custom_file()`.

#### Parameters

extension | an ESourceLocal |

#### Returns

the GFile instance, or `NULL`.

[transfer none][nullable]

### e_source_local_dup_custom_file ()

    GFile *
    e_source_local_dup_custom_file (ESourceLocal *extension);

A thread safe variant to get a custom file being set on the `extension` . Free the returned GFile, if not `NULL`, with `g_object_unref()`, when no longer needed.

#### Parameters

extension | an ESourceLocal |

#### Returns

the GFile instance, or `NULL`.

[transfer full][nullable]

### e_source_local_set_custom_file ()

    void
    e_source_local_set_custom_file (ESourceLocal *extension,
                                    GFile *custom_file);

Set, or unset, when using `NULL`, the custom file for the `extension` .

#### Parameters

extension | an ESourceLocal |
custom_file | a GFile, or `NULL`. | [nullable]

### e_source_local_get_writable ()

    gboolean
    e_source_local_get_writable (ESourceLocal *extension);

Returns whether the backend should prefer to open the file in writable mode. The default is `TRUE`. The file can be still opened for read-only, for example when the access to the file is read-only.

#### Parameters

extension | an ESourceLocal |

#### Returns

whether prefer to pen the file in writable mode

Since: 3.34

### e_source_local_set_writable ()

    void
    e_source_local_set_writable (ESourceLocal *extension,
                                 gboolean writable);

Set whether the custom file should be opened in writable mode. The default is `TRUE`. The file can be still opened for read-only, for example when the access to the file is read-only.

#### Parameters

extension | an ESourceLocal |
writable | value to set |

Since: 3.34

### e_source_local_get_email_address ()

    const gchar *
    e_source_local_get_email_address (ESourceLocal *extension);

#### Parameters

extension | an ESourceLocal |

#### Returns

the email address for `extension` .

[nullable]

Since: 3.40

### e_source_local_dup_email_address ()

    gchar *
    e_source_local_dup_email_address (ESourceLocal *extension);

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

#### Returns

a newly-allocated copy of “email-address”.

[transfer full]

Since: 3.40

### e_source_local_set_email_address ()

    void
    e_source_local_set_email_address (ESourceLocal *extension,
                                      const gchar *email_address);

Sets the email address for `extension` .

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

#### Parameters

extension | an ESourceLocal |
email_address | an email address, or `NULL`. | [nullable]

Since: 3.40

## Types and Values

### E_SOURCE_EXTENSION_LOCAL_BACKEND

    #define E_SOURCE_EXTENSION_LOCAL_BACKEND "Local Backend"

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

Since: 3.18