Mailing List archive

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

[vdr] Re: VDR Plugin System - First Step



On 10 May 2002 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:

> Stefan Huelswitt wrote:
>> Just had a quick view at the documentation. Sounds goods. I
>> haven't created any code until now, but I see something missing
>> for me: you cannot insert a listobject in the middle of a list. I
>> would suggest:
[...]
> I'm not sure if this is the right way to do this.

Yes ... ;-)

> With your method you won't be able to insert an item before the very first item
> of a list - and I guess a common solution should provide this capability.
> 
> So I'd suggest that cListObject::Insert(cListObject *Object) should insert
> 'Object' *before* the cListObject, and maybe it would be better to call that
> function cListObject::Prepend(cListObject *Object) then (according to the other
> function being called 'Append()').
> 
> Consequently cListBase::Add(cListObject *Object, cListObject *AfterThis) should
> be accompanied by a new cListBase::Ins(cListObject *Object, cListObject *BeforeThis)
> to allow full flexibility.
> 
> Finally, cOsdMenu::Add() should be the one offering to add *after* a given
> item, and cOsdMenu::Ins() should insert *before* a given item.

Of course this more common. It doesn't matters inserting before
or after an object for my needs.

One more thing: the value of ConfigDirectory (internal to
vdr.c:main() should be available to the plugins to load specific
config files.

Did I understand it right, that the plugin constructor should
only be use for initialization of members? Meaning that e.g.
loading specific config files should be done in Start()? If yes,
there should be a return value of Start() to signal that
starting the plugin failed due to some reason (e.g. missing
file). VDR could disable/unload the plugin for further
operation in this case.

-- 
Stefan Huelswitt
huels@iname.com  | http://home.pages.de/~nathan



Home | Main Index | Thread Index