EBackend.DBusServer

g EBackend.DBusServer EBackend.DBusServer EDataServer.Extensible EDataServer.Extensible EDataServer.Extensible->EBackend.DBusServer GObject.GInterface GObject.GInterface GObject.GInterface->EDataServer.Extensible GObject.Object GObject.Object GObject.Object->EBackend.DBusServer

Subclasses:

EBackend.DataFactory, EBackend.UserPrompterServer

Methods

Inherited:

GObject.Object (37), EDataServer.Extensible (3)

Structs:

GObject.ObjectClass (5)

hold ()

load_modules ()

quit (code)

release ()

run (wait_for_client)

Virtual Methods

Inherited:

GObject.Object (7)

do_bus_acquired (connection)

do_bus_name_acquired (connection)

do_bus_name_lost (connection)

do_quit_server (code)

do_run_server ()

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

bus-acquired

Emitted when server acquires a connection to the session bus.

bus-name-acquired

Emitted when server acquires its well-known session bus name.

bus-name-lost

Emitted when server loses its well-known session bus name or the session bus connection has been closed.

quit-server

Emitted to request that server quit its main loop.

run-server

Emitted to request that server start its main loop and attempt to acquire its well-known session bus name.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class EBackend.DBusServer(**kwargs)
Bases:

GObject.Object, EDataServer.Extensible

Abstract:

Yes

Structure:

EBackend.DBusServerClass

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

New in version 3.4.

hold()

Increases the use count of self.

Use this function to indicate that the server has a reason to continue to run. To cancel the hold, call EBackend.DBusServer.release().

New in version 3.4.

load_modules()

This function should be called once during self initialization to load all available library modules to extend the self's functionality.

New in version 3.4.

quit(code)
Parameters:

code (EBackend.DBusServerExitCode) – an EBackend.DBusServerExitCode

Emits the EBackend.DBusServer ::quit signal with the given code.

By default the self will quit its main loop and cause EBackend.DBusServer.run() to return code.

New in version 3.4.

release()

Decreates the use count of self.

When the use count reaches zero, the server will stop running.

Never call this function except to cancel the effect of a previous call to EBackend.DBusServer.hold().

New in version 3.4.

run(wait_for_client)
Parameters:

wait_for_client (bool) – continue running until a client connects

Returns:

the exit code passed to EBackend.DBusServer.quit()

Return type:

EBackend.DBusServerExitCode

Emits the EBackend.DBusServer ::run signal.

By default the self will start its main loop and attempt to acquire its well-known session bus name. If the self's main loop is already running, the function will immediately return EBackend.DBusServerExitCode.NONE. Otherwise the function blocks until EBackend.DBusServer.quit() is called.

If wait_for_client is True, the self will continue running until the first client connection is made instead of quitting on its own if no client connection is made within the first few seconds.

New in version 3.4.

do_bus_acquired(connection) virtual
Parameters:

connection (Gio.DBusConnection) –

do_bus_name_acquired(connection) virtual
Parameters:

connection (Gio.DBusConnection) –

do_bus_name_lost(connection) virtual
Parameters:

connection (Gio.DBusConnection) –

do_quit_server(code) virtual
Parameters:

code (EBackend.DBusServerExitCode) –

do_run_server() virtual
Return type:

EBackend.DBusServerExitCode

Signal Details

EBackend.DBusServer.signals.bus_acquired(d_bus_server, connection)
Signal Name:

bus-acquired

Flags:

RUN_LAST

Parameters:

Emitted when server acquires a connection to the session bus.

EBackend.DBusServer.signals.bus_name_acquired(d_bus_server, connection)
Signal Name:

bus-name-acquired

Flags:

RUN_LAST

Parameters:

Emitted when server acquires its well-known session bus name.

EBackend.DBusServer.signals.bus_name_lost(d_bus_server, connection)
Signal Name:

bus-name-lost

Flags:

RUN_LAST

Parameters:

Emitted when server loses its well-known session bus name or the session bus connection has been closed.

EBackend.DBusServer.signals.quit_server(d_bus_server, code)
Signal Name:

quit-server

Flags:

RUN_LAST

Parameters:

Emitted to request that server quit its main loop.

EBackend.DBusServer.signals.run_server(d_bus_server)
Signal Name:

run-server

Flags:

RUN_LAST

Parameters:

d_bus_server (EBackend.DBusServer) – The object which received the signal

Returns:

an EBackend.DBusServerExitCode

Return type:

EBackend.DBusServerExitCode

Emitted to request that server start its main loop and attempt to acquire its well-known session bus name.