[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: Re: kdemm backends & Helix
From: Marco Lohse <mlohse () cs ! uni-sb ! de>
Date: 2004-09-19 8:38:59
Message-ID: 414D45A3.2050509 () cs ! uni-sb ! de
[Download RAW message or body]
Matthias Welwarsky wrote:
[..]
>
>
>As a sidenote, this is also how plugins are accessed in Trolltechs Qtopia
>environment. Basically, you are guaranteed that each plugin implements a
>queryInterface() method which can be asked by means of a UUID: " do you
>support this interface?". In case of a match, queryInterface() returns a
>pointer to an instance implementing said interface, or a null pointer in case
>of a mismatch. Of course you need to static_cast<> the pointer you receive.
>
>
>
Just a short remark:
NMM provides 'built-in' support for such things using its
object-oriented interface system. You can ask any plug-in what
interfaces (i.e. what functionality) it supports, e.g.:
INode* readfile = graph.getINode(readfile_descr);
IFileHandler_var filehandler (readfile-> getParentObject()-> getCheckedInterface<IFileHandler> ());
filehandler-> setFilename(argv[1]);
(the _var type is just a C++ auto_ptr<>)
=> tries to get the interface IFileHandler from the plug-in node
readfile. When using the 'checked' get interface method, if this
interface is not available, an InterfaceNotFoundExceotion is thrown. Or
you can use getInterface<IFileHandler>() which will return a null
pointer in this case.
Have fun, Marco.
_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic