Mercurial > pidgin
annotate plugins/perl/common/BuddyList_Group.xs @ 10296:a7b2fd5efcf2
[gaim-migrate @ 11476]
Some "random updates" updates from patch 1077274 by Felipe Contreras:
"Some changes in the behaviour of slpcalls (for FT),
free some unused structures and properly close
switchboard connections."
Looks good to me, and seems to have fixed a mysterious FT problem that I had
been pretending didn't exist.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 02 Dec 2004 16:07:26 +0000 |
parents | 7a8aa87164ae |
children |
rev | line source |
---|---|
6542 | 1 #include "module.h" |
2 | |
3 MODULE = Gaim::BuddyList::Group PACKAGE = Gaim::BuddyList::Group PREFIX = gaim_group_ | |
4 PROTOTYPES: ENABLE | |
5 | |
6 Gaim::BuddyList::Group | |
7 new(name) | |
8 const char *name | |
9 CODE: | |
10 RETVAL = gaim_group_new(name); | |
11 OUTPUT: | |
12 RETVAL | |
13 | |
14 void | |
15 rename(group, new_name) | |
16 Gaim::BuddyList::Group group | |
17 const char *new_name | |
18 CODE: | |
19 gaim_blist_rename_group(group, new_name); | |
20 | |
21 void | |
22 get_accounts(group) | |
23 Gaim::BuddyList::Group group | |
24 PREINIT: | |
25 GSList *l; | |
26 PPCODE: | |
27 for (l = gaim_group_get_accounts(group); l != NULL; l = l->next) | |
28 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account"))); | |
29 | |
30 int | |
31 get_size(group, offline) | |
32 Gaim::BuddyList::Group group | |
33 gboolean offline | |
34 CODE: | |
35 RETVAL = gaim_blist_get_group_size(group, offline); | |
36 OUTPUT: | |
37 RETVAL | |
38 | |
39 const char * | |
40 get_name(group) | |
41 Gaim::BuddyList::Group group | |
42 CODE: | |
43 RETVAL = group->name; | |
44 OUTPUT: | |
45 RETVAL | |
46 | |
47 int | |
48 get_online_count(group) | |
49 Gaim::BuddyList::Group group | |
50 CODE: | |
51 RETVAL = gaim_blist_get_group_online_count(group); | |
52 OUTPUT: | |
53 RETVAL | |
54 | |
55 void | |
56 buddies(group) | |
57 Gaim::BuddyList::Group group | |
58 PREINIT: | |
59 GaimBlistNode *node; | |
6922
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
60 GaimBlistNode *contact; |
6542 | 61 GaimBlistNode *_group = (GaimBlistNode *)group; |
62 PPCODE: | |
6922
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
63 for (contact = _group->child; contact != NULL; contact = contact->next) |
6542 | 64 { |
6922
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
65 for (node = contact->child; node != NULL; node = node->next) |
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
66 { |
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
67 XPUSHs(sv_2mortal(gaim_perl_bless_object(node, |
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
68 "Gaim::BuddyList::Buddy"))); |
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
69 } |
6542 | 70 } |
6922
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
71 |