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