[vdr] Feature request: suggestion for cPlugin
cwieninger at gmx.de
cwieninger at gmx.de
Wed Aug 17 14:18:05 CEST 2005
Hi Klaus,
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:
bool cPluginTimeline::ProcessArgs(int argc, char *argv[])
{
// Implement command line argument processing here if applicable.
if (argc==1 && argv!=NULL && !strcmp(argv[0],"timeline_command_interface") &&
!strcmp(argv[1],"conflicts"))
{ // yes, this is an ugly hack!
return hasConflicts();
}
return true;
}
As you see, it uses the ProcessArgs function for this. Not very nice, but I think it's
currently the only way. Would it be possible, to add a new function to cPlugin, like
'Interface', that works the same way, but is intended for this special job? It should also
have a variable argument list. This would even allow to return pointers to cOsdMenus.
Why reinvent the wheel, if any other plugin already does the job? ;-)
BR,
Christian
More information about the vdr
mailing list