ESubprocessFactory

ESubprocessFactory — An abstract base class for a backend-subprocess server

Types and Values

Object Hierarchy

    GObject
    ╰── ESubprocessFactory
        ├── ESubprocessBookFactory
        ╰── ESubprocessCalFactory

Implemented Interfaces

ESubprocessFactory implements GInitable.

Includes

#include <libebackend/libebackend.h>

Description

Functions

e_subprocess_factory_ref_initable_backend ()

EBackend *
e_subprocess_factory_ref_initable_backend
                               (ESubprocessFactory *subprocess_factory,
                                const gchar *uid,
                                const gchar *type_name,
                                const gchar *module_file_name,
                                GCancellable *cancellable,
                                GError **error);

Returns either a newly-created or existing EBackend for ESource. The returned EBackend is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

If the newly-created backend implements the GInitable interface, then g_initable_init() is also called on it using cancellable and error .

The subprocess_factory retains a strong reference to backend .

If no suitable EBackendFactory exists, or if the EBackend fails to initialize, the function sets error and returns NULL.

Parameters

subprocess_factory

an ESubprocessFactory

 

uid

UID of an ESource to open

 

backend_factory_type_name

the name of the backend factory type

 

module_filename

the name (full-path) of the backend module to be loaded

 

cancellable

optional GCancellable object, or NULL

 

error

return location for a GError, or NULL

 

Returns

an EBackend for source , or NULL

Since: 3.16


e_subprocess_factory_get_registry ()

ESourceRegistry *
e_subprocess_factory_get_registry (ESubprocessFactory *subprocess_factory);

Returns the ESourceRegistry owned by subprocess_factory .

Parameters

subprocess_factory

an ESubprocessFactory

 

Returns

the ESourceRegistry

Since: 3.16


e_subprocess_factory_open_backend ()

gchar *
e_subprocess_factory_open_backend (ESubprocessFactory *subprocess_factory,
                                   GDBusConnection *connection,
                                   const gchar *uid,
                                   const gchar *type_name,
                                   const gchar *module_file_name,
                                   GDBusInterfaceSkeleton *proxy,
                                   GCancellable *cancellable,
                                   GError **error);

Returns the EBackend data D-Bus object path

Parameters

subprocess_factory

an ESubprocessFactory

 

connection

a GDBusConnection

 

uid

UID of an ESource to open

 

backend_factory_type_name

the name of the backend factory type

 

module_filename

the name (full-path) of the backend module to be loaded

 

proxy

a GDBusInterfaceSkeleton, used to communicate to the subprocess backend

 

cancellable

a GCancellable

 

error

return location for a GError, or NULL

 

Returns

a newly allocated string that represents the EBackend data D-Bus object path.

Since: 3.16


e_subprocess_factory_construct_path ()

gchar *
e_subprocess_factory_construct_path (void);

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

Returns

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

This function is here for a lack of a better place

Since: 3.16


e_subprocess_factory_set_backend_callbacks ()

void
e_subprocess_factory_set_backend_callbacks
                               (ESubprocessFactory *subprocess_factory,
                                EBackend *backend,
                                GDBusInterfaceSkeleton *proxy);

Installs a toggle reference on the backend, that can receive a signal to shutdown once all client connections are closed.

Parameters

subprocess_factory

an ESubprocessFactory

 

backend

an EBackend

 

proxy

a GDBusInterfaceSkeleton, used to communicate to the subprocess backend

 

Since: 3.16


e_subprocess_factory_call_backends_prepare_shutdown ()

void
e_subprocess_factory_call_backends_prepare_shutdown
                               (ESubprocessFactory *subprocess_factory);

Calls e_backend_prepare_shutdown() for the list of used backends.

Parameters

subprocess_factory

an ESubprocessFactory

 

Since: 3.16


e_subprocess_factory_get_backends_list ()

GList *
e_subprocess_factory_get_backends_list
                               (ESubprocessFactory *subprocess_factory);

Returns a list of used backends.

Parameters

subprocess_factory

an ESubprocessFactory

 

Returns

A GList that contains a list of used backends. The list should be freed by the caller using: g_list_free_full (backends, g_object_unref).

Since: 3.16

Types and Values

struct ESubprocessFactory

struct ESubprocessFactory;

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

Since: 3.16