Mercurial > pidgin
annotate plugins/perl/common/BuddyList.xs @ 6801:b4fe4c1023c6
[gaim-migrate @ 7341]
Remove the "User does not have a MsnUser" error.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 10 Sep 2003 01:14:00 +0000 |
parents | 12169973c663 |
children | 18223e71ced7 |
rev | line source |
---|---|
6531 | 1 #include "module.h" |
2 | |
3 MODULE = Gaim::BuddyList PACKAGE = Gaim::BuddyList PREFIX = gaim_blist_ | |
4 PROTOTYPES: ENABLE | |
5 | |
6 void | |
7 gaim_blist_set_visible(show) | |
8 gboolean show | |
9 | |
10 void | |
11 add_buddy(buddy, group) | |
12 Gaim::BuddyList::Buddy buddy | |
13 Gaim::BuddyList::Group group | |
14 CODE: | |
6699
12169973c663
[gaim-migrate @ 7225]
Christian Hammond <chipx86@chipx86.com>
parents:
6545
diff
changeset
|
15 gaim_blist_add_buddy(buddy, NULL, group, NULL); |
6531 | 16 |
17 void | |
18 add_group(group) | |
19 Gaim::BuddyList::Group group | |
20 CODE: | |
21 gaim_blist_add_group(group, NULL); | |
22 | |
23 void | |
24 add_chat(chat, group) | |
25 Gaim::BuddyList::Chat chat | |
26 Gaim::BuddyList::Group group | |
27 CODE: | |
28 gaim_blist_add_chat(chat, group, NULL); | |
29 | |
30 void | |
31 gaim_blist_remove_buddy(buddy) | |
32 Gaim::BuddyList::Buddy buddy | |
33 | |
34 void | |
35 gaim_blist_remove_group(group) | |
36 Gaim::BuddyList::Group group | |
37 | |
38 void | |
39 gaim_blist_remove_chat(chat) | |
40 Gaim::BuddyList::Chat chat | |
41 | |
42 Gaim::BuddyList::Buddy | |
43 find_buddy(account, name) | |
44 Gaim::Account account | |
45 const char *name | |
46 CODE: | |
47 RETVAL = gaim_find_buddy(account, name); | |
48 OUTPUT: | |
49 RETVAL | |
50 | |
51 void | |
52 find_buddies(account, name) | |
53 Gaim::Account account | |
54 const char *name | |
55 PREINIT: | |
56 GSList *l; | |
57 PPCODE: | |
58 for (l = gaim_find_buddies(account, name); l != NULL; l = l->next) | |
59 { | |
60 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, | |
61 "Gaim::BuddyList::Buddy"))); | |
62 } | |
63 | |
64 g_slist_free(l); | |
65 | |
66 Gaim::BuddyList::Group | |
67 find_group(name) | |
68 const char *name | |
69 CODE: | |
70 RETVAL = gaim_find_group(name); | |
71 OUTPUT: | |
72 RETVAL | |
73 | |
74 Gaim::BuddyList::Chat | |
75 gaim_blist_find_chat(account, name) | |
76 Gaim::Account account | |
77 const char *name | |
78 | |
6540
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
79 void |
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
80 groups() |
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
81 PREINIT: |
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
82 GaimBlistNode *node; |
6544
a87b9c7d199e
[gaim-migrate @ 7066]
Christian Hammond <chipx86@chipx86.com>
parents:
6543
diff
changeset
|
83 PPCODE: |
6543
4d45f1eb0a7b
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
84 if (gaim_get_blist() != NULL) |
6540
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
85 { |
6543
4d45f1eb0a7b
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
86 for (node = gaim_get_blist()->root; node != NULL; node = node->next) |
4d45f1eb0a7b
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
87 { |
4d45f1eb0a7b
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
88 XPUSHs(sv_2mortal(gaim_perl_bless_object(node, |
4d45f1eb0a7b
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
89 "Gaim::BuddyList::Group"))); |
4d45f1eb0a7b
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
90 } |
6540
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
91 } |
6545
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
92 |
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
93 void * |
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
94 handle() |
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
95 CODE: |
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
96 RETVAL = gaim_blist_get_handle(); |
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
97 OUTPUT: |
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
98 RETVAL |