[Bug 32844] Allow Gabble plugins to provide additional TpChannelManager implementations
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Feb 14 13:32:15 CET 2011
https://bugs.freedesktop.org/show_bug.cgi?id=32844
--- Comment #2 from Will Thompson <will.thompson at collabora.co.uk> 2011-02-14 04:32:11 PST ---
Review for Jonny's implementation of this:
In gabble_plugin_loader_create_channel_managers:
+
+static void
+copy_to_other_array (gpointer data,
+ gpointer user_data)
+{
+ g_ptr_array_add (user_data, data);
+}
...
+ g_ptr_array_foreach (managers, copy_to_other_array, out);
+ g_ptr_array_free (managers, TRUE);
^^^^
In _gabble_connection_create_channel_managers:
+static void
+add_to_array (gpointer data,
+ gpointer user_data)
+{
+ g_ptr_array_add (user_data, data);
+}
+
...
+ g_ptr_array_foreach (tmp, add_to_array, channel_managers);
+ g_ptr_array_free (tmp, FALSE);
^^^^^
So you wrote this function twice, and one of your two implementations is buggy.
This is a pretty compelling argument for writing gabble_ptr_array_append() or
similar.
+ const gchar * const empty[] = { "omg", "hi mum!", NULL };
You have a new and interesting definition of empty.
You didn't add checking for this stuff to tests/twisted/sidecars.py (or I guess
to a new plugin — this isn't really to do with sidecars).
> Question[1]: I've removed the assertion that all channel managers are also
> GabbleCapsChannelManagers. Is this alright or shall we add this to the plugin
> API too? I'd say it's fine for now.
Sure, I think that's fine. (But yeah, we'll probably need this later.)
I suppose theoretically we should probably have a way to add this stuff to
<http://telepathy.freedesktop.org/spec/Protocol.html#Property:RequestableChannelClasses>,
too...
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the telepathy-bugs
mailing list