Plugin API Information


ADCH++ contains a rather powerful plugin API that can be used to create advanced plugins that change or add to ADCH++'s behaviour. Most plugins will need PluginManager.h, ClientManager.h and Client.h included to work, even though the other header files are available as well (they're more likely to change in future versions though). You can use any method that is declared as DLL or is inline, the others are meant to be internal to ADCH++, very likely to change/disappear and will generate link errors (when compiling under windows anyway). When starting a plugin project I strongly recommend that you take one of the existing plugins and modify it to your needs (to get all compiler settings and base code right).


Due to C++ name mangling, plugins are generally valid only for a certain version of the ADCH++ plugin API. This version usually follows the main ADCH++ version, unless a small update is made that I judge shouldn't affect plugins in any way. Most of the time, recompiling the plugin should be enough, unless any major changes have been made, and your plugin doesn't rely on the nasty internals.


ADCH++ has two main threads running when operating. One handles all network communication while the other does all other work (handle protocol data and so on). All plugins are run in the worker thread, which is the only thread visible to the API. You are only allowed to interact with ADCH++ from this thread, as none of the API is thread safe, unless otherwise noted. This has a few important consequences. First off, you can assume that your plugin will only be called by this thread, which means that you don't have to worry about multithreading issues unless you start threads by yourself. Second, any work you do in a plugin halts all of ADCH++'s processing (apart from receiving/sending buffered data), in other words, don't do any lengthy processing in the on methods, as the whole of ADCH++ will suffer. Third, if you indeed start another thread, make sure you don't use any API functions from it apart from those explicitly marked as thread safe. To indicate from a plugin that you have work to do in the main worker thread, call PluginManager::attention().

Generated on Sat Nov 27 23:38:16 2010 for adchpp by  doxygen 1.6.3