summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/rfcommconfhandler.h
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/rfcommconfhandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/rfcommconfhandler.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.h b/noncore/net/opietooth/manager/rfcommconfhandler.h
new file mode 100644
index 0000000..e13c833
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommconfhandler.h
@@ -0,0 +1,54 @@
1#ifndef RFCOMMCONFHANDLER
2#define RFCOMMCONFHANDLER
3
4#include <qstring.h>
5#include <qfile.h>
6#include <qobject.h>
7#include <qmap.h>
8
9namespace OpieTooth {
10
11 class RfCommConfObject {
12
13 public:
14 RfCommConfObject( int number, QString mac, int channel, QString comment );
15 ~RfCommConfObject();
16
17 void setNumber( int number );
18 int number() { return m_number; };
19 void setMac( QString mac );
20 QString mac() { return m_mac; };
21 void setChannel( int channel );
22 int channel() { return m_channel; };
23 void setComment( QString comment );
24 QString comment() { return m_comment; };
25
26
27 private:
28 int m_number;
29 QString m_mac;
30 int m_channel;
31 QString m_comment;
32
33 };
34
35 class RfCommConfHandler {
36
37 public:
38 RfCommConfHandler( const QString & filename );
39 ~RfCommConfHandler();
40
41 void save( QMap<QString, RfCommConfObject*> devices );
42
43 QMap<QString, RfCommConfObject*> foundEntries();
44
45 private:
46 void load();
47
48 QString m_filename;
49 QMap<QString, RfCommConfObject*> m_foundEntries;
50 };
51
52}
53
54#endif