libmsn-api plan

Ok,

This is a response to my previous post, since Tiago (libmsn’s author) replied and I think I should explain in more detail.

libmsn-api plan

libmsn-api plan

I think there should be a libmsn-api, in C, which is basically a bunch of .h files. Several things could implement this API, for example pymsn, which is written in Python, but with C bindings that implement this API it could be used by both telepathy-msn and pidgin-msn effortlessly. Of course, there’s already telepathy-butterfly, but there’s nothing that allows libpurple to use pymsn.

In a similar way libmsn could implement the exact same API. The only problem is that libmsn AFAIK doesn’t handle the connection stuff (sockets, proxy, ssl), some something else would need to handle that. In order to write a telepathy CM effortlessly in C, somebody should handle this connection stuff. That would be libim-util, which could be shared by libmsn-pecan and libmsn, and actually other protocols libraries could use the same library, like Skype.

One option which I’m depicting in the diagram, is to wrap libmsn and libim-util together and provide this connection functionality through the libmsn-api. This connection stuff is not required by libpurple since it already provides this connections stuff, however, it’s far from ideal, so it would be nice to have the option to use libim-util for that. This approach also has the advantage of making it easy to write standalone applications, like bots🙂

The other option would be to use libim-util directly from telepathy-msn, and remove that connection stuff from the libmsn-api.

Keep in mind that this is not just theoretical stuff, I’ve actually implemented simplified versions of many of these pieces, including the pymsn’s c wrapper.

The purpose is to give more options to the users, more users to the msn backends, and avoid the current situation where each msn application has it’s own msn implementation.

One thought on “libmsn-api plan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s