blob: e13c8331e2bc59f991fef0362877e40018a4163a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#ifndef RFCOMMCONFHANDLER
#define RFCOMMCONFHANDLER
#include <qstring.h>
#include <qfile.h>
#include <qobject.h>
#include <qmap.h>
namespace OpieTooth {
class RfCommConfObject {
public:
RfCommConfObject( int number, QString mac, int channel, QString comment );
~RfCommConfObject();
void setNumber( int number );
int number() { return m_number; };
void setMac( QString mac );
QString mac() { return m_mac; };
void setChannel( int channel );
int channel() { return m_channel; };
void setComment( QString comment );
QString comment() { return m_comment; };
private:
int m_number;
QString m_mac;
int m_channel;
QString m_comment;
};
class RfCommConfHandler {
public:
RfCommConfHandler( const QString & filename );
~RfCommConfHandler();
void save( QMap<QString, RfCommConfObject*> devices );
QMap<QString, RfCommConfObject*> foundEntries();
private:
void load();
QString m_filename;
QMap<QString, RfCommConfObject*> m_foundEntries;
};
}
#endif
|