[vdr] Feature request: suggestion for cPlugin

Udo Richter udo_richter at gmx.de
Thu Aug 18 15:52:40 CEST 2005


cwieninger at gmx.de wrote:
> I was asked, if I could expose some functionality of epgsearch (searching the EPG, 
> calling the extended timer edit menu) to other plugins. I plan to do this, like the timeline 
> plugin does to check for timer conflicts in other plugins:

Another way to tunnel information from one plugin to another is to use
SetupParse("==epgsearch-tunnel-v1.0==",(char*)&data) for it. If, for
some reason, the plugin doesn't know this tunnel (wrong version, wrong
plugin), the function will most likely ignore this call and return false.


A far better way would be of course if VDR's cPlugin would have such a
general purpose interface. My approach would be like this:

  virtual bool ExtensionInterface(const char *ExtensionId, void *Data)

Plugins return false unless ExtensionId matches a known unique protocol
ID. If the plugin supports this protocol, true will be returned in any
case. If *Data is not NULL, it points to a protocol-specific buffer. If
*Data is NULL, this is just a protocol-supported call.

cPluginManager should have methods to call ExtensionInterface for all
plugins (broadcast-like), or for all plugins until one plugin returns
true (find one that offers the interface).


@Klaus: I can implement that if interested.

Cheers,

Udo



More information about the vdr mailing list