[vdr] Feature request: suggestion for cPlugin
udo_richter at gmx.de
Sat Aug 20 19:34:46 CEST 2005
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 =
(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
3. Introduce a constant handle, so Service("someid",QUERY_SERVICE) is
the supported check
More information about the vdr