## EDataFactory EDataFactory — An abstract base class for a backend-based server |

## Functions

EBackendFactory * | e_data_factory_ref_backend_factory ()
ESourceRegistry * | e_data_factory_get_registry ()
gchar * | e_data_factory_construct_path ()
void | e_data_factory_spawn_subprocess_backend ()
gboolean | e_data_factory_get_reload_supported ()
gint | e_data_factory_get_backend_per_process ()
gboolean | e_data_factory_use_backend_per_process ()
EBackend * | e_data_factory_create_backend ()
gchar * | e_data_factory_open_backend ()
void | e_data_factory_backend_closed ()
void | e_data_factory_backend_closed_by_sender ()

## Types and Values

struct | EDataFactory

## Object Hierarchy

        GObject
        ╰── EDBusServer
            ╰── EDataFactory
                ├── EDataBookFactory
                ├── EDataCalFactory
                ╰── ESourceRegistryServer

## Implemented Interfaces

EDataFactory implements GInitable.

## Includes

    #include <libebackend/libebackend.h>

## Description

## Functions

### e_data_factory_ref_backend_factory ()

    EBackendFactory *
    e_data_factory_ref_backend_factory (EDataFactory *data_factory,
                                        const gchar *backend_name,
                                        const gchar *extension_name);

Returns the EBackendFactory for "`backend_name` :`extension_name` ", or `NULL` if no such factory is registered.

The returned EBackendFactory is referenced for thread-safety. Unreference the EBackendFactory with `g_object_unref()` when finished with it.

#### Parameters

data_factory | an EDataFactory |
backend_name | a backend name |
extension_name | an extension name |

#### Returns

the EBackendFactory for `hash_key` , or `NULL`.

[transfer full][nullable]

Since: 3.6

### e_data_factory_get_registry ()

    ESourceRegistry *
    e_data_factory_get_registry (EDataFactory *data_factory);

Returns the ESourceRegistry owned by `data_factory` .

#### Parameters

data_factory | an EDataFactory |

#### Returns

the ESourceRegistry.

[transfer none]

Since: 3.16

### e_data_factory_construct_path ()

    gchar *
    e_data_factory_construct_path (EDataFactory *data_factory);

Returns a new and unique object path for a D-Bus interface based in the data object path prefix of the `data_factory`

#### Parameters

data_factory | an EDataFactory |

#### Returns

a newly allocated string, representing the object path for the D-Bus interface.

Since: 3.16

### e_data_factory_spawn_subprocess_backend ()

    void
    e_data_factory_spawn_subprocess_backend
                                   (EDataFactory *data_factory,
                                    GDBusMethodInvocation *invocation,
                                    const gchar *uid,
                                    const gchar *extension_name,
                                    const gchar *subprocess_path);

Spawns a new subprocess for a backend type and returns the object path of the new subprocess to the client, in the way the client can talk directly to the running backend. If the backend already has a subprocess running, the used object path is returned to the client.

#### Parameters

data_factory | an EDataFactory |
invocation | a GDBusMethodInvocation |
uid | an ESource UID |
extension_name | an extension name |
subprocess_path | a path of an executable responsible for running the subprocess |

Since: 3.16

### e_data_factory_get_reload_supported ()

    gboolean
    e_data_factory_get_reload_supported (EDataFactory *data_factory);

### e_data_factory_get_backend_per_process ()

    gint
    e_data_factory_get_backend_per_process
                                   (EDataFactory *data_factory);

### e_data_factory_use_backend_per_process ()

    gboolean
    e_data_factory_use_backend_per_process
                                   (EDataFactory *data_factory);

### e_data_factory_create_backend ()

    EBackend *
    e_data_factory_create_backend (EDataFactory *data_factory,
                                   EBackendFactory *backend_factory,
                                   ESource *source);

Used only when backend-per-process is off.

Free the returned pointer with `g_object_unref()`, if not NULL and no longer needed.

#### Parameters

data_factory | an EDataFactory |

#### Returns

a newly-created EBackend.

[transfer full][nullable]

### e_data_factory_open_backend ()

    gchar *
    e_data_factory_open_backend (EDataFactory *data_factory,
                                 EBackend *backend,
                                 GDBusConnection *connection,
                                 GCancellable *cancellable,
                                 GError **error);

### e_data_factory_backend_closed ()

    void
    e_data_factory_backend_closed (EDataFactory *data_factory,
                                   EBackend *backend);

### e_data_factory_backend_closed_by_sender ()

    void
    e_data_factory_backend_closed_by_sender
                                   (EDataFactory *data_factory,
                                    EBackend *backend,
                                    const gchar *sender);

## Types and Values

### struct EDataFactory

    struct EDataFactory;

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

Since: 3.4