Feature request: suggestion for cPlugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux