Version 1 (modified by 17 years ago) (diff) | ,
---|
libpurple is intended to be the core of an IM program. When using libpurple, you'll basically be writing a UI for this core chunk of code. So Gaim is really just a GTK+ frontend to libpurple, Gaim-text is an ncurses frontend, and Adium is a Cocoa frontend.
Your program provides the int main() function. Your main function will call libpurple_core_init(), which initializes libpurple. Your main function will also register a whole bunch of "callback" functions that are called by libpurple any time there is something to tell the user. For example, when libpurple receives an IM it'll call your function for handling an incoming IM. When one of your buddies signs online libpurple will call your function to update the buddylist.
If your user fetches someones info then you'll call a libpurple function that sends the appropriate message across the network. Then libpurple will get a response and call your function for handling buddy info.