Mercurial > pidgin
annotate plugins/perl/common/BuddyList_Group.xs @ 6922:1d994e9b81f9
[gaim-migrate @ 7469]
Group::buddies() now returns the actual buddies. Contacts changed
things slightly. I'll add contact support soon.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 24 Sep 2003 00:55:42 +0000 |
parents | fe0294504602 |
children | 7a8aa87164ae |
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 gaim_group_set_setting(group, key, value) | |
57 Gaim::BuddyList::Group group | |
58 const char *key | |
59 const char *value | |
60 | |
61 const char * | |
62 gaim_group_get_setting(group, key) | |
63 Gaim::BuddyList::Group group | |
64 const char *key | |
65 | |
66 void | |
67 buddies(group) | |
68 Gaim::BuddyList::Group group | |
69 PREINIT: | |
70 GaimBlistNode *node; | |
6922
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
71 GaimBlistNode *contact; |
6542 | 72 GaimBlistNode *_group = (GaimBlistNode *)group; |
73 PPCODE: | |
6922
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
74 for (contact = _group->child; contact != NULL; contact = contact->next) |
6542 | 75 { |
6922
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
76 for (node = contact->child; node != NULL; node = node->next) |
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
77 { |
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
78 XPUSHs(sv_2mortal(gaim_perl_bless_object(node, |
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
79 "Gaim::BuddyList::Buddy"))); |
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
80 } |
6542 | 81 } |
6922
1d994e9b81f9
[gaim-migrate @ 7469]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
82 |