Hi,
Am 30.07.2013 18:37, schrieb Malte Forkel:
Am 30.07.2013 09:44, schrieb Gerald Dachs:
No, it was not misleading, I understood your intention. I wrote it only, because I am sure that you shouldn't user svdrp for your library. Instead you should use the restfulapi or the vdr2dbus-plugin.
Ah, ok. Thanks for your suggestions.
I started with those two connection types for the following reasons:
- They are available with every VDR installation,
- they promised to provide the most complete and up-to-date access
because they are included with VDR and the plugins, respectively, and
- they are supported by the plugins I was most interested in (mostly
EPGSearch).
Fortenately, I havn't experienced any conflicts when using SVDRP connections in the library. I understand that there can be only one active SVDRP connection at any time, potentially causing timeouts. But that restriction could be an advantage, too, because it might protect against at least some inconsistencies caused by two or more clients accessing VDR's data at the same time.
The library is designed to be extensible with other connection types, like those you mention. But unless my scripts run into problems (and they havn't so far), I'd rather add some unit tests to what I already have first and extend the set of connection types after that (actually, the stubs for restful and dbus have already been there for a while :-).
If you want to unit-test your library, wouldn't it be the right way to write an vdr-mockup which returns expected values for different scenarios so that the behaviour of your library is tested? A "real-life" vdr wouldn't be a good test case because you never know if you cover all cases.
BTW, my plugin is called dbus2vdr. :)
https://github.com/flensrocker/vdr-plugin-dbus2vdr
I maintain a lib with a GDBus/GIO binding (actually just a written-down wrapper for gdbus-codegen and a bunch of examples as documentation how to us it):
https://github.com/flensrocker/libdbus2vdr
Someone actually has started a Python binding for it:
https://github.com/seahawk1986/pydbus2vdr
and a binding for restfulapi:
https://github.com/seahawk1986/pyrestfulapi
Regards, Lars.
Malte