summaryrefslogtreecommitdiff
path: root/libopie2/examples
Side-by-side diff
Diffstat (limited to 'libopie2/examples') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opiecore/oplugins/oplugins.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libopie2/examples/opiecore/oplugins/oplugins.cpp b/libopie2/examples/opiecore/oplugins/oplugins.cpp
index 4aa2da5..26623be 100644
--- a/libopie2/examples/opiecore/oplugins/oplugins.cpp
+++ b/libopie2/examples/opiecore/oplugins/oplugins.cpp
@@ -5,12 +5,13 @@
#include <opie2/opluginloader.h>
#include <opie2/todayplugininterface.h>
using Opie::Core::OPluginItem;
using Opie::Core::OGenericPluginLoader;
+using Opie::Core::OPluginLoader;
void debugLst( const OPluginItem::List& lst ) {
for ( OPluginItem::List::ConstIterator it = lst.begin(); it != lst.end(); ++it )
odebug << "Name " << (*it).name() << " " << (*it).path() << " " << (*it).position() << oendl;
}
@@ -27,11 +28,20 @@ int main( void ) {
lst = loader.filtered( true );
debugLst( lst );
for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) {
QUnknownInterface* iface = loader.load( *it, IID_TodayPluginInterface );
}
+
+ OPluginLoader loader2("today",true);
+ OPluginItem::List lst2 = loader2.allAvailable( true );
+ debugLst( lst2 );
+
+ for( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ){
+ TodayPluginInterface* iface = loader2.load<TodayPluginInterface>( *it, IID_TodayPluginInterface );
+ }
+
/*
* now it's autodelete so cleaned up for us
*/
}