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