author | korovkin <korovkin> | 2006-03-25 18:10:13 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-03-25 18:10:13 (UTC) |
commit | c4f82599db775f52c7e04cce09c7c45ecc89ccfd (patch) (unidiff) | |
tree | 81d48e5363a2135bb6820510ae7f5dee9999e8f2 /noncore/net/opietooth/manager/rfcommconfhandler.h | |
parent | da3c4a6231882bc56266162415a8d1a2a1bf0293 (diff) | |
download | opie-c4f82599db775f52c7e04cce09c7c45ecc89ccfd.zip opie-c4f82599db775f52c7e04cce09c7c45ecc89ccfd.tar.gz opie-c4f82599db775f52c7e04cce09c7c45ecc89ccfd.tar.bz2 |
Added RFCOMM binding table functionality.
Diffstat (limited to 'noncore/net/opietooth/manager/rfcommconfhandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/rfcommconfhandler.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.h b/noncore/net/opietooth/manager/rfcommconfhandler.h index e13c833..46aaa26 100644 --- a/noncore/net/opietooth/manager/rfcommconfhandler.h +++ b/noncore/net/opietooth/manager/rfcommconfhandler.h | |||
@@ -1,51 +1,54 @@ | |||
1 | #ifndef RFCOMMCONFHANDLER | 1 | #ifndef RFCOMMCONFHANDLER |
2 | #define RFCOMMCONFHANDLER | 2 | #define RFCOMMCONFHANDLER |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | #include <qfile.h> | 5 | #include <qfile.h> |
6 | #include <qobject.h> | 6 | #include <qobject.h> |
7 | #include <qmap.h> | 7 | #include <qmap.h> |
8 | 8 | ||
9 | namespace OpieTooth { | 9 | namespace OpieTooth { |
10 | 10 | ||
11 | class RfCommConfObject { | 11 | class RfCommConfObject { |
12 | 12 | ||
13 | public: | 13 | public: |
14 | RfCommConfObject( int number, QString mac, int channel, QString comment ); | 14 | RfCommConfObject( int number, QString mac, int channel, QString comment, |
15 | bool bind); | ||
15 | ~RfCommConfObject(); | 16 | ~RfCommConfObject(); |
16 | 17 | ||
17 | void setNumber( int number ); | 18 | void setNumber( int number ); |
18 | int number() { return m_number; }; | 19 | int number() { return m_number; }; |
19 | void setMac( QString mac ); | 20 | void setMac( QString mac ); |
20 | QString mac() { return m_mac; }; | 21 | QString mac() { return m_mac; }; |
21 | void setChannel( int channel ); | 22 | void setChannel( int channel ); |
22 | int channel() { return m_channel; }; | 23 | int channel() { return m_channel; }; |
23 | void setComment( QString comment ); | 24 | void setComment( QString comment ); |
24 | QString comment() { return m_comment; }; | 25 | QString comment() { return m_comment; }; |
25 | 26 | bool isBind() { return m_doBind; } | |
27 | void doBind(bool arg) { m_doBind = arg; } | ||
26 | 28 | ||
27 | private: | 29 | private: |
30 | bool m_doBind; | ||
28 | int m_number; | 31 | int m_number; |
29 | QString m_mac; | 32 | QString m_mac; |
30 | int m_channel; | 33 | int m_channel; |
31 | QString m_comment; | 34 | QString m_comment; |
32 | 35 | ||
33 | }; | 36 | }; |
34 | 37 | ||
35 | class RfCommConfHandler { | 38 | class RfCommConfHandler { |
36 | 39 | ||
37 | public: | 40 | public: |
38 | RfCommConfHandler( const QString & filename ); | 41 | RfCommConfHandler( const QString & filename ); |
39 | ~RfCommConfHandler(); | 42 | ~RfCommConfHandler(); |
40 | 43 | ||
41 | void save( QMap<QString, RfCommConfObject*> devices ); | 44 | void save( QMap<QString, RfCommConfObject*> devices ); |
42 | 45 | ||
43 | QMap<QString, RfCommConfObject*> foundEntries(); | 46 | QMap<QString, RfCommConfObject*> foundEntries(); |
44 | 47 | ||
45 | private: | 48 | private: |
46 | void load(); | 49 | void load(); |
47 | 50 | ||
48 | QString m_filename; | 51 | QString m_filename; |
49 | QMap<QString, RfCommConfObject*> m_foundEntries; | 52 | QMap<QString, RfCommConfObject*> m_foundEntries; |
50 | }; | 53 | }; |
51 | 54 | ||