KMediaPlayer Interface

Neil Stevens neil at qualityassistant.com
Fri Apr 5 22:25:36 BST 2002


On Friday April 05, 2002 01:12, Simon Hausmann wrote:
> On Fri, Apr 05, 2002 at 12:58:02PM -0800, Neil Stevens wrote:
> > Is it OK if I add this KMediaPlayer interface into kdelibs?  We've
> > been having some copy and paste from app to app, and it seems to me
> > that this is the way to eliminate it.
> >
> > Having written no KParts code in the past, I welcome any and all
> > criticism of this interface.
> >
> > thanks,
> > --
> > Neil Stevens - neil at qualityassistant.com
> > "I always cheer up immensely if an attack is particularly wounding
> > because I think, well, if they attack one personally, it means they
> > have not a single political argument left." - Margaret Thatcher
>
> YAL (Yet Another Library :-}
>
> What I don't understand is the relation to KParts. Player inherits
> from KParts::ReadOnlyPart, hence an implementation guarantees to
> provide openURL/openFile, but the Engine class provides simliar
> functionality (open(url), stop, etc.) .

I've taken Noatun's and Kaboodle's internal relationships and exported 
them, since the central issue here is that app after app is borrowing the 
same two of three classes again and again.  Kaboodle borrowed from Noatun, 
and others have borrowed pieces from Kaboodle.  Some people only want the 
implementation, others want the interface as well.  Providing both as 
separate interfaces seemed the way to make this library as flexible as 
possible.

> Another option would be to bite in the bullet and make this a set of
> pure interfaces only and rely on the syntax unfriendly qt_cast.
>
> I don't know what the best solution is (I only wish there would be a
> nice solution for the casting :(

What is qt_cast?  It sounds bad, but I'd rather know what it is before I 
whine about it. :-)

-- 
Neil Stevens - neil at qualityassistant.com
"I always cheer up immensely if an attack is particularly wounding
because I think, well, if they attack one personally, it means they
have not a single political argument left." - Margaret Thatcher





More information about the kde-core-devel mailing list