Added request_authorize/close_account_request.
[python-purple] / purple.pyx
index 8e4dde0..3686593 100644 (file)
@@ -331,7 +331,31 @@ cdef class Purple:
                 protocol_id = <char *> account.purple_account_get_protocol_id(acc)
 
                 if username != NULL and protocol_id != NULL:
-                    account_list.append(Account(self, username, protocol_id))
+                    account_list.append(Account(username, \
+                            Protocol(protocol_id), self))
+            iter = iter.next
+
+        return account_list
+
+    def accounts_get_all_active(self):
+        cdef glib.GList *iter
+        cdef account.PurpleAccount *acc
+        cdef char *username
+        cdef char *protocol_id
+
+        iter = account.purple_accounts_get_all_active()
+        account_list = []
+
+        while iter:
+            acc = <account.PurpleAccount *> iter.data
+
+            if <account.PurpleAccount *>acc:
+                username = <char *> account.purple_account_get_username(acc)
+                protocol_id = <char *> account.purple_account_get_protocol_id(acc)
+
+                if username != NULL and protocol_id != NULL:
+                    account_list.append(Account(username, \
+                            Protocol(protocol_id), self))
             iter = iter.next
 
         return account_list
@@ -345,7 +369,7 @@ cdef class Purple:
         while iter:
             pp = <plugin.PurplePlugin*> iter.data
             if pp.info and pp.info.name:
-                protocol_list.append[Protocol(pp.info.id)]
+                protocol_list.append(Protocol(pp.info.id))
             iter = iter.next
         return protocol_list