EBackend.DBusServer¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when server acquires a connection to the session bus. |
|
Emitted when server acquires its well-known session bus name. |
|
Emitted when server loses its well-known session bus name or the session bus connection has been closed. |
|
Emitted to request that server quit its main loop. |
|
Emitted to request that server start its main loop and attempt to acquire its well-known session bus name. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class EBackend.DBusServer(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
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
) – anEBackend.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:
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 untilEBackend.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:
Signal Details¶
- EBackend.DBusServer.signals.bus_acquired(d_bus_server, connection)¶
- Signal Name:
bus-acquired
- Flags:
- Parameters:
d_bus_server (
EBackend.DBusServer
) – The object which received the signalconnection (
Gio.DBusConnection
) – theGio.DBusConnection
to the session bus
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:
- Parameters:
d_bus_server (
EBackend.DBusServer
) – The object which received the signalconnection (
Gio.DBusConnection
) – theGio.DBusConnection
to the session bus
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:
- Parameters:
d_bus_server (
EBackend.DBusServer
) – The object which received the signalconnection (
Gio.DBusConnection
) – the #GDBusconnection to the session bus, orNone
if the connection has been closed
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:
- Parameters:
d_bus_server (
EBackend.DBusServer
) – The object which received the signalcode (
EBackend.DBusServerExitCode
) – anEBackend.DBusServerExitCode
Emitted to request that server quit its main loop.
- EBackend.DBusServer.signals.run_server(d_bus_server)¶
- Signal Name:
run-server
- Flags:
- Parameters:
d_bus_server (
EBackend.DBusServer
) – The object which received the signal- Returns:
- Return type:
Emitted to request that server start its main loop and attempt to acquire its well-known session bus name.