change_status


Description:

public void change_status (ConnectionStatus status, ConnectionStatusReason reason)

Change the status of the connection.

The allowed state transitions are:

Before the transition to CONNECTED, the implementation must have discovered the handle for the local user and passed it to set_self_handle.

Changing from NEW to CONNECTED is implemented by doing the transition from NEW to CONNECTING, followed by the transition from CONNECTING to CONNECTED; it's exactly equivalent to calling tp_base_connection_change_status for those two transitions one after the other.

Any other valid transition does the following, in this order:

To provide more details about what happened when moving to status DISCONNECTED due to an error, consider calling tp_base_connection_disconnect_with_dbus_error instead of this function.

Changed in 0.7.35: the self_handle member of BaseConnection was previously set to 0 at this stage. It now remains non-zero until the object is disposed.

Parameters:

this

The connection

status

The new status

reason

The reason for the status change