author | mickeyl <mickeyl> | 2003-10-29 18:18:19 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-29 18:18:19 (UTC) |
commit | 1af1f1d9f398d38a2bc666cd2edff5725da7a770 (patch) (unidiff) | |
tree | b3bb0d90cafc1e933b5b9297a7b2669ce3b184ea /noncore/net/opietooth/manager/rfcommconfhandler.h | |
parent | 35615947e11575a61456c8483e7f6d67fe59d5ed (diff) | |
download | opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.zip opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.gz opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.bz2 |
mrege noncore/net/*
Diffstat (limited to 'noncore/net/opietooth/manager/rfcommconfhandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/rfcommconfhandler.h | 54 |
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 | |||
9 | namespace 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 | ||