Protocol Plugin for http based chat application.

Eion Robb eion at
Wed Oct 19 15:11:59 EDT 2011

Hi there,

I've written a few protocol plugins that connect to HTTP services.  Feel
free to use them as examples on how to write your own plugin:

Just to be curious, what's the 'chat application' you're writing the plugin

On 20 October 2011 03:04, karthik kumar <kumarkarthikn at> wrote:

> Hi,
>     I am newbie here. I have been trying to create a protocol plugin for
> our chat application which is based on http. I have gone through the
> document 'Pidgin C How to' and libpurple/protocol/null  and few other
> protocol plugins. I have some questions.
> 1. What's exactly a protocol plugin - it contains definitions of events or
> actions like incoming_im_msg()  buddy_comes_online() and so on for our own
> protocol (http). Protocol plugin is loaded and keeps running waiting for
> incoming_im_msg() and other events which we have defined. If an event
> happens it sends out signal to UI. AM I Correct ????
Kinda.  Unlike a normal plugin, a protocol plugin can be run multiple times,
after a user adds a new account that uses that protocol plugin and can add
multiple accounts with that plugin.  It sets up the PurplePluginProtocolInfo
struct with functions that the UI (Pidgin/Adium/InstantBird etc) will call
when it wants to perform certain actions, like make the account go offline.
 The plugin can be loaded when the UI starts, but won't necessairly need to
listen to events from the server until the account has gone online.

> 2. I am not sure on what to write on  protocol plugin with C program.
>     curl  url  -> gives me an xml it contains event type and
> data.(event=incoming chat, msg=xxxxxx)
>     parse the xml and get the event and msg.
If it's an xml response, it's much easier to handle in libpurple than JSON,
since libpurple has an xml parser built in.  Have a look at

>  Can someone give me a small idea of what needs to be done for this to be
> written on C program.
> Thanks
> Karthik.
> _______________________________________________
> Devel mailing list
> Devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Devel mailing list