licq-im/licq — pull request #25 by erijo (2013-01-26 21:04:50+00:00)
Title: Refactor plugin API

Decouples the plugins from the core by not providing any implementation in the interface. The plugins are expected to either implement the interface themselves or use a help class for some of the work.

The new interfaces are GeneralPluginInterface and ProtocolPluginInterface. To avoid duplicating code in plugins, two new classes (GeneralPluginHelper and ProtocolPluginHelper) are provided. The provide an implementation of part of respective interface and adds some methods that make them behave like the old GeneralPlugin and ProtocolPlugin classes.

Licq::GeneralPlugin and Licq::ProtocolPlugin now only provides part of the interface to the plugin for other plugins.

Both Licq::GeneralPlugin and Licq::ProtocolPlugin are extended by LicqDaemon::GeneralPlugin and LicqDaemon::ProtocolPlugin respectively to provide an extended interface for internal use in plugin manager.

This provides a cleaner separation between plugins and the core.