xbmc/xbmc — pull request #5023 by jmarshallnz (2014-07-13 08:57:03+00:00)
Title: RFC: Addon callbacks for special-case stuff

This cleans up some of the `if (addon->Type() == ADDON_FOO)` over the codebase. Most of it was there for PVR, but there's also service, repo, and skin-specific stuff.

It's not particularly nice to drop a bunch of includes (the skin ones being the worst) into the add-on classes, but it's better I think than having them elsewhere.

@negge, @xhaggi, @opdenkamp for comments on the PVR stuff.

@Montellese I'd appreciate your thoughts as well.

I'll add more doxy if it's accepted. One thing to consider is the current special-casing that's left in CAddonDatabase::DisableAddon. Reason it's there is due to the service+plugin+script in one add-on. We need to know the add-on could be a specific type. I wonder whether we need to seriously reconsider how we deal with multi-extension point add-ons.