[vdr] Feature request: suggestion for cPlugin

Udo Richter udo_richter at gmx.de
Sun Aug 21 14:45:45 CEST 2005


Klaus Schmidinger wrote:
> Actually it sends the call to _every_ plugin and returns as soon as one
> has processed it. Should this be rephrased, or should the implementation
> be changed to
> 
>          if (p && p->Service(Id, NULL) && p->Service(Id, Data))
>             return p;

I would prefer to not call the function twice, to avoid the redundant
string compare.

----8<----
To send messages to, or request services from some plugin that offers
the protocol, the plugin can call the function
<tt>cPluginManager::CallFirstService</tt>. This function will send the
request to all plugins until one plugin handles the service call. The
function returns a pointer to the plugin that handled the call, or
<tt>NULL</tt> if no plugin handled the call.
<p>
To send a messages to all plugins, the plugin can call the function
<tt>cPluginManager::CallAllServices</tt>. The function returns
<tt>true</tt> if any plugin handled the service call, or <tt>false</tt>
if no plugin handled the call.
----8<----

Cheers,

Udo




More information about the vdr mailing list