Thu, 11 Aug 2005 07:56:29 +0000
[gaim-migrate @ 13372]
committing crazychat again. hopefully here to stay.
| 6591 | 1 | #include "module.h" |
| 2 | ||
| 11123 | 3 | /**********************XS Code for Conversation.xs*********************************/ |
| 4 | MODULE = Gaim::Conv PACKAGE = Gaim::Conv::Window PREFIX = gaim_conv_window_ | |
| 6591 | 5 | PROTOTYPES: ENABLE |
| 6 | ||
| 11123 | 7 | void |
| 8 | gaim_conversations_set_win_ui_ops(ops) | |
| 9 | Gaim::ConvWindow::UiOps ops | |
| 10 | ||
| 11 | Gaim::ConvWindow::UiOps | |
| 12 | gaim_conversations_get_win_ui_ops() | |
| 13 | ||
| 6591 | 14 | void |
| 11123 | 15 | gaim_conv_window_get_conversations(win) |
| 16 | Gaim::ConvWindow win | |
| 17 | PREINIT: | |
| 18 | GList *l; | |
| 19 | PPCODE: | |
| 20 | for (l = gaim_conv_window_get_conversations(win); l != NULL; l = l->next) { | |
| 21 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 22 | } | |
| 23 | ||
| 24 | Gaim::ConvWindow | |
| 25 | gaim_conv_window_new() | |
| 26 | ||
| 27 | void | |
| 28 | gaim_conv_window_destroy(win) | |
| 29 | Gaim::ConvWindow win | |
| 30 | ||
| 31 | void | |
| 32 | gaim_conv_window_show(win) | |
| 33 | Gaim::ConvWindow win | |
| 34 | ||
| 35 | void | |
| 36 | gaim_conv_window_hide(win) | |
| 37 | Gaim::ConvWindow win | |
| 38 | ||
| 39 | void | |
| 40 | gaim_conv_window_raise(win) | |
| 41 | Gaim::ConvWindow win | |
| 42 | ||
| 43 | size_t | |
| 44 | gaim_conv_window_get_conversation_count(win) | |
| 45 | Gaim::ConvWindow win | |
| 46 | ||
| 47 | gboolean | |
| 48 | gaim_conv_window_has_focus(win) | |
| 49 | Gaim::ConvWindow win | |
| 50 | ||
| 51 | Gaim::ConvWindow::UiOps | |
| 52 | gaim_conv_window_get_ui_ops(win) | |
| 53 | Gaim::ConvWindow win | |
| 54 | ||
| 55 | Gaim::ConvWindow | |
| 56 | get_first_window_with_type(type) | |
| 57 | Gaim::ConversationType type | |
| 58 | CODE: | |
| 59 | RETVAL = gaim_get_first_window_with_type(type); | |
| 60 | OUTPUT: | |
| 61 | RETVAL | |
| 62 | ||
| 63 | Gaim::ConvWindow | |
| 64 | get_last_window_with_type(type) | |
| 65 | Gaim::ConversationType type | |
| 66 | CODE: | |
| 67 | RETVAL = gaim_get_last_window_with_type(type); | |
| 68 | OUTPUT: | |
| 69 | RETVAL | |
| 70 | ||
| 11170 | 71 | int |
| 72 | gaim_conv_window_add_conversation(win, conv) | |
| 73 | Gaim::ConvWindow win | |
| 74 | Gaim::Conversation conv | |
| 11123 | 75 | |
| 76 | ||
| 77 | MODULE = Gaim::Conv PACKAGE = Gaim::Conv PREFIX = gaim_conversation_ | |
| 78 | PROTOTYPES: ENABLE | |
| 79 | ||
| 80 | void * | |
| 81 | gaim_conversations_get_handle() | |
| 82 | ||
| 83 | void | |
| 84 | gaim_conversations_init() | |
| 85 | ||
| 86 | void | |
| 87 | gaim_conversations_uninit() | |
| 88 | ||
| 89 | void | |
| 90 | gaim_conv_placement_get_options() | |
| 91 | PREINIT: | |
| 92 | GList *l; | |
| 93 | PPCODE: | |
| 94 | for (l = gaim_conv_placement_get_options(); l != NULL; l = l->next) { | |
| 95 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 96 | } | |
| 97 | ||
| 98 | ||
| 99 | void | |
| 100 | get_ims() | |
| 101 | PREINIT: | |
| 102 | GList *l; | |
| 103 | PPCODE: | |
| 104 | for (l = gaim_get_ims(); l != NULL; l = l->next) { | |
| 105 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 106 | } | |
| 107 | ||
| 108 | void | |
| 109 | get_conversations() | |
| 110 | PREINIT: | |
| 111 | GList *l; | |
| 112 | PPCODE: | |
| 113 | for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
| 114 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 115 | } | |
| 116 | ||
| 117 | void | |
| 118 | get_windows() | |
| 119 | PREINIT: | |
| 120 | GList *l; | |
| 121 | PPCODE: | |
| 122 | for (l = gaim_get_windows(); l != NULL; l = l->next) { | |
| 123 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 124 | } | |
| 125 | ||
| 126 | void | |
| 127 | get_chats() | |
| 128 | PREINIT: | |
| 129 | GList *l; | |
| 130 | PPCODE: | |
| 131 | for (l = gaim_get_chats(); l != NULL; l = l->next) { | |
| 132 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 133 | } | |
| 134 | ||
| 135 | void | |
| 136 | gaim_conversation_get_send_history(conv) | |
| 6591 | 137 | Gaim::Conversation conv |
| 11123 | 138 | PREINIT: |
| 139 | GList *l; | |
| 140 | PPCODE: | |
| 141 | for (l = gaim_conversation_get_send_history(conv); l != NULL; l = l->next) { | |
| 142 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 143 | } | |
| 144 | ||
| 145 | void | |
| 146 | gaim_conversation_destroy(conv) | |
| 147 | Gaim::Conversation conv | |
| 148 | ||
| 149 | Gaim::ConversationType | |
| 150 | gaim_conversation_get_type(conv) | |
| 151 | Gaim::Conversation conv | |
| 6591 | 152 | |
| 153 | Gaim::Account | |
| 154 | gaim_conversation_get_account(conv) | |
| 155 | Gaim::Conversation conv | |
| 156 | ||
| 157 | Gaim::Connection | |
| 158 | gaim_conversation_get_gc(conv) | |
| 159 | Gaim::Conversation conv | |
| 160 | ||
| 11123 | 161 | void |
| 162 | gaim_conversation_set_title(conv, title); | |
| 6591 | 163 | Gaim::Conversation conv |
| 11123 | 164 | const char * title |
| 6591 | 165 | |
| 11123 | 166 | const char * |
| 167 | gaim_conversation_get_title(conv) | |
| 168 | Gaim::Conversation conv | |
| 169 | ||
| 170 | void | |
| 6591 | 171 | gaim_conversation_autoset_title(conv) |
| 172 | Gaim::Conversation conv | |
| 173 | ||
| 11123 | 174 | Gaim::UnseenState |
| 175 | gaim_conversation_get_unseen(conv) | |
| 176 | Gaim::Conversation conv | |
| 177 | ||
| 178 | void | |
| 179 | gaim_conversation_set_name(conv, name) | |
| 180 | Gaim::Conversation conv | |
| 181 | const char *name | |
| 182 | ||
| 6591 | 183 | const char * |
| 184 | gaim_conversation_get_name(conv) | |
| 185 | Gaim::Conversation conv | |
| 11123 | 186 | |
| 187 | void | |
| 6591 | 188 | gaim_conversation_set_logging(conv, log) |
| 189 | Gaim::Conversation conv | |
| 190 | gboolean log | |
| 191 | ||
| 11123 | 192 | gboolean |
| 6591 | 193 | gaim_conversation_is_logging(conv) |
| 194 | Gaim::Conversation conv | |
| 195 | ||
| 11123 | 196 | |
| 6591 | 197 | Gaim::ConvWindow |
| 198 | gaim_conversation_get_window(conv) | |
| 199 | Gaim::Conversation conv | |
| 200 | ||
| 201 | Gaim::Conversation::IM | |
| 202 | gaim_conversation_get_im_data(conv) | |
| 203 | Gaim::Conversation conv | |
| 204 | ||
| 205 | Gaim::Conversation::Chat | |
| 206 | gaim_conversation_get_chat_data(conv) | |
| 207 | Gaim::Conversation conv | |
| 208 | ||
| 11123 | 209 | gpointer |
| 210 | gaim_conversation_get_data(conv, key) | |
| 211 | Gaim::Conversation conv | |
| 212 | const char * key | |
| 6591 | 213 | |
| 11123 | 214 | Gaim::ConnectionFlags |
| 215 | gaim_conversation_get_features(conv) | |
| 216 | Gaim::Conversation conv | |
| 217 | ||
| 218 | void | |
| 219 | gaim_conversation_update_progress(conv, percent) | |
| 220 | Gaim::Conversation conv | |
| 221 | float percent | |
| 222 | ||
| 223 | gboolean | |
| 224 | gaim_conversation_has_focus(conv) | |
| 225 | Gaim::Conversation conv | |
| 226 | ||
| 227 | void | |
| 228 | gaim_conversation_update(conv, type) | |
| 229 | Gaim::Conversation conv | |
| 230 | Gaim::ConvUpdateType type | |
| 11170 | 231 | |
| 232 | Gaim::Conversation | |
| 233 | gaim_conversation_new(type, account, name) | |
| 234 | Gaim::ConversationType type | |
| 235 | Gaim::Account account | |
| 236 | const char *name | |
| 11123 | 237 | |
| 11170 | 238 | void |
| 239 | gaim_conversation_set_account(conv, account); | |
| 240 | Gaim::Conversation conv | |
| 241 | Gaim::Account account | |
| 242 | ||
| 11123 | 243 | |
| 244 | ||
| 245 | MODULE = Gaim::Conv PACKAGE = Gaim::Conv::IM PREFIX = gaim_conv_im_ | |
| 246 | PROTOTYPES: ENABLE | |
| 247 | ||
| 248 | Gaim::Conversation | |
| 249 | gaim_conv_im_get_conversation(im) | |
| 250 | Gaim::Conversation::IM im | |
| 251 | ||
| 252 | void | |
| 253 | gaim_conv_im_set_icon(im, icon) | |
| 254 | Gaim::Conversation::IM im | |
| 255 | Gaim::Buddy::Icon icon | |
| 256 | ||
| 257 | Gaim::Buddy::Icon | |
| 258 | gaim_conv_im_get_icon(im) | |
| 259 | Gaim::Conversation::IM im | |
| 260 | ||
| 261 | void | |
| 262 | gaim_conv_im_set_typing_state(im, state) | |
| 263 | Gaim::Conversation::IM im | |
| 264 | Gaim::TypingState state | |
| 265 | ||
| 266 | Gaim::TypingState | |
| 267 | gaim_conv_im_get_typing_state(im) | |
| 268 | Gaim::Conversation::IM im | |
| 269 | ||
| 270 | void | |
| 271 | gaim_conv_im_start_typing_timeout(im, timeout) | |
| 272 | Gaim::Conversation::IM im | |
| 273 | int timeout | |
| 274 | ||
| 275 | void | |
| 276 | gaim_conv_im_stop_typing_timeout(im) | |
| 277 | Gaim::Conversation::IM im | |
| 278 | ||
| 279 | guint | |
| 280 | gaim_conv_im_get_typing_timeout(im) | |
| 281 | Gaim::Conversation::IM im | |
| 282 | ||
| 283 | void | |
| 284 | gaim_conv_im_set_type_again(im, val) | |
| 285 | Gaim::Conversation::IM im | |
| 286 | time_t val | |
| 287 | ||
| 288 | time_t | |
| 289 | gaim_conv_im_get_type_again(im) | |
| 290 | Gaim::Conversation::IM im | |
| 291 | ||
| 292 | void | |
| 293 | gaim_conv_im_start_type_again_timeout(im) | |
| 294 | Gaim::Conversation::IM im | |
| 295 | ||
| 296 | void | |
| 297 | gaim_conv_im_stop_type_again_timeout(im) | |
| 298 | Gaim::Conversation::IM im | |
| 299 | ||
| 300 | guint | |
| 301 | gaim_conv_im_get_type_again_timeout(im) | |
| 302 | Gaim::Conversation::IM im | |
| 303 | ||
| 304 | ||
| 305 | void | |
| 306 | gaim_conv_im_update_typing(im) | |
| 307 | Gaim::Conversation::IM im | |
| 308 | ||
| 309 | ||
| 310 | void | |
| 311 | gaim_conv_im_send(im, message) | |
| 312 | Gaim::Conversation::IM im | |
| 313 | const char *message | |
| 314 | ||
| 11170 | 315 | void |
| 316 | gaim_conv_im_write(im, who, message, flags, mtime) | |
| 317 | Gaim::Conversation::IM im | |
| 318 | const char *who | |
| 319 | const char *message | |
| 320 | Gaim::MessageFlags flags | |
| 321 | time_t mtime | |
| 11123 | 322 | |
| 323 | ||
| 324 | MODULE = Gaim::Conv PACKAGE = Gaim::Conv PREFIX = gaim_conv_ | |
| 325 | PROTOTYPES: ENABLE | |
| 326 | ||
| 327 | gboolean | |
| 328 | gaim_conv_present_error(who, account, what) | |
| 329 | const char *who | |
| 330 | Gaim::Account account | |
| 331 | const char *what | |
| 332 | ||
| 333 | void | |
| 334 | gaim_conv_custom_smiley_close(conv, smile) | |
| 335 | Gaim::Conversation conv | |
| 336 | const char *smile | |
| 337 | ||
| 338 | ||
| 339 | ||
| 340 | ||
| 341 | ||
| 342 | ||
| 343 | MODULE = Gaim::Conv PACKAGE = Gaim::Conv::Chat PREFIX = gaim_conv_chat_ | |
| 6591 | 344 | PROTOTYPES: ENABLE |
| 345 | ||
| 346 | Gaim::Conversation | |
| 11123 | 347 | gaim_conv_chat_get_conversation(chat) |
| 348 | Gaim::Conversation::Chat chat | |
| 6591 | 349 | |
| 11123 | 350 | void |
| 351 | gaim_conv_chat_set_users(chat, users) | |
| 352 | Gaim::Conversation::Chat chat | |
| 353 | SV * users | |
| 354 | PREINIT: | |
| 355 | GList *l, *t_GL; | |
| 356 | int i, t_len; | |
| 357 | PPCODE: | |
| 358 | t_GL = NULL; | |
| 359 | t_len = av_len((AV *)SvRV(users)); | |
| 6591 | 360 | |
| 11123 | 361 | for (i = 0; i < t_len; i++) { |
| 362 | STRLEN t_sl; | |
| 363 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(users), i, 0), t_sl)); | |
| 364 | } | |
| 6591 | 365 | |
| 11123 | 366 | for (l = gaim_conv_chat_set_users(chat, t_GL); l != NULL; l = l->next) { |
| 367 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 368 | } | |
| 6591 | 369 | |
| 370 | void | |
| 11123 | 371 | gaim_conv_chat_get_users(chat) |
| 372 | Gaim::Conversation::Chat chat | |
| 373 | PREINIT: | |
| 374 | GList *l; | |
| 375 | PPCODE: | |
| 376 | for (l = gaim_conv_chat_get_users(chat); l != NULL; l = l->next) { | |
| 377 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 378 | } | |
| 379 | ||
| 380 | void | |
| 381 | gaim_conv_chat_ignore(chat, name) | |
| 382 | Gaim::Conversation::Chat chat | |
| 383 | const char *name | |
| 384 | ||
| 385 | void | |
| 386 | gaim_conv_chat_unignore(chat, name) | |
| 387 | Gaim::Conversation::Chat chat | |
| 388 | const char *name | |
| 389 | ||
| 390 | void | |
| 391 | gaim_conv_chat_set_ignored(chat, ignored) | |
| 392 | Gaim::Conversation::Chat chat | |
| 393 | SV * ignored | |
| 394 | PREINIT: | |
| 395 | GList *l, *t_GL; | |
| 396 | int i, t_len; | |
| 397 | PPCODE: | |
| 398 | t_GL = NULL; | |
| 399 | t_len = av_len((AV *)SvRV(ignored)); | |
| 400 | ||
| 401 | for (i = 0; i < t_len; i++) { | |
| 402 | STRLEN t_sl; | |
| 403 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(ignored), i, 0), t_sl)); | |
| 404 | } | |
| 405 | ||
| 406 | for (l = gaim_conv_chat_set_ignored(chat, t_GL); l != NULL; l = l->next) { | |
| 407 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 408 | } | |
| 409 | ||
| 410 | void | |
| 411 | gaim_conv_chat_get_ignored(chat) | |
| 412 | Gaim::Conversation::Chat chat | |
| 6591 | 413 | PREINIT: |
| 414 | GList *l; | |
| 415 | PPCODE: | |
| 11123 | 416 | for (l = gaim_conv_chat_get_ignored(chat); l != NULL; l = l->next) { |
| 417 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 418 | } | |
| 419 | ||
| 420 | const char * | |
| 421 | gaim_conv_chat_get_topic(chat) | |
| 422 | Gaim::Conversation::Chat chat | |
| 423 | ||
| 424 | ||
| 425 | ||
| 426 | void | |
| 427 | gaim_conv_chat_set_id(chat, id) | |
| 428 | Gaim::Conversation::Chat chat | |
| 429 | int id | |
| 430 | ||
| 431 | int | |
| 432 | gaim_conv_chat_get_id(chat) | |
| 433 | Gaim::Conversation::Chat chat | |
| 434 | ||
| 435 | void | |
| 436 | gaim_conv_chat_send(chat, message) | |
| 437 | Gaim::Conversation::Chat chat | |
| 438 | const char * message | |
| 439 | ||
| 440 | void | |
| 441 | gaim_conv_chat_add_users(chat, users, flags) | |
| 442 | Gaim::Conversation::Chat chat | |
| 443 | SV * users | |
| 444 | SV * flags | |
| 445 | PREINIT: | |
| 446 | GList *t_GL_users, *t_GL_flags; | |
| 447 | int i, t_len; | |
| 448 | PPCODE: | |
| 449 | t_GL_users = NULL; | |
| 450 | t_len = av_len((AV *)SvRV(users)); | |
| 451 | ||
| 452 | for (i = 0; i < t_len; i++) { | |
| 453 | STRLEN t_sl; | |
| 454 | t_GL_users = g_list_append(t_GL_users, SvPV(*av_fetch((AV *)SvRV(users), i, 0), t_sl)); | |
| 6591 | 455 | } |
| 11123 | 456 | |
| 457 | t_GL_flags = NULL; | |
| 458 | t_len = av_len((AV *)SvRV(flags)); | |
| 459 | ||
| 460 | for (i = 0; i < t_len; i++) { | |
| 461 | STRLEN t_sl; | |
| 462 | t_GL_flags = g_list_append(t_GL_flags, SvPV(*av_fetch((AV *)SvRV(flags), i, 0), t_sl)); | |
| 463 | } | |
| 464 | ||
| 465 | gaim_conv_chat_add_users(chat, t_GL_users, t_GL_flags); | |
| 466 | ||
| 467 | ||
| 468 | gboolean | |
| 469 | gaim_conv_chat_find_user(chat, user) | |
| 470 | Gaim::Conversation::Chat chat | |
| 471 | const char * user | |
| 472 | ||
| 473 | void gaim_conv_chat_clear_users(chat) | |
| 474 | Gaim::Conversation::Chat chat | |
| 475 | ||
| 476 | void gaim_conv_chat_set_nick(chat, nick) | |
| 477 | Gaim::Conversation::Chat chat | |
| 478 | const char * nick | |
| 479 | ||
| 480 | const char * | |
| 481 | gaim_conv_chat_get_nick(chat) | |
| 482 | Gaim::Conversation::Chat chat | |
| 483 | ||
| 484 | Gaim::Conversation | |
| 485 | gaim_find_chat(gc, id) | |
| 486 | Gaim::Connection gc | |
| 487 | int id | |
| 488 | ||
| 489 | void gaim_conv_chat_left(chat) | |
| 490 | Gaim::Conversation::Chat chat | |
| 491 | ||
| 492 | gboolean gaim_conv_chat_has_left(chat) | |
| 493 | Gaim::Conversation::Chat chat | |
| 494 | ||
| 495 | Gaim::Conversation::ChatBuddy | |
| 496 | gaim_conv_chat_cb_find(chat, name) | |
| 497 | Gaim::Conversation::Chat chat | |
| 498 | const char *name | |
| 499 | ||
| 500 | const char * | |
| 501 | gaim_conv_chat_cb_get_name(cb) | |
| 502 | Gaim::Conversation::ChatBuddy cb | |
| 503 | ||
| 504 | void | |
| 505 | gaim_conv_chat_cb_destroy(cb); | |
| 506 | Gaim::Conversation::ChatBuddy cb |