[licq-im/licq] ba91b3: Moved plugin subclasses to separate headers

[email protected]
Newsgroups gmane.network.licq.cvs
Message-ID <[email protected]>
  Branch: refs/heads/pluginbase-as-object
  Home:   https://github.com/licq-im/licq

  Commit: ba91b3918b9ca2cb63cd0fed256c1c8786336721
      https://github.com/licq-im/licq/commit/ba91b3918b9ca2cb63cd0fed256c1c8786336721
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M jabber/src/plugin.cpp
  A licq/include/licq/generalplugin.h
  M licq/include/licq/plugin.h
  M licq/include/licq/pluginmanager.h
  A licq/include/licq/protocolplugin.h
  M licq/src/licq.h
  M licq/src/plugins/generalplugin.h
  M licq/src/plugins/protocolplugin.h
  M msn/src/msn.cpp
  M qt4-gui/src/core/signalmanager.cpp
  M qt4-gui/src/dialogs/plugindlg.h
  M qt4-gui/src/userevents/usersendcommon.cpp

  Log Message:
  -----------
  Moved plugin subclasses to separate headers


  Commit: 006a3781d8ee8c564910058aeba17f9c548faccb
      https://github.com/licq-im/licq/commit/006a3781d8ee8c564910058aeba17f9c548faccb
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M console/src/console_menu.cpp
  M licq/include/licq/generalplugin.h
  M licq/include/licq/plugin.h
  M licq/include/licq/protocolplugin.h
  M licq/src/contactlist/owner.cpp
  M licq/src/contactlist/user.cpp
  M licq/src/fifo.cpp
  M licq/src/licq.cpp
  M licq/src/plugins/generalplugin.cpp
  M licq/src/plugins/generalplugin.h
  M licq/src/plugins/plugin.cpp
  M licq/src/plugins/plugin.h
  M licq/src/plugins/plugineventhandler.cpp
  M licq/src/plugins/pluginmanager.cpp
  M licq/src/plugins/protocolplugin.cpp
  M licq/src/plugins/protocolplugin.h
  M licq/src/plugins/tests/generalplugintest.cpp
  M licq/src/plugins/tests/plugintest.cpp
  M licq/src/plugins/tests/protocolplugintest.cpp
  M qt4-gui/src/core/licqgui.cpp
  M qt4-gui/src/core/systemmenu.cpp
  M qt4-gui/src/core/usermenu.cpp
  M qt4-gui/src/dialogs/ownereditdlg.cpp
  M qt4-gui/src/dialogs/ownermanagerdlg.cpp
  M qt4-gui/src/dialogs/plugindlg.cpp
  M qt4-gui/src/settings/status.cpp
  M qt4-gui/src/userdlg/settings.cpp
  M qt4-gui/src/userevents/usereventcommon.cpp
  M qt4-gui/src/widgets/protocombobox.cpp
  M rms/src/rms.cpp

  Log Message:
  -----------
  api: Removed get prefix from plugin class members

Additional changes:
- Use std::string instead of char*
- Renamed getSendFunctions() to getCapabilities()
- Changed getStatus() to isEnabled() returning a bool

For now, the functions exported by the plugins are not changed.


  Commit: 700045cc48b19d5ccf2757364f30e79e0bf82d3d
      https://github.com/licq-im/licq/commit/700045cc48b19d5ccf2757364f30e79e0bf82d3d
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M licq/src/plugins/plugin.h
  M licq/src/plugins/pluginmanager.cpp
  M licq/src/plugins/pluginmanager.h

  Log Message:
  -----------
  Changed PluginManager to not need Plugin::Ptr


  Commit: b50f1150c5b6d6c30c564b513652035f84f9271a
      https://github.com/licq-im/licq/commit/b50f1150c5b6d6c30c564b513652035f84f9271a
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M licq/src/plugins/generalplugin.cpp
  M licq/src/plugins/generalplugin.h
  M licq/src/plugins/plugin.cpp
  M licq/src/plugins/plugin.h
  M licq/src/plugins/pluginmanager.cpp
  M licq/src/plugins/tests/generalplugintest.cpp
  M licq/src/plugins/tests/plugintest.cpp

  Log Message:
  -----------
  Moved signal masking to GeneralPlugin

