cdef char *id = NULL
cdef char *name = NULL
+ status_types = []
if self.__exists:
- status_types = []
iter = account.purple_account_get_status_types(self._get_structure())
while iter:
c_statustype = <status.PurpleStatusType *> iter.data
name = <char *> status.purple_status_type_get_name(c_statustype)
status_types.append((id, name))
iter = iter.next
- return status_types
- else:
- return None
+
+ return status_types
status_types = property(__get_status_types)
cdef blist.PurpleBuddy *c_buddy = NULL
cdef char *c_alias = NULL
+ buddies_list = []
if self.__exists and \
account.purple_account_is_connected(self._get_structure()):
iter = blist.purple_find_buddies(self._get_structure(), NULL)
- buddies_list = []
while iter:
c_alias = NULL
c_buddy = <blist.PurpleBuddy *> iter.data
buddies_list.append(new_buddy)
iter = iter.next
- return buddies_list
- else:
- return None
+
+ return buddies_list
def get_buddies(self):
"""
cdef blist.PurpleBuddy *c_buddy = NULL
cdef char *c_alias = NULL
+ buddies_list = []
if self.__exists:
iter = blist.purple_find_buddies(self._get_structure(), NULL)
- buddies_list = []
while iter:
c_alias = NULL
c_buddy = <blist.PurpleBuddy *> iter.data
buddies_list.append(new_buddy)
iter = iter.next
- return buddies_list
- else:
- return None
+
+ return buddies_list
def request_add_buddy(self, buddy_username, buddy_alias):
if buddy_alias: