Mercurial > pidgin
annotate plugins/perl/common/Conversation_Chat.xs @ 6984:38a767776cb2
[gaim-migrate @ 7540]
I heart windows.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 27 Sep 2003 20:49:59 +0000 |
parents | adae69366f75 |
children | b14a7bc189b8 |
rev | line source |
---|---|
6591 | 1 #include "module.h" |
2 | |
3 MODULE = Gaim::Conversation::Chat PACKAGE = Gaim::Conversation::Chat PREFIX = gaim_chat_ | |
4 PROTOTYPES: ENABLE | |
5 | |
6 Gaim::Conversation::Chat | |
7 new(account, name) | |
8 Gaim::Account account | |
9 const char *name | |
10 CODE: | |
11 RETVAL = GAIM_CHAT(gaim_conversation_new(GAIM_CONV_CHAT, account, name)); | |
12 OUTPUT: | |
13 RETVAL | |
14 | |
15 void | |
16 DESTROY(chat) | |
17 Gaim::Conversation::Chat chat | |
18 CODE: | |
19 gaim_conversation_destroy(gaim_chat_get_conversation(chat)); | |
20 | |
21 | |
22 Gaim::Conversation | |
23 gaim_chat_get_conversation(chat) | |
24 Gaim::Conversation::Chat chat | |
25 | |
26 void | |
27 users(chat) | |
28 Gaim::Conversation::Chat chat | |
29 PREINIT: | |
30 GList *l; | |
31 PPCODE: | |
32 for (l = gaim_chat_get_users(chat); l != NULL; l = l->next) | |
33 { | |
34 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); | |
35 } | |
36 | |
37 void | |
38 gaim_chat_ignore(chat, name) | |
39 Gaim::Conversation::Chat chat | |
40 const char *name | |
41 | |
42 void | |
43 gaim_chat_unignore(chat, name) | |
44 Gaim::Conversation::Chat chat | |
45 const char *name | |
46 | |
47 void | |
48 ignored_users(chat) | |
49 Gaim::Conversation::Chat chat | |
50 PREINIT: | |
51 GList *l; | |
52 PPCODE: | |
53 for (l = gaim_chat_get_ignored(chat); l != NULL; l = l->next) | |
54 { | |
55 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); | |
56 } | |
57 | |
58 gboolean | |
59 gaim_chat_is_user_ignored(chat, user) | |
60 Gaim::Conversation::Chat chat | |
61 const char *user | |
62 | |
63 void | |
64 gaim_chat_set_topic(chat, who, topic) | |
65 Gaim::Conversation::Chat chat | |
66 const char *who | |
67 const char *topic | |
68 | |
69 const char * | |
70 gaim_chat_get_topic(chat) | |
71 Gaim::Conversation::Chat chat | |
72 | |
73 int | |
74 gaim_chat_get_id(chat) | |
75 Gaim::Conversation::Chat chat | |
76 | |
77 void | |
6615
a3602428ff53
[gaim-migrate @ 7139]
Christian Hammond <chipx86@chipx86.com>
parents:
6614
diff
changeset
|
78 write(chat, who, message, flags) |
6591 | 79 Gaim::Conversation::Chat chat |
80 const char *who | |
81 const char *message | |
82 int flags | |
6615
a3602428ff53
[gaim-migrate @ 7139]
Christian Hammond <chipx86@chipx86.com>
parents:
6614
diff
changeset
|
83 CODE: |
6617
cec2e26b7430
[gaim-migrate @ 7141]
Christian Hammond <chipx86@chipx86.com>
parents:
6616
diff
changeset
|
84 gaim_chat_write(chat, who, message, flags, time(NULL)); |
6591 | 85 |
86 void | |
87 gaim_chat_send(chat, message) | |
88 Gaim::Conversation::Chat chat | |
89 const char *message | |
90 | |
91 | |
6618
adae69366f75
[gaim-migrate @ 7142]
Christian Hammond <chipx86@chipx86.com>
parents:
6617
diff
changeset
|
92 MODULE = Gaim::Conversation::Chat PACKAGE = Gaim PREFIX = gaim_ |
6591 | 93 PROTOTYPES: ENABLE |
94 | |
95 void | |
96 chats() | |
97 PREINIT: | |
98 GList *l; | |
99 PPCODE: | |
100 for (l = gaim_get_chats(); l != NULL; l = l->next) | |
101 { | |
102 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, | |
103 "Gaim::Conversation"))); | |
104 } |