At some points, the decoding library offers to call your custom procedures to do jobs you want to take care of yourself. Some examples are the ``Message Callback'' to print a message or the ``Busy Callback'', which is frequently called during lengthy processing of data to indicate the progress. You can hook up your functions by calling some library function with a pointer to your function as a parameter.
In some cases, you will want that one of your functions receives certain data as a parameter. One reason to achieve this would be through global data; another possibility is provided through the passing of an opaque data pointer.
All callback functions are declared to take an additional parameter of type void*. When hooking up one of your callbacks, you can specify a value that will passed whenever your function is called. Since this pointer is never touched by the library, it can be any kind of data, usually some composed structure. Some application for the Message Callback might be a FILE* pointer to log the messages to.
For portability reasons, you should declare your callbacks with the first parameter actually being a void* pointer and only cast this pointer to its real type within the function body. This prevents compiler warnings about the callback setup.