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