Next: , Up: STClient: Consuming a Service   [Contents]


B.8.2.1 Client Connection State

Enumeration: STClientState
ST_CLIENT_STATE_IDLE

Not started / stopped.

ST_CLIENT_STATE_PENDING

Connect / snapshot / subscribe in progress.

ST_CLIENT_STATE_READY

Handshake complete; mirrors usable.

ST_CLIENT_STATE_FAILED

Connection or handshake failed.

Function: STClientState st_client_get_state (STClient *self)

Reads the lifecycle state.

self

Client.

Returns: Current STClientState.

Function: gboolean st_client_is_ready (STClient *self)

Convenience for state == ST_CLIENT_STATE_READY.

self

Client.

Returns: TRUE if ready.

Function: gboolean st_client_get_connected (STClient *self)

Reports whether a D-Bus connection is up (may still be pending handshake).

self

Client.

Returns: TRUE if connected.

Calling start again while PENDING or READY is an error—create a new client or wait until the lifecycle ends.