Feature request: suggestion for cPlugin

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

 



Hi.

Ok, I'm now aiming for the service variant:

bool cPlugin::Service(const char *Id, void *Data = NULL)
static cPlugin *cPluginManager::CallFirstService(const char *Id, void
*Data = NULL);
static bool cPluginManager::CallAllServices(const char *Id, void *Data =
NULL);

(I thought about CallFirstService being stupid, but could not find
anything better that makes clear, that just one plugin will handle this)


New patch including docs etc. later this day.


There's a minor taste issue that I want to bring up before its too late.
The current interface suggests (but not enforces) that
Service("someid",NULL) asks whether this protocol is supported or not,
and doesn't cause any action. If a plugin just wants to signal something
and has no additional data, enforcing this rule would require some dummy
pointer to be sent. However, the plugin could just take action even with
Data=NULL, violating the rules.

Variants for this:
1. Keep it as-is
2. Drop the supported check from docs - each plugin can offer a check if
it likes
3. Introduce a constant handle, so Service("someid",QUERY_SERVICE) is
the supported check

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