author | benmeyer <benmeyer> | 2002-09-30 14:26:33 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-09-30 14:26:33 (UTC) |
commit | 9965bd5c49ff2f22d640d132ac343fdec97b3fb4 (patch) (unidiff) | |
tree | 45e8f1d1bf414530b637692ba43b730110611856 /noncore/net/networksetup/addserviceimp.cpp | |
parent | 5db3af80f392f8f063f53cbbad67bbe7c5c6eb6d (diff) | |
download | opie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.zip opie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.tar.gz opie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.tar.bz2 |
Initial commit
Diffstat (limited to 'noncore/net/networksetup/addserviceimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/networksetup/addserviceimp.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/noncore/net/networksetup/addserviceimp.cpp b/noncore/net/networksetup/addserviceimp.cpp new file mode 100644 index 0000000..ac79d06 --- a/dev/null +++ b/noncore/net/networksetup/addserviceimp.cpp | |||
@@ -0,0 +1,26 @@ | |||
1 | #include "addserviceimp.h" | ||
2 | #include <qpe/qlibrary.h> | ||
3 | #include <qlistview.h> | ||
4 | #include <qlist.h> | ||
5 | |||
6 | void AddServiceImp::addServices(QList<QString> list){ | ||
7 | list.setAutoDelete(true); | ||
8 | |||
9 | for(uint i = 0; i < list.count(); i++){ | ||
10 | QString pluginFileName = ""; | ||
11 | QLibrary *lib = new QLibrary(pluginFileName); | ||
12 | void *functionPointer = lib->resolve("info"); | ||
13 | if( !functionPointer ){ | ||
14 | qDebug(QString("AddServiceImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); | ||
15 | delete lib; | ||
16 | break; | ||
17 | } | ||
18 | |||
19 | // Try to get an info. | ||
20 | QString info = ((QString (*)()) functionPointer)(); | ||
21 | QListViewItem *newItem = new QListViewItem(registeredServicesList, info); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | |||
26 | // addserviceimp.cpp | ||