author | tille <tille> | 2003-05-30 15:06:17 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-30 15:06:17 (UTC) |
commit | 8699d02f6c152afed9490e7e7a4315044261e6e8 (patch) (unidiff) | |
tree | d2ee2ba401c7a9db0e33beaf0617a1456fe01d50 /noncore/settings/networksettings/ppp/pppdata.h | |
parent | d8cec07fe5e54a68afe4feca574f9f4d2433e0c1 (diff) | |
download | opie-8699d02f6c152afed9490e7e7a4315044261e6e8.zip opie-8699d02f6c152afed9490e7e7a4315044261e6e8.tar.gz opie-8699d02f6c152afed9490e7e7a4315044261e6e8.tar.bz2 |
modem and pppdata is now member of interfaceppp
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdata.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppdata.h | 62 |
1 files changed, 16 insertions, 46 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdata.h b/noncore/settings/networksettings/ppp/pppdata.h index c1c7e69..af960c6 100644 --- a/noncore/settings/networksettings/ppp/pppdata.h +++ b/noncore/settings/networksettings/ppp/pppdata.h | |||
@@ -152,25 +152,24 @@ class Config; | |||
152 | #define ACOUNTS_ACC "Accounts_Account" | 152 | #define ACOUNTS_ACC "Accounts_Account" |
153 | 153 | ||
154 | class PPPData { | 154 | class PPPData { |
155 | public: | 155 | public: |
156 | PPPData(); | 156 | PPPData(); |
157 | ~PPPData() {}; | 157 | ~PPPData() {}; |
158 | static PPPData* data(); | ||
159 | 158 | ||
160 | enum { NumInitStrings = 2 }; | 159 | enum { NumInitStrings = 2 }; |
161 | 160 | ||
162 | // general functions | 161 | // general functions |
163 | bool open(); | ||
164 | void save(); | 162 | void save(); |
165 | void cancel(); | 163 | void cancel(); |
166 | 164 | ||
167 | QMap<QString,QString> getConfiguredInterfaces(); | 165 | static QMap<QString,QString> getConfiguredInterfaces(); |
168 | void setConfiguredInterfaces( QMap<QString,QString> ); | 166 | static void setConfiguredInterfaces( QMap<QString,QString> ); |
169 | 167 | ||
170 | // function to read/write date to configuration file | 168 | // function to read/write date to configuration file |
169 | static Config config(); | ||
171 | QString readConfig(const QString &, const QString &, const QString &); | 170 | QString readConfig(const QString &, const QString &, const QString &); |
172 | int readNumConfig(const QString &, const QString &, int); | 171 | int readNumConfig(const QString &, const QString &, int); |
173 | bool readListConfig(const QString &, const QString &, | 172 | bool readListConfig(const QString &, const QString &, |
174 | QStringList &, char sep = ','); | 173 | QStringList &, char sep = ','); |
175 | void writeConfig(const QString &, const QString &, const QString &); | 174 | void writeConfig(const QString &, const QString &, const QString &); |
176 | void writeConfig(const QString &, const QString &, int); | 175 | void writeConfig(const QString &, const QString &, int); |
@@ -204,17 +203,17 @@ public: | |||
204 | void set_show_log_window(bool set); | 203 | void set_show_log_window(bool set); |
205 | bool get_show_log_window(); | 204 | bool get_show_log_window(); |
206 | 205 | ||
207 | void set_automatic_redial(bool set); | 206 | void set_automatic_redial(bool set); |
208 | bool automatic_redial(); | 207 | bool automatic_redial(); |
209 | 208 | ||
210 | void set_iconify_on_connect(bool set); | 209 | // void set_iconify_on_connect(bool set); |
211 | bool get_iconify_on_connect(); | 210 | // bool get_iconify_on_connect(); |
212 | 211 | ||
213 | void set_dock_into_panel(bool set); | 212 | // void set_dock_into_panel(bool set); |
214 | bool get_dock_into_panel(); | 213 | // bool get_dock_into_panel(); |
215 | 214 | ||
216 | const QString enter(); | 215 | const QString enter(); |
217 | void setEnter(const QString &); | 216 | void setEnter(const QString &); |
218 | 217 | ||
219 | QString pppdVersion(); | 218 | QString pppdVersion(); |
220 | bool pppdVersionMin(int ver, int mod, int patch); | 219 | bool pppdVersionMin(int ver, int mod, int patch); |
@@ -308,17 +307,12 @@ public: | |||
308 | QString volumeMedium(); | 307 | QString volumeMedium(); |
309 | void setVolumeMedium(const QString &); | 308 | void setVolumeMedium(const QString &); |
310 | 309 | ||
311 | QString volumeHigh(); | 310 | QString volumeHigh(); |
312 | void setVolumeHigh(const QString &); | 311 | void setVolumeHigh(const QString &); |
313 | 312 | ||
314 | #if 0 | ||
315 | void setUseCDLine(const int n); | ||
316 | int UseCDLine(); | ||
317 | #endif | ||
318 | |||
319 | // functions to set/get account information | 313 | // functions to set/get account information |
320 | int count() const; | 314 | int count() const; |
321 | bool setAccount(const QString &); | 315 | bool setAccount(const QString &); |
322 | bool setAccountbyIndex(int); | 316 | bool setAccountbyIndex(int); |
323 | 317 | ||
324 | bool isUniqueAccname(const QString &); | 318 | bool isUniqueAccname(const QString &); |
@@ -371,14 +365,14 @@ public: | |||
371 | const QString subnetmask(); | 365 | const QString subnetmask(); |
372 | void setSubnetmask(const QString &); | 366 | void setSubnetmask(const QString &); |
373 | 367 | ||
374 | bool AcctEnabled(); | 368 | bool AcctEnabled(); |
375 | void setAcctEnabled(bool set); | 369 | void setAcctEnabled(bool set); |
376 | 370 | ||
377 | int VolAcctEnabled(); | 371 | // int VolAcctEnabled(); |
378 | void setVolAcctEnabled(int set); | 372 | // void setVolAcctEnabled(int set); |
379 | 373 | ||
380 | bool autoDNS(); | 374 | bool autoDNS(); |
381 | void setAutoDNS(bool set); | 375 | void setAutoDNS(bool set); |
382 | 376 | ||
383 | bool exDNSDisabled(); | 377 | bool exDNSDisabled(); |
384 | void setExDNSDisabled(bool set); | 378 | void setExDNSDisabled(bool set); |
@@ -412,54 +406,30 @@ public: | |||
412 | bool pppdRunning() const; | 406 | bool pppdRunning() const; |
413 | void setpppdRunning(bool set); | 407 | void setpppdRunning(bool set); |
414 | 408 | ||
415 | int pppdError() const; | 409 | int pppdError() const; |
416 | void setpppdError(int err); | 410 | void setpppdError(int err); |
417 | 411 | ||
418 | // functions to set/query the accounting info | ||
419 | // const QString accountingFile(); | ||
420 | // void setAccountingFile(const QString &); | ||
421 | |||
422 | // const QString totalCosts(); | ||
423 | // void setTotalCosts(const QString &); | ||
424 | |||
425 | // int totalBytes(); | ||
426 | // void setTotalBytes(int); | ||
427 | |||
428 | // // graphing widget | ||
429 | // void setGraphingOptions(bool enabled, | ||
430 | // QColor bg, | ||
431 | // QColor text, | ||
432 | // QColor in, | ||
433 | // QColor out); | ||
434 | // void graphingOptions(bool &enabled, | ||
435 | // QColor &bg, | ||
436 | // QColor &text, | ||
437 | // QColor &in, | ||
438 | // QColor &out); | ||
439 | // bool graphingEnabled(); | ||
440 | |||
441 | // // window positions | ||
442 | // void winPosConWin(int &, int &); | ||
443 | // void setWinPosConWin(int, int); | ||
444 | // void winPosStatWin(int &, int &); | ||
445 | // void setWinPosStatWin(int, int); | ||
446 | |||
447 | private: | 412 | private: |
448 | 413 | ||
449 | static PPPData *_data; | 414 | //static PPPData *_data; |
450 | int modemDeviceGroup; | 415 | int modemDeviceGroup; |
451 | QString passwd; | 416 | QString passwd; |
452 | static Config* config; // configuration object | 417 | // static Config* config; // configuration object |
453 | int highcount; // index of highest account | 418 | int highcount; // index of highest account |
454 | int caccount; // index of the current account | 419 | int caccount; // index of the current account |
455 | QString cgroup; // name of current config group | 420 | QString cgroup; // name of current config group |
456 | pid_t suidprocessid; // process ID of setuid child | 421 | pid_t suidprocessid; // process ID of setuid child |
457 | bool pppdisrunning; // pppd process | 422 | bool pppdisrunning; // pppd process |
458 | // daemon | 423 | // daemon |
459 | int pppderror; // error encounterd running pppd | 424 | int pppderror; // error encounterd running pppd |
460 | int pppdVer, pppdMod, pppdPatch; // pppd version | 425 | int pppdVer, pppdMod, pppdPatch; // pppd version |
461 | 426 | ||
462 | QStringList phonelist; | 427 | QStringList phonelist; |
428 | QMap<QString,QString> stringEntries; | ||
429 | QMap<QString,int> intEntries; | ||
430 | QMap<QString,QStringList> listEntries; | ||
431 | QMap<QString,QChar> sepEntries; | ||
432 | |||
463 | }; | 433 | }; |
464 | 434 | ||
465 | #endif | 435 | #endif |