Devel Digest, Vol 27, Issue 2
Etan Reisner
pidgin at unreliablesource.net
Tue Jun 2 18:30:28 EDT 2009
On Tue, Jun 02, 2009 at 01:37:18PM -0400, Mike Jones wrote:
<snip>
> Ethan,
>
> Does pidgin have any API to allow plug-ins to communicate with other
> clients?
Yes, the mechanism is called "messages". Plugins can send them and react
to them. On protocols with built-in extension mechanisms (XMPP) plugins
can do more and use packets that would otherwise be ignored by pidgin to
the same purpose.
> I imagine that having Pidgin (or some separate plug-in) keep a list of
> which buddies have which clients & plug-ins (in the case of clients that
> allow plug-ins) would be useful for several plug-in projects.
This is, more or less, the basis behind XMPP XEP-0115 Entity Capabilities[1].
> I suppose that its not easy to implement that type of functionality over
> multiple protocols, but I can't help but think that there must be some way
> to make an API that allows for sending generic messages abstracted above the
> protocol level.
There is no "above the protocol level" on most protocols, and even if
there was for most protocols pidgin would avoid using it unless the
official clients were capable of doing it.
> I would be willing to work on that, if you think its something that
> would be beneficial. I've been studying the source-code for several months
> now. But if it would be impractical, than I suppose that it would silly to
> try.
There's nothing to work on, plugins that need to communicate their
existance on all protocols can do that with normal messages and normal
message contents (even to the extent of surpressing those messages when
they receive them, again see the OTR and pidgin-encryption plugins for
examples). For protocols with built-in extensions the plugins can use that
mechanism instead of signalling with normal messages.
> --Michael Jones
> Junior Software Engineering Student
> Rose-Hulman Institute of Technology
> CTO of JAM Customs LLC
- Etan
[1] http://xmpp.org/extensions/xep-0115.html
More information about the Devel
mailing list