There are no signals in Plugin and the masks are never used in
ProtocolPlugin.


  Commit: 06465955daad713ae2060aabe51988245675df67
      https://github.com/licq-im/licq/commit/06465955daad713ae2060aabe51988245675df67
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M jabber/src/jabberplugin.cpp
  M licq/include/licq/protocolbase.h
  M licq/src/icq/icqprotocolplugin.cpp
  M licq/src/plugins/generalplugin.cpp
  M licq/src/plugins/generalplugin.h
  M licq/src/plugins/plugin.cpp
  M licq/src/plugins/plugin.h
  M licq/src/plugins/pluginmanager.cpp
  M licq/src/plugins/protocolplugin.cpp
  M licq/src/plugins/protocolplugin.h
  M licq/src/plugins/tests/generalplugintest.cpp
  M licq/src/plugins/tests/plugintest.cpp
  M licq/src/plugins/tests/protocolplugintest.cpp
  M msn/src/plugin.cpp

  Log Message:
  -----------
  api: Use same init handling for both plugin types

This simplifies the calls to init() in plugins at the cost of passing
along dummy argc,argv parameters to protocols.


  Commit: e1eb949c1cc35e51e3edac31bd28605b2a8d8251
      https://github.com/licq-im/licq/commit/e1eb949c1cc35e51e3edac31bd28605b2a8d8251
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M licq/src/plugins/generalplugin.cpp
  M licq/src/plugins/generalplugin.h
  M licq/src/plugins/plugin.cpp
  M licq/src/plugins/plugin.h
  M licq/src/plugins/pluginmanager.cpp
  M licq/src/plugins/protocolplugin.cpp
  M licq/src/plugins/protocolplugin.h
  M licq/src/plugins/tests/generalplugintest.cpp
  M licq/src/plugins/tests/plugintest.cpp
  M licq/src/plugins/tests/protocolplugintest.cpp

  Log Message:
  -----------
  Assign and set plugin id at creation

This allows plugins to know their id when loading and in init().
Constant INVALID_ID was dropped as it is hardly used and never
checked for.


  Commit: 03709c7fa4658ca66050291ff1f7047ec95fd34b
      https://github.com/licq-im/licq/commit/03709c7fa4658ca66050291ff1f7047ec95fd34b
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M licq/include/licq/generalplugin.h
  M licq/include/licq/plugin.h
  M licq/include/licq/pluginmanager.h
  M licq/include/licq/protocolplugin.h
  M licq/src/plugins/generalplugin.cpp
  R licq/src/plugins/generalplugin.h
  M licq/src/plugins/plugin.cpp
  R licq/src/plugins/plugin.h
  M licq/src/plugins/plugineventhandler.cpp
  M licq/src/plugins/plugineventhandler.h
  M licq/src/plugins/pluginmanager.cpp
  M licq/src/plugins/pluginmanager.h
  M licq/src/plugins/pluginthread.h
  M licq/src/plugins/protocolplugin.cpp
  R licq/src/plugins/protocolplugin.h
  M licq/src/plugins/tests/generalplugintest.cpp
  M licq/src/plugins/tests/plugintest.cpp
  M licq/src/plugins/tests/protocolplugintest.cpp

  Log Message:
  -----------
  api: Move plugin subclasses to private data

This makes the plugin classes in the API complete allowing them to be
created from plugins.
Friend declarations are used to allow PluginManager and unit tests
access to non-public functions.


  Commit: 0ed6e086cee4d546d932412983db9cccca6b963d
      https://github.com/licq-im/licq/commit/0ed6e086cee4d546d932412983db9cccca6b963d
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M licq/cmake/FindLicq.cmake
  M licq/include/licq/generalplugin.h
  M licq/include/licq/plugin.h
  M licq/include/licq/pluginbase.h
  M licq/include/licq/pluginmanager.h
  M licq/include/licq/protocolbase.h
  M licq/include/licq/protocolplugin.h
  M licq/src/icq/icqprotocolplugin.cpp
  M licq/src/plugins/generalplugin.cpp
  M licq/src/plugins/plugin.cpp
  M licq/src/plugins/pluginmanager.cpp
  M licq/src/plugins/pluginmanager.h
  M licq/src/plugins/protocolplugin.cpp
  M licq/src/plugins/tests/generalplugintest.cpp
  M licq/src/plugins/tests/plugintest.cpp
  M licq/src/plugins/tests/protocolplugintest.cpp

  Log Message:
  -----------
  api: Change plugin bases to be object based

The new plugin base exports only a single symbol which is a structure
containing everything Licq need to know to load the plugin. Currently
the contents is a magic value, the Licq version the plugin is built and
a pointer to a factory function.

Plugin loading is only allowed if the magic value is correct and the
Licq version matches. This should prevent crashes later if plugins are
built for a Licq version with a different api. It is assumed that the
last digit in the version is only used for minor releases that doesn't
change the api and plugin loading will be allowed between for example
1.6.0 and 1.6.2, but not between 1.6.0 and 1.7.0.

The factory function must create and return a plugin object derived
from either Licq::GeneralPlugin or Licq::ProtocolPlugin. This object
is then the interface for communicating between Licq and the plugin.

