EBackend.DataFactory

g EBackend.DBusServer EBackend.DBusServer EBackend.DataFactory EBackend.DataFactory EBackend.DBusServer->EBackend.DataFactory EDataServer.Extensible EDataServer.Extensible EDataServer.Extensible->EBackend.DBusServer GObject.GInterface GObject.GInterface GObject.GInterface->EDataServer.Extensible Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object GObject.Object->EBackend.DBusServer Gio.Initable->EBackend.DataFactory

Subclasses:

EBackend.SourceRegistryServer

Methods

Inherited:

EBackend.DBusServer (5), GObject.Object (37), EDataServer.Extensible (3), Gio.Initable (2)

Structs:

GObject.ObjectClass (5)

backend_closed (backend)

backend_closed_by_sender (backend, sender)

construct_path ()

create_backend (backend_factory, source)

get_backend_per_process ()

get_registry ()

get_reload_supported ()

list_opened_backends ()

open_backend (backend, connection, cancellable)

ref_backend_factory (backend_name, extension_name)

spawn_subprocess_backend (invocation, uid, extension_name, subprocess_path)

use_backend_per_process ()

Virtual Methods

Inherited:

EBackend.DBusServer (5), GObject.Object (7), Gio.Initable (1)

do_complete_open (invocation, object_path, bus_name, extension_name)

do_create_backend (backend_factory, source)

do_open_backend (backend, connection, cancellable)

Properties

Name

Type

Flags

Short Description

backend-per-process

int

r/w/co

Override backend-per-process compile-time option

registry

EDataServer.SourceRegistry

r

Data source registry

reload-supported

bool

r/w/co

Whether the data factory supports Reload

Signals

Inherited:

EBackend.DBusServer (5), GObject.Object (1)

Fields

Inherited:

EBackend.DBusServer (5), GObject.Object (1)

Name

Type

Access

Description

parent

EBackend.DBusServer

r

Class Details

class EBackend.DataFactory(**kwargs)
Bases:

EBackend.DBusServer, Gio.Initable

Abstract:

No

Structure:

EBackend.DataFactoryClass

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

New in version 3.4.

backend_closed(backend)
Parameters:

backend (EBackend.Backend) –

backend_closed_by_sender(backend, sender)
Parameters:
construct_path()
Returns:

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

Return type:

str

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

New in version 3.16.

create_backend(backend_factory, source)
Parameters:
Returns:

a newly-created EBackend.Backend

Return type:

EBackend.Backend or None

Used only when backend-per-process is off.

Free the returned pointer with GObject.Object.unref(), if not None and no longer needed.

get_backend_per_process()
Return type:

int

get_registry()
Returns:

the EDataServer.SourceRegistry

Return type:

EDataServer.SourceRegistry

Returns the EDataServer.SourceRegistry owned by self.

New in version 3.16.

get_reload_supported()
Return type:

bool

list_opened_backends()
Returns:

a GLib.SList of EBackend.Backend

Return type:

[EBackend.Backend]

Lists the currently opened backends.

The sources returned in the list are referenced for thread-safety. They must each be unreferenced with GObject.Object.unref() when finished with them. Free the returned GLib.SList itself with g_slist_free().

An easy way to free the list properly in one step is as follows:

g_slist_free_full (list, g_object_unref);

open_backend(backend, connection, cancellable)
Parameters:
Raises:

GLib.Error

Return type:

str

ref_backend_factory(backend_name, extension_name)
Parameters:
  • backend_name (str) – a backend name

  • extension_name (str) – an extension name

Returns:

the EBackend.BackendFactory for hash_key, or None

Return type:

EBackend.BackendFactory or None

Returns the EBackend.BackendFactory for “backend_name:extension_name", or None if no such factory is registered.

The returned EBackend.BackendFactory is referenced for thread-safety. Unreference the EBackend.BackendFactory with GObject.Object.unref() when finished with it.

New in version 3.6.

spawn_subprocess_backend(invocation, uid, extension_name, subprocess_path)
Parameters:

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.

New in version 3.16.

use_backend_per_process()
Return type:

bool

do_complete_open(invocation, object_path, bus_name, extension_name) virtual
Parameters:
do_create_backend(backend_factory, source) virtual
Parameters:
Returns:

a newly-created EBackend.Backend

Return type:

EBackend.Backend or None

Used only when backend-per-process is off.

Free the returned pointer with GObject.Object.unref(), if not None and no longer needed.

do_open_backend(backend, connection, cancellable) virtual
Parameters:
Return type:

str

Property Details

EBackend.DataFactory.props.backend_per_process
Name:

backend-per-process

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Override backend-per-process compile-time option

EBackend.DataFactory.props.registry
Name:

registry

Type:

EDataServer.SourceRegistry

Default Value:

None

Flags:

READABLE

Data source registry

EBackend.DataFactory.props.reload_supported
Name:

reload-supported

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether the data factory supports Reload