Do ChannelManagers need a _close_all callback?
@wjt
Submitted by Will Thompson Assigned to Will Thompson @wjt
Description
TpIfaceChannelFactory has a close_all() method, which is called by TpBaseConnection before the connection moves to state Disconnected.
Currently, TpChannelManager does not have a corresponding method; instances are expected to listen for the TpSvcConnection::status-changed signal and close their channels when the connection moves to Disconnected. But this reverses the "Channels all close; Connection goes to Disconnected" ordering.
If this matters, we could either create tp_channel_manager_close_all(), or add a TpBaseConnection::disconnect-imminent(guint reason) signal, both of which would allow channels to be closed (or possibly change Group membership, as appropriate) before StatusChanged appears on the bus.
Simon says:
TpChannel will do the right thing even if the Channel Closed signal never comes (it'll become invalidated with an error in domain TP_ERRORS_DISCONNECTED whose code is a TpConnectionStatusChangedReason, I believe - and that's at least as informative as anything the Channel could come up with on its own!) so perhaps we don't need that.