This means that future additions to the plugin interface can be done
without having to export additional symbols for each plugin.
It should also allow plugins to communicate more directly with each
other by sharing a header file and casting the other plugins pointer
to the known subclass.

Additionally:
- Extra comments have been added in plugin interface headers to clarify
  which functions are to be used by the plugin itself and which are
  used by Licq and other plugins.
- The PluginManager uses a custom deleter for the plugins that makes
  sure the plugin instance is completely destroyed before deleting
  the DynamicLibrary instance that will close the library file.
- Plugin base classes contains implementations of configFile() and
  isEnabled() allowing plugins to skip overriding.
- Plugins no longer need to register and unregister with the
  PluginManager, instead they can get the read pipe and set their
  signal mask through the plugin base class.


  Commit: 4cf5666e37178d1346940a2ce6b3476c5e95e5c2
      https://github.com/licq-im/licq/commit/4cf5666e37178d1346940a2ce6b3476c5e95e5c2
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M jabber/src/jabberplugin.cpp
  M jabber/src/plugin.cpp
  M jabber/src/plugin.h
  M msn/src/msn.cpp
  M msn/src/msn.h
  M msn/src/plugin.cpp

  Log Message:
  -----------
  Update protocol plugins for new plugin base

The existing "main" plugin classes are modified to inherit from
Licq::ProtocolPlugin.


  Commit: 612fe3d48cf87fcecd97af638e75a06f1b73be8b
      https://github.com/licq-im/licq/commit/612fe3d48cf87fcecd97af638e75a06f1b73be8b
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M aosd/src/plugin.cpp
  A aosd/src/plugin.h
  M osd/src/CMakeLists.txt
  M osd/src/licq-osd.cpp
  A osd/src/licq-osd.h
  A osd/src/plugin.cpp
  M qt4-gui/src/core/licqgui.cpp
  M qt4-gui/src/core/plugin.cpp
  A qt4-gui/src/core/plugin.h
  M qt4-gui/src/core/signalmanager.cpp
  M qt4-gui/src/core/signalmanager.h

  Log Message:
  -----------
  Update graphical plugins for new plugin base

For Qt4-Gui and Aosd, new plugin classes are added rather than trying
to make an existing classes inherit Licq::GeneralPlugin.

For Osd a class was created to hold the essential functions needed to
inherit Licq::GeneralPlugin. It is left as a future improvement to
change the remaining functions to also be members of the OsdPlugin
class.


  Commit: f1857162495625a27829657af9537968c3ac9573
      https://github.com/licq-im/licq/commit/f1857162495625a27829657af9537968c3ac9573
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M auto-reply/src/autoreply.cpp
  M auto-reply/src/autoreply.h
  M auto-reply/src/main.cpp
  M console/src/console.cpp
  M console/src/console.h
  M console/src/main.cpp
  M forwarder/src/forwarder.cpp
  M forwarder/src/forwarder.h
  M forwarder/src/main.cpp
  M rms/src/main.cpp
  M rms/src/rms.cpp
  M rms/src/rms.h

  Log Message:
  -----------
  Update remaining plugins for new plugin base

The existing "main" plugin classes are modified to inherit from
Licq::GenericPlugin.


  Commit: 8ed04f45bf1ef9d52d4341985f44d67f22441269
      https://github.com/licq-im/licq/commit/8ed04f45bf1ef9d52d4341985f44d67f22441269
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M aosd/src/plugin.cpp
  M auto-reply/src/autoreply.cpp
  M console/src/console.cpp
  M forwarder/src/forwarder.cpp
  M jabber/src/plugin.cpp
  M msn/src/msn.cpp
  M osd/src/licq-osd.cpp
  M qt4-gui/src/core/signalmanager.cpp
  M rms/src/rms.cpp

  Log Message:
  -----------
  Update plugins to pop signals from plugin base

The new plugin base class allows plugins to directly get signals and
events from the protected functions without the need to go through the
daemon class.


  Commit: 3e0a6af6c298635561655ce926f5dc14d9736c59
      https://github.com/licq-im/licq/commit/3e0a6af6c298635561655ce926f5dc14d9736c59
  Author: Anders Olofsson <[email protected]>
  Date:   2011-06-21 (Tue, 21 Jun 2011)

  Changed paths:
    M licq/include/licq/daemon.h
  M licq/include/licq/generalplugin.h
  M licq/include/licq/protocolplugin.h
  M licq/src/daemon.cpp
  M licq/src/daemon.h
  M licq/src/plugins/plugineventhandler.cpp
  M licq/src/plugins/plugineventhandler.h

  Log Message:
  -----------
  api: Remove signal pop wrappers from  daemon class


Compare: https://github.com/licq-im/licq/compare/ba91b39^...3e0a6af
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.