comparison plugins/perl/common/BuddyList.xs @ 10631:18223e71ced7

[gaim-migrate @ 12110] sf patch #975984, from Gregory C. Harfst Buddies added from a perl plugin were not being sent to the server. Also, added a hook to the function that returns all buddies for a given account. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 23 Feb 2005 04:31:38 +0000
parents 12169973c663
children cbd13a12d9be
comparison
equal deleted inserted replaced
10630:781a0582d35f 10631:18223e71ced7
6 void 6 void
7 gaim_blist_set_visible(show) 7 gaim_blist_set_visible(show)
8 gboolean show 8 gboolean show
9 9
10 void 10 void
11 add_buddy(buddy, group) 11 add_buddy(account, buddy, group)
12 Gaim::Account account
12 Gaim::BuddyList::Buddy buddy 13 Gaim::BuddyList::Buddy buddy
13 Gaim::BuddyList::Group group 14 Gaim::BuddyList::Group group
14 CODE: 15 CODE:
15 gaim_blist_add_buddy(buddy, NULL, group, NULL); 16 gaim_blist_add_buddy(buddy, NULL, group, NULL);
17 serv_add_buddy(gaim_account_get_connection(account), buddy);
16 18
17 void 19 void
18 add_group(group) 20 add_group(group)
19 Gaim::BuddyList::Group group 21 Gaim::BuddyList::Group group
20 CODE: 22 CODE:
61 "Gaim::BuddyList::Buddy"))); 63 "Gaim::BuddyList::Buddy")));
62 } 64 }
63 65
64 g_slist_free(l); 66 g_slist_free(l);
65 67
68 void
69 get_buddies(account)
70 Gaim::Account account
71 PREINIT:
72 GSList *l;
73 PPCODE:
74 for (l = gaim_get_account_buddies(account); l != NULL; l = l->next)
75 {
76 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data,
77 "Gaim::BuddyList::Buddy")));
78 }
79
80 g_slist_free(l);
81
66 Gaim::BuddyList::Group 82 Gaim::BuddyList::Group
67 find_group(name) 83 find_group(name)
68 const char *name 84 const char *name
69 CODE: 85 CODE:
70 RETVAL = gaim_find_group(name); 86 RETVAL = gaim_find_group(name);