From: Brandon D. Valentine <brandon@dv...> - 2004-07-13 01:13:51
[ I am not on gaim-devel so please leave me in the Cc. ]
I've just taken my first dip into the gaim source as I attempt to write
my first gaim plugin and probably patch, unless someone can suggest a
way to implement the functionality I'm about to describe without
modifying the gaim core. The crux of the biscuit is that I want to be
able to catch a signal when a user's status (uc) changes to or from that
of a wireless user. I would like to be able to setup buddy pounces on
the event where a wireless user becomes a non-wireless user, as this
makes sense to me as an event analogous to a user signing on to aim. I
think this might be generally useful to gaim users and maybe should be
put into the core buddy pounce code, but I am perfectly happy to
implement it as a plugin to suit my needs.
It does not seem to me that there is presently a way to implement this
even in a plugin as I do not see a signal indicating this change
anywhere in gaim. I see in server.c:gaim_blist_update_buddy_status()
where buddy-away and buddy-back are emitted. My thoughts are that that
function needs to be modified so that it also checks status for the
wireless bit. I'm a bit unsure of the best or most "gaim-like" way to
implement what happens next. Here are my thoughts:
User becomes wireless, we either:
A) gaim_signal_emit() a new "buddy-wireless" signal.
B) Check a user pref on whether we handle wireless status changes, if
set, emit buddy-signed-off, plugins checking for that catch it, but the
buddy remains in the blist with his status updated to wireless.
User signs on to real AIM, we:
A) Emit "buddy-unwireless" or something.
B) Check same user pref, if set, emit buddy-signed-on.
Thoughts? I prefer solution (B) myself as it makes sense to me that
these events are the same thing, especially if we make it user
Brandon D. Valentine
Pseudo-Random Googlism: beer is proof that god loves us and wants us to
Get latest updates about Open Source Projects, Conferences and News.