[vdr] Concerns about changing the API-definition
of 'cStatus::Replaying()' and 'cStatus::Recording()' of VDR?
Oliver Endriss
o.endriss at gmx.de
Sun Dec 18 18:59:02 CET 2005
Klaus Schmidinger wrote:
> So it's either
>
> void Recording(const cDevice *Device, const char *FileName)
>
> which would be code compatible but might break plugins at runtime that
> rely on the string being a pure name, or
>
> void Recording(const cDevice *Device, const char *Name, const char *FileName)
>
> which extends the interface to hold a second parameter that contains
> the actual file name (or NULL, if there is none), but would break plugins
> st compile time.
>
> Same goes for Replaying(), of course.
>
> To me it's all the same, so let's here the votes.
Imho it is far more dangerous to break a plugin at run-time because
changes are not obvious. Incompatible changes of an interface should
always break compilation. I have no problems to release a new version
of the remote plugin...
Recording/Replaying should pass the _same_ file name (short name, full
name or whatever).
If a recording has been stopped, Recording() should also pass the file
name. Otherwise you never know which recording has stopped. ;-(
For example:
void Recording(const cDevice *Device, const char *FileName, bool On)
The same should be done for Replaying().
void Replaying(const cControl *Control, const char *FileName, bool On)
Just my 2 cents.
Oliver
--
--------------------------------------------------------
VDR Remote Plugin available at
http://www.escape-edv.de/endriss/vdr/
--------------------------------------------------------
More information about the vdr
mailing list