Bug 34181 - Reinstate per-status callbacks in TpChannelManager
Summary: Reinstate per-status callbacks in TpChannelManager
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 08:02 UTC by Will Thompson
Modified: 2019-12-03 20:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2011-02-11 08:02:25 UTC
TpChannelFactoryIface had callbacks for the different states a connection can move into (as discussed briefly on bug 17631). TpChannelManager doesn't, on the basis that you can use :status-changed. While that's true, it means that pretty much every single channel manager has code like this:


static void
connection_status_changed_cb (GabbleConnection *conn,
                              guint status,
                              guint reason,
                              GabbleFtManager *self)
{

  switch (status)
    {
      case TP_CONNECTION_STATUS_CONNECTING:
        g_signal_connect (self->priv->connection->jingle_factory,
            "new-session",
            G_CALLBACK (new_jingle_session_cb), self);
        break;

      case TP_CONNECTION_STATUS_DISCONNECTED:
        ft_manager_close_all (self);
        if (self->priv->status_changed_id != 0)
          {
            g_signal_handler_disconnect (self->priv->connection,
                self->priv->status_changed_id);
            self->priv->status_changed_id = 0;
          }
        break;
    }
}

It would be nice if we could use a signal detail to connect different callbacks to the different statuses. The signal's generated by dbus-glib, so I don't know how much this is going to fly.
Comment 1 GitLab Migration User 2019-12-03 20:37:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-glib/issues/57.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.