xbmc/xbmc — pull request #1472 by fetzerch (2012-09-24 19:06:41+00:00)
Title: RFC: [pvr] Fix problems with multiple PVR Addons running at the same time

Currently, running different PVR addons simultaneously leads into unspecified behavior.
For example recordings are loaded from all plugins, but you can only play some.

The issue is described here: http://trac.xbmc.org/ticket/13353
In short: The shared libraries that are loaded by the addons (libXBMC_addon, libXBMC_pvr, libXBMC_gui) use global variables (m_Handle, m_cb) that are overriden each time a plugin loads.

I started to work on one possible solution: Getting rid of those global variables, and passing them as function parameter in all exported functions.
The API that the addons call, doesn't not change because I store the handles as class members.

@opdenkamp: I'd like to get some feedback on this. Is this the proper approach or any easier fix that I just fail to see?
You were using void* as handles in the .h file. Is there a specific reason or is it better to include the header / forward declare the handles?