summaryrefslogtreecommitdiff
path: root/libopie2/examples/opiecore/oplugins/oplugins.cpp
authormickeyl <mickeyl>2005-01-29 14:23:27 (UTC)
committer mickeyl <mickeyl>2005-01-29 14:23:27 (UTC)
commit20b3de56573b9e86c6b6041faf684adc8cbb2a45 (patch) (unidiff)
treee0d91c84dee46d1cce3b0d68fd2c10c3dd7ce3a1 /libopie2/examples/opiecore/oplugins/oplugins.cpp
parent555b999359a5aad999eaaf48632ce85f25125b85 (diff)
downloadopie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.zip
opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.tar.gz
opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.tar.bz2
examples to where they belong
Diffstat (limited to 'libopie2/examples/opiecore/oplugins/oplugins.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/examples/opiecore/oplugins/oplugins.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/libopie2/examples/opiecore/oplugins/oplugins.cpp b/libopie2/examples/opiecore/oplugins/oplugins.cpp
deleted file mode 100644
index 26623be..0000000
--- a/libopie2/examples/opiecore/oplugins/oplugins.cpp
+++ b/dev/null
@@ -1,47 +0,0 @@
1/*
2 * You may copy, modify and or distribute without any limitation
3 */
4#include <opie2/odebug.h>
5#include <opie2/opluginloader.h>
6
7#include <opie2/todayplugininterface.h>
8
9using Opie::Core::OPluginItem;
10using Opie::Core::OGenericPluginLoader;
11using Opie::Core::OPluginLoader;
12
13void debugLst( const OPluginItem::List& lst ) {
14 for ( OPluginItem::List::ConstIterator it = lst.begin(); it != lst.end(); ++it )
15 odebug << "Name " << (*it).name() << " " << (*it).path() << " " << (*it).position() << oendl;
16}
17
18
19int main( void ) {
20 OGenericPluginLoader loader( "today", true );
21 loader.setAutoDelete( true );
22
23 odebug << "IS in Safe Mode" << loader.isInSafeMode() << oendl;
24
25 OPluginItem::List lst = loader.allAvailable( true );
26 debugLst( lst );
27
28 lst = loader.filtered( true );
29 debugLst( lst );
30
31 for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) {
32 QUnknownInterface* iface = loader.load( *it, IID_TodayPluginInterface );
33 }
34
35 OPluginLoader loader2("today",true);
36 OPluginItem::List lst2 = loader2.allAvailable( true );
37 debugLst( lst2 );
38
39 for( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ){
40 TodayPluginInterface* iface = loader2.load<TodayPluginInterface>( *it, IID_TodayPluginInterface );
41 }
42
43
44 /*
45 * now it's autodelete so cleaned up for us
46 */
47}