[Bug 32844] New: Allow Gabble plugins to provide additional TpChannelManager implementations
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jan 5 12:23:22 CET 2011
https://bugs.freedesktop.org/show_bug.cgi?id=32844
Summary: Allow Gabble plugins to provide additional
TpChannelManager implementations
Product: Telepathy
Version: git master
Platform: Other
OS/Version: All
Status: NEW
Keywords: love
Severity: enhancement
Priority: medium
Component: gabble
AssignedTo: telepathy-bugs at lists.freedesktop.org
ReportedBy: will.thompson at collabora.co.uk
QAContact: telepathy-bugs at lists.freedesktop.org
Currently Gabble plugins can provide sidecars, and new statuses (using privacy
lists). They can't implement additional channel managers; nor are they notified
of connections' existence unless someone requests one of their sidecars.
Gabble hands a GPtrArray of implementations of TpChannelManager from its
_gabble_connection_create_channel_managers() function (which implements
create_channel_managers in TpBaseConnectionClass). A corresponding method could
be added to GabblePluginInterface:
typedef GPtrArray * (*GabblePluginCreateChannelManagersImpl) (
GabblePlugin *self,
GabbleConnection *connection);
struct _GabblePluginInterface {
// ...
GabblePluginCreateChannelManagersImpl create_channel_managers;
};
and a method would be added to GabblePluginLoader:
GPtrArray *gabble_plugin_loader_create_channel_managers (
GabblePluginLoader *self,
GabbleConnection *connection);
This function, rather like gabble_plugin_loader_create_sidecar, would iterate
across all plugins and, if present, call their create_channel_managers
implementation. It would concatenate all the results and return them. Then
_gabble_connection_create_channel_managers() could call this function and add
its result to the GPtrArray that it gives to tp-glib.
It'd be convenient to allow plugins to return NULL from
create_channel_managers, so plugins that wanted to piggy-back onto connections
without actually implementing any channel classes could implement this method,
get called for each new connection, and just return NULL.
(I would normally think that this method should return GList *, because
concatenating GPtrArrays is tedious and clumsy. Plus this gives us the
NULL-return thing for free, since the empty GList is just a NULL pointer. But
the telepathy-glib method at the top of it all wants a GPtrArray, so … I could
be convinced either way.)
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list