Mercurial > pidgin
annotate plugins/perl/common/Conversation.xs @ 12997:b4d2a8edba4a
[gaim-migrate @ 15350]
Here's my NEWS, in case we beta before I get back from dinner.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Sun, 22 Jan 2006 22:58:12 +0000 |
parents | 3ab3e68df807 |
children | ac98e3641df6 |
rev | line source |
---|---|
6591 | 1 #include "module.h" |
2 | |
12819
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
3 MODULE = Gaim::Conversation PACKAGE = Gaim PREFIX = gaim_ |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
4 PROTOTYPES: ENABLE |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
5 |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
6 void |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
7 gaim_get_ims() |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
8 PREINIT: |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
9 GList *l; |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
10 PPCODE: |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
11 for (l = gaim_get_ims(); l != NULL; l = l->next) { |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
12 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Conversation"))); |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
13 } |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
14 |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
15 void |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
16 gaim_get_conversations() |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
17 PREINIT: |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
18 GList *l; |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
19 PPCODE: |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
20 for (l = gaim_get_conversations(); l != NULL; l = l->next) { |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
21 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Conversation"))); |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
22 } |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
23 |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
24 void |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
25 gaim_get_chats() |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
26 PREINIT: |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
27 GList *l; |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
28 PPCODE: |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
29 for (l = gaim_get_chats(); l != NULL; l = l->next) { |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
30 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Conversation"))); |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
31 } |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
32 |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
33 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversations PREFIX = gaim_conversations_ |
11123 | 34 PROTOTYPES: ENABLE |
35 | |
36 void * | |
37 gaim_conversations_get_handle() | |
38 | |
11581 | 39 void |
11123 | 40 gaim_conversations_init() |
41 | |
42 void | |
11581 | 43 gaim_conversations_uninit() |
11123 | 44 |
12819
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
45 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation PREFIX = gaim_conversation_ |
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
46 PROTOTYPES: ENABLE |
11123 | 47 |
48 void | |
49 gaim_conversation_get_send_history(conv) | |
6591 | 50 Gaim::Conversation conv |
11123 | 51 PREINIT: |
52 GList *l; | |
53 PPCODE: | |
54 for (l = gaim_conversation_get_send_history(conv); l != NULL; l = l->next) { | |
12892
3ab3e68df807
[gaim-migrate @ 15245]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
55 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
11123 | 56 } |
57 | |
11581 | 58 void |
11123 | 59 gaim_conversation_destroy(conv) |
60 Gaim::Conversation conv | |
61 | |
11581 | 62 Gaim::ConversationType |
11123 | 63 gaim_conversation_get_type(conv) |
64 Gaim::Conversation conv | |
6591 | 65 |
66 Gaim::Account | |
67 gaim_conversation_get_account(conv) | |
68 Gaim::Conversation conv | |
69 | |
70 Gaim::Connection | |
71 gaim_conversation_get_gc(conv) | |
72 Gaim::Conversation conv | |
73 | |
11581 | 74 void |
11123 | 75 gaim_conversation_set_title(conv, title); |
6591 | 76 Gaim::Conversation conv |
11123 | 77 const char * title |
6591 | 78 |
11123 | 79 const char * |
80 gaim_conversation_get_title(conv) | |
81 Gaim::Conversation conv | |
82 | |
11581 | 83 void |
6591 | 84 gaim_conversation_autoset_title(conv) |
85 Gaim::Conversation conv | |
86 | |
11581 | 87 void |
11123 | 88 gaim_conversation_set_name(conv, name) |
89 Gaim::Conversation conv | |
90 const char *name | |
91 | |
6591 | 92 const char * |
93 gaim_conversation_get_name(conv) | |
94 Gaim::Conversation conv | |
11581 | 95 |
96 void | |
6591 | 97 gaim_conversation_set_logging(conv, log) |
98 Gaim::Conversation conv | |
99 gboolean log | |
100 | |
11581 | 101 gboolean |
6591 | 102 gaim_conversation_is_logging(conv) |
103 Gaim::Conversation conv | |
104 | |
105 Gaim::Conversation::IM | |
106 gaim_conversation_get_im_data(conv) | |
107 Gaim::Conversation conv | |
108 | |
109 Gaim::Conversation::Chat | |
110 gaim_conversation_get_chat_data(conv) | |
111 Gaim::Conversation conv | |
112 | |
11581 | 113 gpointer |
11123 | 114 gaim_conversation_get_data(conv, key) |
115 Gaim::Conversation conv | |
116 const char * key | |
6591 | 117 |
11581 | 118 Gaim::ConnectionFlags |
11123 | 119 gaim_conversation_get_features(conv) |
120 Gaim::Conversation conv | |
121 | |
11581 | 122 gboolean |
11123 | 123 gaim_conversation_has_focus(conv) |
124 Gaim::Conversation conv | |
125 | |
11581 | 126 void |
11123 | 127 gaim_conversation_update(conv, type) |
128 Gaim::Conversation conv | |
129 Gaim::ConvUpdateType type | |
11581 | 130 |
131 Gaim::Conversation | |
12364 | 132 gaim_conversation_new(class, type, account, name) |
11581 | 133 Gaim::ConversationType type |
11170 | 134 Gaim::Account account |
135 const char *name | |
12364 | 136 C_ARGS: |
137 type, account, name | |
11123 | 138 |
11581 | 139 void |
11170 | 140 gaim_conversation_set_account(conv, account); |
141 Gaim::Conversation conv | |
142 Gaim::Account account | |
11581 | 143 |
12340 | 144 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation::IM PREFIX = gaim_conv_im_ |
11123 | 145 PROTOTYPES: ENABLE |
146 | |
147 Gaim::Conversation | |
148 gaim_conv_im_get_conversation(im) | |
149 Gaim::Conversation::IM im | |
150 | |
11581 | 151 void |
11123 | 152 gaim_conv_im_set_icon(im, icon) |
153 Gaim::Conversation::IM im | |
154 Gaim::Buddy::Icon icon | |
155 | |
156 Gaim::Buddy::Icon | |
157 gaim_conv_im_get_icon(im) | |
158 Gaim::Conversation::IM im | |
159 | |
11581 | 160 void |
11123 | 161 gaim_conv_im_set_typing_state(im, state) |
162 Gaim::Conversation::IM im | |
163 Gaim::TypingState state | |
164 | |
11581 | 165 Gaim::TypingState |
11123 | 166 gaim_conv_im_get_typing_state(im) |
167 Gaim::Conversation::IM im | |
168 | |
11581 | 169 void |
11123 | 170 gaim_conv_im_start_typing_timeout(im, timeout) |
171 Gaim::Conversation::IM im | |
172 int timeout | |
173 | |
11581 | 174 void |
11123 | 175 gaim_conv_im_stop_typing_timeout(im) |
176 Gaim::Conversation::IM im | |
177 | |
11581 | 178 guint |
11123 | 179 gaim_conv_im_get_typing_timeout(im) |
180 Gaim::Conversation::IM im | |
181 | |
11581 | 182 void |
11123 | 183 gaim_conv_im_set_type_again(im, val) |
184 Gaim::Conversation::IM im | |
185 time_t val | |
186 | |
187 time_t | |
188 gaim_conv_im_get_type_again(im) | |
189 Gaim::Conversation::IM im | |
190 | |
11581 | 191 void |
11123 | 192 gaim_conv_im_start_type_again_timeout(im) |
193 Gaim::Conversation::IM im | |
194 | |
11581 | 195 void |
11123 | 196 gaim_conv_im_stop_type_again_timeout(im) |
197 Gaim::Conversation::IM im | |
198 | |
11581 | 199 guint |
11123 | 200 gaim_conv_im_get_type_again_timeout(im) |
201 Gaim::Conversation::IM im | |
202 | |
11581 | 203 void |
11123 | 204 gaim_conv_im_update_typing(im) |
205 Gaim::Conversation::IM im | |
206 | |
11581 | 207 void |
11123 | 208 gaim_conv_im_send(im, message) |
209 Gaim::Conversation::IM im | |
210 const char *message | |
211 | |
11581 | 212 void |
11170 | 213 gaim_conv_im_write(im, who, message, flags, mtime) |
214 Gaim::Conversation::IM im | |
215 const char *who | |
216 const char *message | |
217 Gaim::MessageFlags flags | |
218 time_t mtime | |
11123 | 219 |
12340 | 220 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation PREFIX = gaim_conv_ |
11123 | 221 PROTOTYPES: ENABLE |
222 | |
11581 | 223 gboolean |
11123 | 224 gaim_conv_present_error(who, account, what) |
225 const char *who | |
226 Gaim::Account account | |
12819
622110272ed9
[gaim-migrate @ 15167]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
227 const char *what |
11123 | 228 |
11581 | 229 void |
11123 | 230 gaim_conv_custom_smiley_close(conv, smile) |
231 Gaim::Conversation conv | |
232 const char *smile | |
233 | |
12340 | 234 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation::Chat PREFIX = gaim_conv_chat_ |
6591 | 235 PROTOTYPES: ENABLE |
236 | |
237 Gaim::Conversation | |
11123 | 238 gaim_conv_chat_get_conversation(chat) |
239 Gaim::Conversation::Chat chat | |
6591 | 240 |
11123 | 241 void |
242 gaim_conv_chat_set_users(chat, users) | |
243 Gaim::Conversation::Chat chat | |
244 SV * users | |
245 PREINIT: | |
246 GList *l, *t_GL; | |
247 int i, t_len; | |
248 PPCODE: | |
249 t_GL = NULL; | |
250 t_len = av_len((AV *)SvRV(users)); | |
6591 | 251 |
11123 | 252 for (i = 0; i < t_len; i++) { |
253 STRLEN t_sl; | |
254 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(users), i, 0), t_sl)); | |
255 } | |
6591 | 256 |
11123 | 257 for (l = gaim_conv_chat_set_users(chat, t_GL); l != NULL; l = l->next) { |
258 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
259 } | |
6591 | 260 |
261 void | |
11123 | 262 gaim_conv_chat_get_users(chat) |
263 Gaim::Conversation::Chat chat | |
264 PREINIT: | |
265 GList *l; | |
266 PPCODE: | |
267 for (l = gaim_conv_chat_get_users(chat); l != NULL; l = l->next) { | |
268 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
269 } | |
270 | |
11581 | 271 void |
11123 | 272 gaim_conv_chat_ignore(chat, name) |
273 Gaim::Conversation::Chat chat | |
274 const char *name | |
275 | |
11581 | 276 void |
11123 | 277 gaim_conv_chat_unignore(chat, name) |
278 Gaim::Conversation::Chat chat | |
279 const char *name | |
280 | |
11581 | 281 void |
11123 | 282 gaim_conv_chat_set_ignored(chat, ignored) |
283 Gaim::Conversation::Chat chat | |
284 SV * ignored | |
285 PREINIT: | |
286 GList *l, *t_GL; | |
287 int i, t_len; | |
288 PPCODE: | |
289 t_GL = NULL; | |
290 t_len = av_len((AV *)SvRV(ignored)); | |
291 | |
292 for (i = 0; i < t_len; i++) { | |
293 STRLEN t_sl; | |
294 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(ignored), i, 0), t_sl)); | |
295 } | |
296 | |
297 for (l = gaim_conv_chat_set_ignored(chat, t_GL); l != NULL; l = l->next) { | |
298 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
299 } | |
300 | |
301 void | |
302 gaim_conv_chat_get_ignored(chat) | |
303 Gaim::Conversation::Chat chat | |
6591 | 304 PREINIT: |
305 GList *l; | |
306 PPCODE: | |
11123 | 307 for (l = gaim_conv_chat_get_ignored(chat); l != NULL; l = l->next) { |
308 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
309 } | |
310 | |
311 const char * | |
312 gaim_conv_chat_get_topic(chat) | |
313 Gaim::Conversation::Chat chat | |
314 | |
11581 | 315 void |
11123 | 316 gaim_conv_chat_set_id(chat, id) |
317 Gaim::Conversation::Chat chat | |
318 int id | |
319 | |
11581 | 320 int |
11123 | 321 gaim_conv_chat_get_id(chat) |
322 Gaim::Conversation::Chat chat | |
323 | |
11581 | 324 void |
11123 | 325 gaim_conv_chat_send(chat, message) |
326 Gaim::Conversation::Chat chat | |
327 const char * message | |
328 | |
11581 | 329 void |
11456
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
330 gaim_conv_chat_add_users(chat, users, extra_msgs, flags, new_arrivals) |
11123 | 331 Gaim::Conversation::Chat chat |
332 SV * users | |
11456
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
333 SV * extra_msgs |
11123 | 334 SV * flags |
11456
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
335 gboolean new_arrivals |
11123 | 336 PREINIT: |
11456
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
337 GList *t_GL_users, *t_GL_extra_msgs, *t_GL_flags; |
11123 | 338 int i, t_len; |
339 PPCODE: | |
340 t_GL_users = NULL; | |
341 t_len = av_len((AV *)SvRV(users)); | |
342 | |
343 for (i = 0; i < t_len; i++) { | |
344 STRLEN t_sl; | |
345 t_GL_users = g_list_append(t_GL_users, SvPV(*av_fetch((AV *)SvRV(users), i, 0), t_sl)); | |
6591 | 346 } |
11123 | 347 |
348 t_GL_flags = NULL; | |
349 t_len = av_len((AV *)SvRV(flags)); | |
350 | |
351 for (i = 0; i < t_len; i++) { | |
352 STRLEN t_sl; | |
353 t_GL_flags = g_list_append(t_GL_flags, SvPV(*av_fetch((AV *)SvRV(flags), i, 0), t_sl)); | |
354 } | |
355 | |
11456
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
356 t_GL_extra_msgs = NULL; |
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
357 t_len = av_len((AV *)SvRV(extra_msgs)); |
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
358 |
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
359 for (i = 0; i < t_len; i++) { |
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
360 STRLEN t_sl; |
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
361 t_GL_extra_msgs = g_list_append(t_GL_extra_msgs, SvPV(*av_fetch((AV *)SvRV(extra_msgs), i, 0), t_sl)); |
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
362 } |
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
363 |
8dc405fa5856
[gaim-migrate @ 13695]
Richard Laager <rlaager@wiktel.com>
parents:
11290
diff
changeset
|
364 gaim_conv_chat_add_users(chat, t_GL_users, t_GL_extra_msgs, t_GL_flags, new_arrivals); |
11581 | 365 |
366 gboolean | |
11123 | 367 gaim_conv_chat_find_user(chat, user) |
368 Gaim::Conversation::Chat chat | |
369 const char * user | |
370 | |
371 void gaim_conv_chat_clear_users(chat) | |
372 Gaim::Conversation::Chat chat | |
373 | |
374 void gaim_conv_chat_set_nick(chat, nick) | |
375 Gaim::Conversation::Chat chat | |
376 const char * nick | |
377 | |
378 const char * | |
379 gaim_conv_chat_get_nick(chat) | |
380 Gaim::Conversation::Chat chat | |
381 | |
382 Gaim::Conversation | |
383 gaim_find_chat(gc, id) | |
384 Gaim::Connection gc | |
385 int id | |
386 | |
387 void gaim_conv_chat_left(chat) | |
388 Gaim::Conversation::Chat chat | |
389 | |
390 gboolean gaim_conv_chat_has_left(chat) | |
391 Gaim::Conversation::Chat chat | |
392 | |
393 Gaim::Conversation::ChatBuddy | |
394 gaim_conv_chat_cb_find(chat, name) | |
395 Gaim::Conversation::Chat chat | |
396 const char *name | |
397 | |
398 const char * | |
399 gaim_conv_chat_cb_get_name(cb) | |
400 Gaim::Conversation::ChatBuddy cb | |
401 | |
11581 | 402 void |
11123 | 403 gaim_conv_chat_cb_destroy(cb); |
404 Gaim::Conversation::ChatBuddy cb |