Since this change the client is responsible to provide credentials
to use to authenticate backends (through ESource-s, to be more precise),
unless the credentials are already saved.
The EAsyncClosure pushes its own thread default main context, which
the EClient took as the one to use for any notifications, like about
property changes of the related D-Bus object, but this main context
doesn't live for long, it's effectively dead shortly after
the EClient open, thus the property changes are not received anymore,
which may eventually mean a stuck property value, like for
the 'read-only' state.
Use g_simple_async_result_complete_in_idle() so the queued results
complete in the correct main loop context. Otherwise we get runtime
warnings:
"g_simple_async_result_complete() called from wrong context!"
Returns TRUE if an EClient instance for the given source and extension
name was recently discarded after having emitted a "backend-died" signal,
and a replacement EClient instance has not yet been created.
Changed my mind. There's some scenarios where a function depends on an
ESourceRegistry but could also utilize an EClientCache, and it would be
nice to just pass the EClientCache and extract the ESourceRegistry from
it, so we need to make sure the ESourceRegistry will be there when it's
needed and not quietly disappear.
New class to help reduce code duplication and centralize some EClient
handling policies.
Benefits:
- EClient instances can be shared across the entire application.
- Centralized rebroadcasting of "backend-died" and "backend-error"
signals emitted from cached EClient instances.
- Automatic cache invalidation when backends crash. The EClient
is discarded, and a new instance is created on the next request.