From c26c441d9acec8a214ed9a796df42167947db48a Mon Sep 17 00:00:00 2001 From: Ragner Magalhaes Date: Tue, 2 Dec 2008 21:12:01 +0000 Subject: [PATCH] Adding new function protocols_get_all() to Purple class Adding new function protocols_get_all to return a list of protocols Signed-off-by: Ragner Magalhaes Acked-by: Bruno Abinader Acked-by: Ricardo Guimaraes git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1422 596f6dd7-e928-0410-a184-9e12fd12cf7e --- purple.pyx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/purple.pyx b/purple.pyx index 88c86ad..26a972f 100644 --- a/purple.pyx +++ b/purple.pyx @@ -336,6 +336,19 @@ cdef class Purple: return account_list + def protocols_get_all(self): + cdef glib.GList *iter + cdef plugin.PurplePlugin *pp + + iter = plugin.c_purple_plugins_get_protocols() + protocol_list = [] + while iter: + pp = iter.data + if pp.info and pp.info.name: + protocol_list.append[Protocol(pp.info.id)] + iter = iter.next + return protocol_list + include "protocol.pyx" #include "plugin.pyx" include "proxy.pyx" -- 1.7.9.5