Mercurial > pidgin
annotate libgaim/plugins/perl/common/Conversation.xs @ 14717:b1fcd2fc903a
[gaim-migrate @ 17471]
Martijn van Beers provided some patches to rework the perl object
casting/blessing for signal instances in order to let the newly added jabber-*
signals work. This is those patches.
This is also a small whitespace change, a removal of the gaim debug message
about "Found plugin info" it was just pissing me off, and a renamespacing of
gaim_blist_node_get_extended_menu into Gaim::Blist::Node where it makes
slightly more sense.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Thu, 12 Oct 2006 20:38:47 +0000 |
parents | 60b1bc8dbf37 |
children |
rev | line source |
---|---|
14192 | 1 #include "module.h" |
2 | |
3 MODULE = Gaim::Conversation PACKAGE = Gaim PREFIX = gaim_ | |
4 PROTOTYPES: ENABLE | |
5 | |
6 void | |
7 gaim_get_ims() | |
8 PREINIT: | |
9 GList *l; | |
10 PPCODE: | |
11 for (l = gaim_get_ims(); l != NULL; l = l->next) { | |
12 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Conversation"))); | |
13 } | |
14 | |
15 void | |
16 gaim_get_conversations() | |
17 PREINIT: | |
18 GList *l; | |
19 PPCODE: | |
20 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
21 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Conversation"))); | |
22 } | |
23 | |
24 void | |
25 gaim_get_chats() | |
26 PREINIT: | |
27 GList *l; | |
28 PPCODE: | |
29 for (l = gaim_get_chats(); l != NULL; l = l->next) { | |
30 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Conversation"))); | |
31 } | |
32 | |
33 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversations PREFIX = gaim_conversations_ | |
34 PROTOTYPES: ENABLE | |
35 | |
14717
b1fcd2fc903a
[gaim-migrate @ 17471]
Etan Reisner <pidgin@unreliablesource.net>
parents:
14192
diff
changeset
|
36 Gaim::Handle |
14192 | 37 gaim_conversations_get_handle() |
38 | |
39 void | |
40 gaim_conversations_init() | |
41 | |
42 void | |
43 gaim_conversations_uninit() | |
44 | |
45 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation PREFIX = gaim_conversation_ | |
46 PROTOTYPES: ENABLE | |
47 | |
48 void | |
49 gaim_conversation_destroy(conv) | |
50 Gaim::Conversation conv | |
51 | |
52 Gaim::ConversationType | |
53 gaim_conversation_get_type(conv) | |
54 Gaim::Conversation conv | |
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 | |
64 void | |
65 gaim_conversation_set_title(conv, title); | |
66 Gaim::Conversation conv | |
67 const char * title | |
68 | |
69 const char * | |
70 gaim_conversation_get_title(conv) | |
71 Gaim::Conversation conv | |
72 | |
73 void | |
74 gaim_conversation_autoset_title(conv) | |
75 Gaim::Conversation conv | |
76 | |
77 void | |
78 gaim_conversation_set_name(conv, name) | |
79 Gaim::Conversation conv | |
80 const char *name | |
81 | |
82 const char * | |
83 gaim_conversation_get_name(conv) | |
84 Gaim::Conversation conv | |
85 | |
86 void | |
87 gaim_conversation_set_logging(conv, log) | |
88 Gaim::Conversation conv | |
89 gboolean log | |
90 | |
91 gboolean | |
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 | |
103 gpointer | |
104 gaim_conversation_get_data(conv, key) | |
105 Gaim::Conversation conv | |
106 const char * key | |
107 | |
108 Gaim::ConnectionFlags | |
109 gaim_conversation_get_features(conv) | |
110 Gaim::Conversation conv | |
111 | |
112 gboolean | |
113 gaim_conversation_has_focus(conv) | |
114 Gaim::Conversation conv | |
115 | |
116 void | |
117 gaim_conversation_update(conv, type) | |
118 Gaim::Conversation conv | |
119 Gaim::ConvUpdateType type | |
120 | |
121 Gaim::Conversation | |
122 gaim_conversation_new(class, type, account, name) | |
123 Gaim::ConversationType type | |
124 Gaim::Account account | |
125 const char *name | |
126 C_ARGS: | |
127 type, account, name | |
128 | |
129 void | |
130 gaim_conversation_set_account(conv, account); | |
131 Gaim::Conversation conv | |
132 Gaim::Account account | |
133 | |
134 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation::IM PREFIX = gaim_conv_im_ | |
135 PROTOTYPES: ENABLE | |
136 | |
137 Gaim::Conversation | |
138 gaim_conv_im_get_conversation(im) | |
139 Gaim::Conversation::IM im | |
140 | |
141 void | |
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 | |
150 void | |
151 gaim_conv_im_set_typing_state(im, state) | |
152 Gaim::Conversation::IM im | |
153 Gaim::TypingState state | |
154 | |
155 Gaim::TypingState | |
156 gaim_conv_im_get_typing_state(im) | |
157 Gaim::Conversation::IM im | |
158 | |
159 void | |
160 gaim_conv_im_start_typing_timeout(im, timeout) | |
161 Gaim::Conversation::IM im | |
162 int timeout | |
163 | |
164 void | |
165 gaim_conv_im_stop_typing_timeout(im) | |
166 Gaim::Conversation::IM im | |
167 | |
168 guint | |
169 gaim_conv_im_get_typing_timeout(im) | |
170 Gaim::Conversation::IM im | |
171 | |
172 void | |
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 | |
181 void | |
182 gaim_conv_im_start_send_typed_timeout(im) | |
183 Gaim::Conversation::IM im | |
184 | |
185 void | |
186 gaim_conv_im_stop_send_typed_timeout(im) | |
187 Gaim::Conversation::IM im | |
188 | |
189 guint | |
190 gaim_conv_im_get_send_typed_timeout(im) | |
191 Gaim::Conversation::IM im | |
192 | |
193 void | |
194 gaim_conv_im_update_typing(im) | |
195 Gaim::Conversation::IM im | |
196 | |
197 void | |
198 gaim_conv_im_send(im, message) | |
199 Gaim::Conversation::IM im | |
200 const char *message | |
201 | |
202 void | |
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 | |
209 | |
210 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation PREFIX = gaim_conv_ | |
211 PROTOTYPES: ENABLE | |
212 | |
213 gboolean | |
214 gaim_conv_present_error(who, account, what) | |
215 const char *who | |
216 Gaim::Account account | |
217 const char *what | |
218 | |
219 void | |
220 gaim_conv_custom_smiley_close(conv, smile) | |
221 Gaim::Conversation conv | |
222 const char *smile | |
223 | |
224 MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation::Chat PREFIX = gaim_conv_chat_ | |
225 PROTOTYPES: ENABLE | |
226 | |
227 Gaim::Conversation | |
228 gaim_conv_chat_get_conversation(chat) | |
229 Gaim::Conversation::Chat chat | |
230 | |
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)); | |
241 | |
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 } | |
246 | |
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 } | |
250 | |
251 void | |
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 | |
261 void | |
262 gaim_conv_chat_ignore(chat, name) | |
263 Gaim::Conversation::Chat chat | |
264 const char *name | |
265 | |
266 void | |
267 gaim_conv_chat_unignore(chat, name) | |
268 Gaim::Conversation::Chat chat | |
269 const char *name | |
270 | |
271 void | |
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 | |
294 PREINIT: | |
295 GList *l; | |
296 PPCODE: | |
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 | |
305 void | |
306 gaim_conv_chat_set_id(chat, id) | |
307 Gaim::Conversation::Chat chat | |
308 int id | |
309 | |
310 int | |
311 gaim_conv_chat_get_id(chat) | |
312 Gaim::Conversation::Chat chat | |
313 | |
314 void | |
315 gaim_conv_chat_send(chat, message) | |
316 Gaim::Conversation::Chat chat | |
317 const char * message | |
318 | |
319 void | |
320 gaim_conv_chat_write(chat, who, message, flags, mtime) | |
321 Gaim::Conversation::Chat chat | |
322 const char *who | |
323 const char *message | |
324 Gaim::MessageFlags flags | |
325 time_t mtime | |
326 | |
327 void | |
328 gaim_conv_chat_add_users(chat, users, extra_msgs, flags, new_arrivals) | |
329 Gaim::Conversation::Chat chat | |
330 SV * users | |
331 SV * extra_msgs | |
332 SV * flags | |
333 gboolean new_arrivals | |
334 PREINIT: | |
335 GList *t_GL_users, *t_GL_extra_msgs, *t_GL_flags; | |
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)); | |
344 } | |
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 | |
354 t_GL_extra_msgs = NULL; | |
355 t_len = av_len((AV *)SvRV(extra_msgs)); | |
356 | |
357 for (i = 0; i < t_len; i++) { | |
358 STRLEN t_sl; | |
359 t_GL_extra_msgs = g_list_append(t_GL_extra_msgs, SvPV(*av_fetch((AV *)SvRV(extra_msgs), i, 0), t_sl)); | |
360 } | |
361 | |
362 gaim_conv_chat_add_users(chat, t_GL_users, t_GL_extra_msgs, t_GL_flags, new_arrivals); | |
363 | |
364 gboolean | |
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 | |
400 void | |
401 gaim_conv_chat_cb_destroy(cb); | |
402 Gaim::Conversation::ChatBuddy cb |