After four days of hacking, Galago now provides enough structure for a program to act as a feed for presence information, and for others to request that information. This includes information on a user’s service, the status(es), away message, etc.
There’s currently only one method for requesting presence. It blocks until it receives a response, but there will be two more methods. The first new method for receiving presence information will be a function that takes a callback function as a parameter. The program can continue going on its merry way, and the callback will be called with the new presence information when it’s finally available.
The second new method will be to use a GalagoWatch. GalagoWatch will be used for both presence and associative information, but for now, I’ll concentrate on the presence. You initialize a GalagoWatch, feed it the information needed so it can do its queries, set a callback function, and then start it. Any time the user’s presence information changes, the callback will be called with the new information. This would be useful for widgets and such.
It’s exciting to see it come together. Once I implement those and clean up the server a bit, I’ll be writing a Gaim plugin that acts as a feed, and a widget to display status information for the user passed to the widget. Exciting 🙂