ICQ steps using libicq:

Startup steps



When libicq receives an ack packet from the server re: login, it finishes the login sequence, sends our contact list to the server, and sets the user's status to Current_Status. This callback function is then called.

All this function needs to do is set a local variable that you are now online, etc. No processing is required.


This function doesn't seem to be called by libicq at this time.


Gets called when a message arrives with a data parameter that is a struct of type CLIENT_MSG_PTR (see libicq.h). This includes all messages; URLs, files, away messages, etc.




These callbacks are called whenever information on a user on our contact list changes. They are called with data of type USER_UPDATE_PTR. You can use one function to handle all of them if you wish.


This function is called with data in the struct format SEARCH_RESULTS_PTR when the search results are returned from the server.


A USER_INFO_PTR data structure is sent to this function as a response to a request for information re: a user on your contact list or otherwise.


A USER_EXT_INFO_PTR data structure is sent to this function as a response to a request for full information about a user.

Logging in

You may wish to keep a global variable (or static in a function) that keeps track of the user's online-ness. Set this variable to a value indicating that you are connecting, then create the timed functions. Call ICQ_Change_Status(STATUS_ONLINE) to send the connecting signal to the server. Events: now loop! During loop: