Mercurial > pidgin
view plugins/SIGNALS @ 221:b2f9f629525e
[gaim-migrate @ 231]
Added on the beginnings of file sending. Win clients can now figure out which
file you're *trying* to send them, but can't get it.
The AIM method of Get File is really fscked up, IMHO. I don't know if any of
you are familiar with it, but I'll describe it. Some user decides they want
to download a file from another user, so they choose Get File. It then returns
a list of files available from that person, and they can choose which ones they
want to download.
The other person can't decide on a user-by-user basis which files are listed,
only if any files are listed at all (not allowing people to download them).
The way I'm going to implement it is when someone gets a message that another
person is trying to download a file from them, it asks them which file they
want to make available. You can only do one file at a time this way, but that's
tough if you want to be downloading more than one file. Use gnutella or FTP or
something that's better designed for it than AIM. But the way the win AIM
clients are now, it acts as a public ftp server, and I think it shouldn't.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 07 May 2000 01:50:06 +0000 |
parents | 4e91b92f91a7 |
children | be408b41c172 |
line wrap: on
line source
enum gaim_event { event_signon = 0, event_signoff, event_away, event_back, event_im_recv, event_im_send, event_buddy_signon, event_buddy_signoff, event_buddy_away, event_buddy_back, event_blist_update }; To add a signal handler, call the fuction gaim_signal_connect with the following arguments: void *, enum gaim_event, void *, void * The first arg is the handle that was passed to gaim_signal_init. You did save it, right? The second arg is hopefully obvious. The third arg is a pointer to a function that takes various args depending on which event you're dealing with. The fourth arg is any data you want to send to your function, as a final argument. To remove a signal handler, call the function gaim_signal_disconnect with the following arguments: void *, enum gaim_event, void * The first arg is the handle that was passed to gaim_signal_init. The second arg is hopefully obvious. The third arg is a pointer to the function you attached. Note that it deletes *all* functions matching the function you pass, not just one. Sorry, that's just the way it works. So here are the args that get passed to your functions in various events: event_signon: (none) Note that you can get the username (which would probably be the only useful information here) from other places. (Read gaim.h for details.) event_signoff: (none) event_away: (none) Note that the away message that's being used can be retrieved from a global variable. (Read gaim.h for details.) event_back: (none) event_im_recv: char **who, char **text 'who' is the username of the person who sent the message. 'text' is the actual strict text (with HTML tags and all) of the message they sent. Note that you can modify these values. (You are encouraged to do so!) Note that *other* plugins can also modify these values, so you should check that they are not NULL, and try not to leave them as NULL. event_im_send: char *who, char **text 'who' is the username of the person you're sending the message to. 'text' is the actual strict text (with HTML tags and all) of the message you're sending. Note that you can modify outgoing text. (You are _not_ encouraged to do so ;-) .) event_buddy_signon: char *who 'who' is who signed on. event_buddy_signoff: char *who 'who' is who signed off. event_buddy_away: char *who 'who' is who went away. event_buddy_back: char *who 'who' is who is no longer away. event_blist_update: (none) This event is called when the buddylist is updated (automatically every 20 seconds)