summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/btconfhandler.h
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/btconfhandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/btconfhandler.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/btconfhandler.h b/noncore/net/opietooth/manager/btconfhandler.h
new file mode 100644
index 0000000..5638d00
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btconfhandler.h
@@ -0,0 +1,126 @@
1/* $Id$ */
2/* Bluetooth services configuration file handler */
3/***************************************************************************
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 ***************************************************************************/
11
12#ifndef _BTCONFHANDLER_H_
13#define _BTCONFHANDLER_H_
14#include <qstring.h>
15#include <qstringlist.h>
16
17namespace OpieTooth {
18 class BTConfHandler {
19 public:
20 BTConfHandler(const QString& conf);
21 ~BTConfHandler();
22 bool saveConfig();
23
24 bool getHcidEnable() { return hcidEnable; }
25 void setHcidEnable(bool arg) { hcidEnable = arg; }
26
27 bool getHiddEnable() { return hiddEnable; }
28 void setHiddEnable(bool arg) { hiddEnable = arg; }
29
30 bool getSdpdEnable() { return sdpdEnable; }
31 void setSdpdEnable(bool arg) { sdpdEnable = arg; }
32
33 bool getRfcommEnable() { return rfcommEnable; }
34 void setRfcommEnable(bool arg) { rfcommEnable = arg; }
35
36 //DUND parameter
37 bool getDundEnable() { return dundEnable; }
38 void setDundEnable(bool arg) { dundEnable = arg; }
39 bool getDunDisableSDP() { return dundDisableSDP; }
40 void setDunDisableSDP(bool arg) { dundDisableSDP = arg; }
41 bool getDunPersist() { return dundPersist; }
42 void setDunPersist(bool arg) { dundPersist = arg; }
43 QString getDunPersistPeriod() { return dundPersistPeriod; }
44 void setDunPersistPeriod(QString& arg) { dundPersistPeriod = arg; }
45 bool getDunCache() { return dundCache; }
46 void setDunCache(bool arg) { dundCache = arg; }
47 QString getDunCachePeriod() { return dundCachePeriod; }
48 void setDunCachePeriod(QString& arg) { dundCachePeriod = arg; }
49 bool getDunMsdun() { return dundMsdun; }
50 void setDunMsdun(bool arg) { dundMsdun = arg; }
51 QString getDunMsdunTimeout() { return dundMsdunTimeout; }
52 void setDunMsdunTimeout(QString& arg) { dundMsdunTimeout = arg; }
53 QString getDunChannel() { return dundChannel; }
54 void setDunChannel(QString& arg) { dundChannel = arg; }
55 bool getDunPPPd() { return dundPPPd; }
56 void setDunPPPd(bool arg) { dundPPPd = arg; }
57 QString getDunPPPdPath() { return dundPPPdPath; }
58 void setDunPPPdPath(QString& arg) { dundPPPdPath = arg; }
59 QString getDunPPPdOptions() { return dundPPPdOptions; }
60 void setDunPPPdOptions(QString& arg) { dundPPPdOptions = arg; }
61
62 //PAND parameters
63 bool getPanEnable() { return pandEnable; }
64 void setPanEnable(bool arg) { pandEnable = arg; }
65 bool getPanEncrypt() { return pandEncrypt; }
66 void setPanEncrypt(bool arg) { pandEncrypt = arg; }
67 bool getPanSecure() { return pandSecure; }
68 void setPanSecure(bool arg) { pandSecure = arg; }
69 bool getPanMaster() { return pandMaster; }
70 void setPanMaster(bool arg) { pandMaster = arg; }
71 bool getPanDisableSDP() { return pandDisableSDP; }
72 void setPanDisableSDP(bool arg) { pandDisableSDP = arg; }
73 QString getPanRole() { return pandRole; }
74 void setPanRole(QString& arg) { pandRole = arg; }
75 bool getPanPersist() { return pandPersist; }
76 void setPanPersist(bool arg) { pandPersist = arg; }
77 QString getPanPersistPeriod() { return pandPersistPeriod; }
78 void setPanPersistPeriod(QString& arg) { pandPersistPeriod = arg; }
79 bool getPanCache() { return pandCache; }
80 void setPanCache(bool arg) { pandCache = arg; }
81 QString getPanCachePeriod() { return pandCachePeriod; }
82 void setPanCachePeriod(QString& arg) { pandCachePeriod = arg; }
83
84 QString& getConfName() { return confName; }
85 protected:
86 bool getBoolArg(QString& str, QCString& keyword);
87 QString getStringArg(QString& str, QCString& keyword);
88 bool readConfig(const QString& conf);
89 void parsePanParameters(const QString& conf);
90 void parseDunParameters(const QString& conf);
91 protected:
92 bool hcidEnable;
93 bool hiddEnable;
94 bool sdpdEnable;
95 bool rfcommEnable;
96 //DUND parameters
97 bool dundEnable;
98 bool dundDisableSDP;
99 bool dundPersist;
100 QString dundPersistPeriod;
101 bool dundCache;
102 QString dundCachePeriod;
103 bool dundMsdun;
104 QString dundMsdunTimeout;
105 QString dundChannel;
106 bool dundPPPd;
107 QString dundPPPdPath;
108 QString dundPPPdOptions;
109
110 //PAND parameters
111 bool pandEnable;
112 bool pandEncrypt;
113 bool pandSecure;
114 bool pandMaster;
115 bool pandDisableSDP;
116 bool pandPersist;
117 QString pandPersistPeriod;
118 bool pandCache;
119 QString pandCachePeriod;
120 QString pandRole;
121 QStringList list; //list of strings we read from configuration file
122 QString confName; //Configuration filename
123 };
124};
125#endif
126//eof