Hi list, I'm not going to have any time to finish CPluginManager (as discussed in today's meeting) until this weekend. But since the basic plugin classes are done, I'm posting them here so that others can take a look and, if they are considered good enough, be committed to subversion.
CLock (licq_lock.{h,cpp})
As discussed in today's meeting. Utility class to handle locking/unlocking of
pthread_mutex_t. See licq_plugin.cpp for example usage.
CPlugin (licq_plugin.{h,cpp})
The base class for CGeneralPlugin and CProtocolPlugin. Contains the plugin's
event loop in exec(). Plugins wishing to use their own event loop (e.g.
qt-gui) should override exec(), exit() and wakeUp(). Most plugins don't have
to care, they just need to implement their callback functions, optionally
overriding initialize() if they need to do some setup that might fail (e.g.
reading configuration files).
CGeneralPlugin (licq_generalplugin.{h,cpp})
Doesn't do anything special at the moment. Inherit from this if you're
creating a general plugin.
CProtocolPlugin (licq_protocolplugin.{h,cpp})
Doesn't do anything special at the moment. Inherit from this if you're
creating a protocol plugin.
In addition to these, some files for test purpose are included. Compile with
make and run with LD_LIBRARY_PATH=. ./licq
// Erik
--
Non-free programs are dangerous to you and to your community.
Don't let them get a place in your life.
-- Richard M. Stallman
Erik Johansson
http://ejohansson.se
test.tar.gz
Description: application/tgz
