Sun, 11 Jun 2006 19:05:45 +0000
[gaim-migrate @ 16257]
SF Patch #1504436 from roast, with changes by me
"gaim_gtkdialogs_log() doesn't set initial account
value, but shows an initial account. This is confusing
because if the user does not use the hint list to
select an account (e.g. he types a name in),
gaim_gtkdialogs_log_cb() services an empty call.
This patch fixes this."
committer: Richard Laager <rlaager@pidgin.im>
| 6591 | 1 | #include "module.h" |
| 2 | ||
| 12819 | 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_ | |
| 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 | 45 | MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation PREFIX = gaim_conversation_ |
| 46 | PROTOTYPES: ENABLE | |
| 11123 | 47 | |
| 48 | void | |
| 49 | gaim_conversation_get_send_history(conv) | |
| 6591 | 50 | Gaim::Conversation conv |
| 11123 | 51 | PREINIT: |
| 52 | GList *l; | |
| 53 | PPCODE: | |
| 54 | for (l = gaim_conversation_get_send_history(conv); l != NULL; l = l->next) { | |
| 12892 | 55 | XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
| 11123 | 56 | } |
| 57 | ||
| 11581 | 58 | void |
| 11123 | 59 | gaim_conversation_destroy(conv) |
| 60 | Gaim::Conversation conv | |
| 61 | ||
| 11581 | 62 | Gaim::ConversationType |
| 11123 | 63 | gaim_conversation_get_type(conv) |
| 64 | Gaim::Conversation conv | |
| 6591 | 65 | |
| 66 | Gaim::Account | |
| 67 | gaim_conversation_get_account(conv) | |
| 68 | Gaim::Conversation conv | |
| 69 | ||
| 70 | Gaim::Connection | |
| 71 | gaim_conversation_get_gc(conv) | |
| 72 | Gaim::Conversation conv | |
| 73 | ||
| 11581 | 74 | void |
| 11123 | 75 | gaim_conversation_set_title(conv, title); |
| 6591 | 76 | Gaim::Conversation conv |
| 11123 | 77 | const char * title |
| 6591 | 78 | |
| 11123 | 79 | const char * |
| 80 | gaim_conversation_get_title(conv) | |
| 81 | Gaim::Conversation conv | |
| 82 | ||
| 11581 | 83 | void |
| 6591 | 84 | gaim_conversation_autoset_title(conv) |
| 85 | Gaim::Conversation conv | |
| 86 | ||
| 11581 | 87 | void |
| 11123 | 88 | gaim_conversation_set_name(conv, name) |
| 89 | Gaim::Conversation conv | |
| 90 | const char *name | |
| 91 | ||
| 6591 | 92 | const char * |
| 93 | gaim_conversation_get_name(conv) | |
| 94 | Gaim::Conversation conv | |
| 11581 | 95 | |
| 96 | void | |
| 6591 | 97 | gaim_conversation_set_logging(conv, log) |
| 98 | Gaim::Conversation conv | |
| 99 | gboolean log | |
| 100 | ||
| 11581 | 101 | gboolean |
| 6591 | 102 | gaim_conversation_is_logging(conv) |
| 103 | Gaim::Conversation conv | |
| 104 | ||
| 105 | Gaim::Conversation::IM | |
| 106 | gaim_conversation_get_im_data(conv) | |
| 107 | Gaim::Conversation conv | |
| 108 | ||
| 109 | Gaim::Conversation::Chat | |
| 110 | gaim_conversation_get_chat_data(conv) | |
| 111 | Gaim::Conversation conv | |
| 112 | ||
| 11581 | 113 | gpointer |
| 11123 | 114 | gaim_conversation_get_data(conv, key) |
| 115 | Gaim::Conversation conv | |
| 116 | const char * key | |
| 6591 | 117 | |
| 11581 | 118 | Gaim::ConnectionFlags |
| 11123 | 119 | gaim_conversation_get_features(conv) |
| 120 | Gaim::Conversation conv | |
| 121 | ||
| 11581 | 122 | gboolean |
| 11123 | 123 | gaim_conversation_has_focus(conv) |
| 124 | Gaim::Conversation conv | |
| 125 | ||
| 11581 | 126 | void |
| 11123 | 127 | gaim_conversation_update(conv, type) |
| 128 | Gaim::Conversation conv | |
| 129 | Gaim::ConvUpdateType type | |
| 11581 | 130 | |
| 131 | Gaim::Conversation | |
| 12364 | 132 | gaim_conversation_new(class, type, account, name) |
| 11581 | 133 | Gaim::ConversationType type |
| 11170 | 134 | Gaim::Account account |
| 135 | const char *name | |
| 12364 | 136 | C_ARGS: |
| 137 | type, account, name | |
| 11123 | 138 | |
| 11581 | 139 | void |
| 11170 | 140 | gaim_conversation_set_account(conv, account); |
| 141 | Gaim::Conversation conv | |
| 142 | Gaim::Account account | |
| 11581 | 143 | |
| 12340 | 144 | MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation::IM PREFIX = gaim_conv_im_ |
| 11123 | 145 | PROTOTYPES: ENABLE |
| 146 | ||
| 147 | Gaim::Conversation | |
| 148 | gaim_conv_im_get_conversation(im) | |
| 149 | Gaim::Conversation::IM im | |
| 150 | ||
| 11581 | 151 | void |
| 11123 | 152 | gaim_conv_im_set_icon(im, icon) |
| 153 | Gaim::Conversation::IM im | |
| 154 | Gaim::Buddy::Icon icon | |
| 155 | ||
| 156 | Gaim::Buddy::Icon | |
| 157 | gaim_conv_im_get_icon(im) | |
| 158 | Gaim::Conversation::IM im | |
| 159 | ||
| 11581 | 160 | void |
| 11123 | 161 | gaim_conv_im_set_typing_state(im, state) |
| 162 | Gaim::Conversation::IM im | |
| 163 | Gaim::TypingState state | |
| 164 | ||
| 11581 | 165 | Gaim::TypingState |
| 11123 | 166 | gaim_conv_im_get_typing_state(im) |
| 167 | Gaim::Conversation::IM im | |
| 168 | ||
| 11581 | 169 | void |
| 11123 | 170 | gaim_conv_im_start_typing_timeout(im, timeout) |
| 171 | Gaim::Conversation::IM im | |
| 172 | int timeout | |
| 173 | ||
| 11581 | 174 | void |
| 11123 | 175 | gaim_conv_im_stop_typing_timeout(im) |
| 176 | Gaim::Conversation::IM im | |
| 177 | ||
| 11581 | 178 | guint |
| 11123 | 179 | gaim_conv_im_get_typing_timeout(im) |
| 180 | Gaim::Conversation::IM im | |
| 181 | ||
| 11581 | 182 | void |
| 11123 | 183 | gaim_conv_im_set_type_again(im, val) |
| 184 | Gaim::Conversation::IM im | |
| 185 | time_t val | |
| 186 | ||
| 187 | time_t | |
| 188 | gaim_conv_im_get_type_again(im) | |
| 189 | Gaim::Conversation::IM im | |
| 190 | ||
| 11581 | 191 | void |
| 11123 | 192 | gaim_conv_im_start_type_again_timeout(im) |
| 193 | Gaim::Conversation::IM im | |
| 194 | ||
| 11581 | 195 | void |
| 11123 | 196 | gaim_conv_im_stop_type_again_timeout(im) |
| 197 | Gaim::Conversation::IM im | |
| 198 | ||
| 11581 | 199 | guint |
| 11123 | 200 | gaim_conv_im_get_type_again_timeout(im) |
| 201 | Gaim::Conversation::IM im | |
| 202 | ||
| 11581 | 203 | void |
| 11123 | 204 | gaim_conv_im_update_typing(im) |
| 205 | Gaim::Conversation::IM im | |
| 206 | ||
| 11581 | 207 | void |
| 11123 | 208 | gaim_conv_im_send(im, message) |
| 209 | Gaim::Conversation::IM im | |
| 210 | const char *message | |
| 211 | ||
| 11581 | 212 | void |
| 11170 | 213 | gaim_conv_im_write(im, who, message, flags, mtime) |
| 214 | Gaim::Conversation::IM im | |
| 215 | const char *who | |
| 216 | const char *message | |
| 217 | Gaim::MessageFlags flags | |
| 218 | time_t mtime | |
| 11123 | 219 | |
| 12340 | 220 | MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation PREFIX = gaim_conv_ |
| 11123 | 221 | PROTOTYPES: ENABLE |
| 222 | ||
| 11581 | 223 | gboolean |
| 11123 | 224 | gaim_conv_present_error(who, account, what) |
| 225 | const char *who | |
| 226 | Gaim::Account account | |
| 12819 | 227 | const char *what |
| 11123 | 228 | |
| 11581 | 229 | void |
| 11123 | 230 | gaim_conv_custom_smiley_close(conv, smile) |
| 231 | Gaim::Conversation conv | |
| 232 | const char *smile | |
| 233 | ||
| 12340 | 234 | MODULE = Gaim::Conversation PACKAGE = Gaim::Conversation::Chat PREFIX = gaim_conv_chat_ |
| 6591 | 235 | PROTOTYPES: ENABLE |
| 236 | ||
| 237 | Gaim::Conversation | |
| 11123 | 238 | gaim_conv_chat_get_conversation(chat) |
| 239 | Gaim::Conversation::Chat chat | |
| 6591 | 240 | |
| 11123 | 241 | void |
| 242 | gaim_conv_chat_set_users(chat, users) | |
| 243 | Gaim::Conversation::Chat chat | |
| 244 | SV * users | |
| 245 | PREINIT: | |
| 246 | GList *l, *t_GL; | |
| 247 | int i, t_len; | |
| 248 | PPCODE: | |
| 249 | t_GL = NULL; | |
| 250 | t_len = av_len((AV *)SvRV(users)); | |
| 6591 | 251 | |
| 11123 | 252 | for (i = 0; i < t_len; i++) { |
| 253 | STRLEN t_sl; | |
| 254 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(users), i, 0), t_sl)); | |
| 255 | } | |
| 6591 | 256 | |
| 11123 | 257 | for (l = gaim_conv_chat_set_users(chat, t_GL); l != NULL; l = l->next) { |
| 258 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 259 | } | |
| 6591 | 260 | |
| 261 | void | |
| 11123 | 262 | gaim_conv_chat_get_users(chat) |
| 263 | Gaim::Conversation::Chat chat | |
| 264 | PREINIT: | |
| 265 | GList *l; | |
| 266 | PPCODE: | |
| 267 | for (l = gaim_conv_chat_get_users(chat); l != NULL; l = l->next) { | |
| 268 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 269 | } | |
| 270 | ||
| 11581 | 271 | void |
| 11123 | 272 | gaim_conv_chat_ignore(chat, name) |
| 273 | Gaim::Conversation::Chat chat | |
| 274 | const char *name | |
| 275 | ||
| 11581 | 276 | void |
| 11123 | 277 | gaim_conv_chat_unignore(chat, name) |
| 278 | Gaim::Conversation::Chat chat | |
| 279 | const char *name | |
| 280 | ||
| 11581 | 281 | void |
| 11123 | 282 | gaim_conv_chat_set_ignored(chat, ignored) |
| 283 | Gaim::Conversation::Chat chat | |
| 284 | SV * ignored | |
| 285 | PREINIT: | |
| 286 | GList *l, *t_GL; | |
| 287 | int i, t_len; | |
| 288 | PPCODE: | |
| 289 | t_GL = NULL; | |
| 290 | t_len = av_len((AV *)SvRV(ignored)); | |
| 291 | ||
| 292 | for (i = 0; i < t_len; i++) { | |
| 293 | STRLEN t_sl; | |
| 294 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(ignored), i, 0), t_sl)); | |
| 295 | } | |
| 296 | ||
| 297 | for (l = gaim_conv_chat_set_ignored(chat, t_GL); l != NULL; l = l->next) { | |
| 298 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 299 | } | |
| 300 | ||
| 301 | void | |
| 302 | gaim_conv_chat_get_ignored(chat) | |
| 303 | Gaim::Conversation::Chat chat | |
| 6591 | 304 | PREINIT: |
| 305 | GList *l; | |
| 306 | PPCODE: | |
| 11123 | 307 | for (l = gaim_conv_chat_get_ignored(chat); l != NULL; l = l->next) { |
| 308 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 309 | } | |
| 310 | ||
| 311 | const char * | |
| 312 | gaim_conv_chat_get_topic(chat) | |
| 313 | Gaim::Conversation::Chat chat | |
| 314 | ||
| 11581 | 315 | void |
| 11123 | 316 | gaim_conv_chat_set_id(chat, id) |
| 317 | Gaim::Conversation::Chat chat | |
| 318 | int id | |
| 319 | ||
| 11581 | 320 | int |
| 11123 | 321 | gaim_conv_chat_get_id(chat) |
| 322 | Gaim::Conversation::Chat chat | |
| 323 | ||
| 11581 | 324 | void |
| 11123 | 325 | gaim_conv_chat_send(chat, message) |
| 326 | Gaim::Conversation::Chat chat | |
| 327 | const char * message | |
| 328 | ||
| 11581 | 329 | void |
| 13292 | 330 | gaim_conv_chat_write(chat, who, message, flags, mtime) |
| 331 | Gaim::Conversation::Chat chat | |
| 332 | const char *who | |
| 333 | const char *message | |
| 334 | Gaim::MessageFlags flags | |
| 335 | time_t mtime | |
| 336 | ||
| 337 | void | |
|
11456
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
338 | gaim_conv_chat_add_users(chat, users, extra_msgs, flags, new_arrivals) |
| 11123 | 339 | Gaim::Conversation::Chat chat |
| 340 | SV * users | |
|
11456
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
341 | SV * extra_msgs |
| 11123 | 342 | SV * flags |
|
11456
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
343 | gboolean new_arrivals |
| 11123 | 344 | PREINIT: |
|
11456
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
345 | GList *t_GL_users, *t_GL_extra_msgs, *t_GL_flags; |
| 11123 | 346 | int i, t_len; |
| 347 | PPCODE: | |
| 348 | t_GL_users = NULL; | |
| 349 | t_len = av_len((AV *)SvRV(users)); | |
| 350 | ||
| 351 | for (i = 0; i < t_len; i++) { | |
| 352 | STRLEN t_sl; | |
| 353 | t_GL_users = g_list_append(t_GL_users, SvPV(*av_fetch((AV *)SvRV(users), i, 0), t_sl)); | |
| 6591 | 354 | } |
| 11123 | 355 | |
| 356 | t_GL_flags = NULL; | |
| 357 | t_len = av_len((AV *)SvRV(flags)); | |
| 358 | ||
| 359 | for (i = 0; i < t_len; i++) { | |
| 360 | STRLEN t_sl; | |
| 361 | t_GL_flags = g_list_append(t_GL_flags, SvPV(*av_fetch((AV *)SvRV(flags), i, 0), t_sl)); | |
| 362 | } | |
| 363 | ||
|
11456
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
364 | t_GL_extra_msgs = NULL; |
|
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
365 | t_len = av_len((AV *)SvRV(extra_msgs)); |
|
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
366 | |
|
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
367 | for (i = 0; i < t_len; i++) { |
|
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
368 | STRLEN t_sl; |
|
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
369 | t_GL_extra_msgs = g_list_append(t_GL_extra_msgs, SvPV(*av_fetch((AV *)SvRV(extra_msgs), i, 0), t_sl)); |
|
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
370 | } |
|
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
371 | |
|
ed9863eb788f
[gaim-migrate @ 13695]
Richard Laager <rlaager@pidgin.im>
parents:
11290
diff
changeset
|
372 | gaim_conv_chat_add_users(chat, t_GL_users, t_GL_extra_msgs, t_GL_flags, new_arrivals); |
| 11581 | 373 | |
| 374 | gboolean | |
| 11123 | 375 | gaim_conv_chat_find_user(chat, user) |
| 376 | Gaim::Conversation::Chat chat | |
| 377 | const char * user | |
| 378 | ||
| 379 | void gaim_conv_chat_clear_users(chat) | |
| 380 | Gaim::Conversation::Chat chat | |
| 381 | ||
| 382 | void gaim_conv_chat_set_nick(chat, nick) | |
| 383 | Gaim::Conversation::Chat chat | |
| 384 | const char * nick | |
| 385 | ||
| 386 | const char * | |
| 387 | gaim_conv_chat_get_nick(chat) | |
| 388 | Gaim::Conversation::Chat chat | |
| 389 | ||
| 390 | Gaim::Conversation | |
| 391 | gaim_find_chat(gc, id) | |
| 392 | Gaim::Connection gc | |
| 393 | int id | |
| 394 | ||
| 395 | void gaim_conv_chat_left(chat) | |
| 396 | Gaim::Conversation::Chat chat | |
| 397 | ||
| 398 | gboolean gaim_conv_chat_has_left(chat) | |
| 399 | Gaim::Conversation::Chat chat | |
| 400 | ||
| 401 | Gaim::Conversation::ChatBuddy | |
| 402 | gaim_conv_chat_cb_find(chat, name) | |
| 403 | Gaim::Conversation::Chat chat | |
| 404 | const char *name | |
| 405 | ||
| 406 | const char * | |
| 407 | gaim_conv_chat_cb_get_name(cb) | |
| 408 | Gaim::Conversation::ChatBuddy cb | |
| 409 | ||
| 11581 | 410 | void |
| 11123 | 411 | gaim_conv_chat_cb_destroy(cb); |
| 412 | Gaim::Conversation::ChatBuddy cb |