- def account_add(self, username, protocol_id, host, port):
- if not self.account_verify(username):
- acc = purple.Account(username, protocol_id)
- self.__accounts[username] = acc
- if not account.purple_accounts_find(username, protocol_id):
- acc.proxy.set_type(purple.ProxyInfoType().HTTP)
- acc.proxy.set_host(host)
- acc.proxy.set_port(port)
- acc.save_into_xml()
-
- def account_verify(self, acc_username):
- if self.__accounts:
- for username in self.__accounts.keys():
- if acc_username == username:
- return self.__accounts[username]
- else:
- return None
-
-include "plugin.pyx"
+ return account_list
+
+ def protocols_get_all(self):
+ cdef glib.GList *iter
+ cdef plugin.PurplePlugin *pp
+
+ iter = plugin.purple_plugins_get_protocols()
+ protocol_list = []
+ while iter:
+ pp = <plugin.PurplePlugin*> 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"