summaryrefslogtreecommitdiff
path: root/noncore/net
authorharlekin <harlekin>2002-06-18 22:44:14 (UTC)
committer harlekin <harlekin>2002-06-18 22:44:14 (UTC)
commitfac9ec9b389bc82d9d3027f801aaceea72c0d63e (patch) (side-by-side diff)
treeb307d882ba03796aa1a31a2e646ba0989adc8a40 /noncore/net
parent4de1ff479f7a9d163940715b5a9e8b92967322b1 (diff)
downloadopie-fac9ec9b389bc82d9d3027f801aaceea72c0d63e.zip
opie-fac9ec9b389bc82d9d3027f801aaceea72c0d63e.tar.gz
opie-fac9ec9b389bc82d9d3027f801aaceea72c0d63e.tar.bz2
update
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index d45fbe0..4d476ac 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -37,2 +37,3 @@
#include <qlistview.h>
+#include <qdir.h>
@@ -140,2 +141,11 @@ namespace OpieTooth {
+ QList<RemoteDevice> *loadedDevices = new QList<RemoteDevice>;
+
+ Config deviceList( QDir::homeDirPath() + "/Settings/bluetooth/devicelist.conf", Config::File );
+
+
+ // RemoteDevice *currentDevice = RemoteDevice( , );
+ //loadedDevices->append( currentDevice );
+
+ addSearchedDevices( *loadedDevices );
}
@@ -143,3 +153,3 @@ namespace OpieTooth {
/*
- * Read the list of allready known devices
+ * Write the list of allready known devices
*
@@ -148,3 +158,19 @@ namespace OpieTooth {
+ QListViewItemIterator it( ListView2 );
+
+ // one top conf file with all decices (by mac adress)
+ Config deviceList( QDir::homeDirPath() + "/Settings/bluetooth/devicelist.conf", Config::File );
+ for ( ; it.current(); ++it ) {
+
+ // MAC adress as group
+ deviceList.setGroup( it.current()->text(1) );
+ deviceList.writeEntry("inList", 1);
+
+ // seperate config file for each device, to store more information in future.
+
+ Config conf( QDir::homeDirPath() + "/Settings/bluetooth/" + (it.current()->text(1)) + ".conf", Config::File );
+ conf.setGroup("Info");
+ conf.writeEntry("name", it.current()->text(0) );
+ }
}
@@ -167,3 +193,3 @@ namespace OpieTooth {
setInfo();
-}
+ }
@@ -292,2 +318,3 @@ namespace OpieTooth {
BlueBase::~BlueBase(){
+ writeSavedDevices();
}