X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=plugin.pyx;h=62182276d078a7d38a7da90584dae04b4e84efb8;hp=a4ef02f3aff4270a50f389d85be5b997a274c01b;hb=ffc27697967c201734f3d950071760b94c1c2fa7;hpb=23bbccf4aeb7b092ae26a90f05c1ced78b512295 diff --git a/plugin.pyx b/plugin.pyx index a4ef02f..6218227 100644 --- a/plugin.pyx +++ b/plugin.pyx @@ -34,6 +34,22 @@ cdef class Plugin: def get_id(self): return self.c_plugin.info.id + def get_all(self): + ''' @return A string list of protocols' (id, name) ''' + ''' [('prpl-jabber', 'XMPP'), ('foo', 'MSN'), ...] ''' + cdef glib.GList *iter + cdef plugin.PurplePlugin *pp + + protocols = [] + + iter = plugin.c_purple_plugins_get_protocols() + while iter: + pp = iter.data + if pp.info and pp.info.name: + protocols.append((pp.info.id, pp.info.name)) + iter = iter.next + + return protocols cdef class Plugins: