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 ()); 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() 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