Sat, 27 Sep 2003 19:17:21 +0000
[gaim-migrate @ 7538]
This is Mr. Holland's Opus. And by Mr. Holland I mean Robot101. He
rewrote the coreish IM image support so that the binary data gets
ripped out in the prpl and put in an imgstore instead of just being
passed in the same huge as char string as the actual message. This
is good because it's prpl agnostic, or something. It also means
we don't have a silly length of "-1" with pretty much every send or
receive IM function.
It should be crash free, bug free, and memleak free, but additional
testing is always a good thing.
If you like good stuff then you'll love this patch. But don't take
my word for it--ba dun dunt!
| 6591 | 1 | #include "module.h" |
| 2 | ||
| 3 | MODULE = Gaim::Conversation::IM PACKAGE = Gaim::Conversation::IM PREFIX = gaim_im_ | |
| 4 | PROTOTYPES: ENABLE | |
| 5 | ||
| 6 | Gaim::Conversation::IM | |
| 7 | new(account, name) | |
| 8 | Gaim::Account account | |
| 9 | const char *name | |
| 10 | CODE: | |
| 11 | RETVAL = GAIM_IM(gaim_conversation_new(GAIM_CONV_IM, account, name)); | |
| 12 | OUTPUT: | |
| 13 | RETVAL | |
| 14 | ||
| 15 | void | |
| 16 | DESTROY(im) | |
| 17 | Gaim::Conversation::IM im | |
| 18 | CODE: | |
| 19 | gaim_conversation_destroy(gaim_im_get_conversation(im)); | |
| 20 | ||
| 21 | ||
| 22 | Gaim::Conversation | |
| 23 | gaim_im_get_conversation(im) | |
| 24 | Gaim::Conversation::IM im | |
| 25 | ||
| 26 | void | |
| 27 | gaim_im_write(im, who, message, flags) | |
| 28 | Gaim::Conversation::IM im | |
| 29 | const char *who | |
| 30 | const char *message | |
| 31 | int flags | |
| 32 | CODE: | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6591
diff
changeset
|
33 | gaim_im_write(im, who, message, flags, time(NULL)); |
| 6591 | 34 | |
| 35 | void | |
| 36 | gaim_im_send(im, message) | |
| 37 | Gaim::Conversation::IM im | |
| 38 | const char *message | |
| 39 | ||
| 40 | ||
| 41 | MODULE = Gaim::Conversation::IM PACKAGE = Gaim PREFIX = gaim_ | |
| 42 | PROTOTYPES: ENABLE | |
| 43 | ||
| 44 | void | |
| 45 | ims() | |
| 46 | PREINIT: | |
| 47 | GList *l; | |
| 48 | PPCODE: | |
| 49 | for (l = gaim_get_ims(); l != NULL; l = l->next) | |
| 50 | { | |
| 51 | XPUSHs(sv_2mortal(gaim_perl_bless_object(GAIM_IM(l->data), | |
| 52 | "Gaim::Conversation"))); | |
| 53 | } |