Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppdata.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp index 567ccf8..eb03ef4 100644 --- a/noncore/settings/networksettings/ppp/pppdata.cpp +++ b/noncore/settings/networksettings/ppp/pppdata.cpp | |||
@@ -5,57 +5,59 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1997 Bernd Johannes Wuebben | 6 | * Copyright (C) 1997 Bernd Johannes Wuebben |
7 | * wuebben@math.cornell.edu | 7 | * wuebben@math.cornell.edu |
8 | * | 8 | * |
9 | * based on EzPPP: | 9 | * based on EzPPP: |
10 | * Copyright (C) 1997 Jay Painter | 10 | * Copyright (C) 1997 Jay Painter |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or | 12 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU Library General Public | 13 | * modify it under the terms of the GNU Library General Public |
14 | * License as published by the Free Software Foundation; either | 14 | * License as published by the Free Software Foundation; either |
15 | * version 2 of the License, or (at your option) any later version. | 15 | * version 2 of the License, or (at your option) any later version. |
16 | * | 16 | * |
17 | * This program is distributed in the hope that it will be useful, | 17 | * This program is distributed in the hope that it will be useful, |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
20 | * Library General Public License for more details. | 20 | * Library General Public License for more details. |
21 | * | 21 | * |
22 | * You should have received a copy of the GNU Library General Public | 22 | * You should have received a copy of the GNU Library General Public |
23 | * License along with this program; if not, write to the Free | 23 | * License along with this program; if not, write to the Free |
24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "pppdata.h" | 27 | #include "pppdata.h" |
28 | #include "runtests.h" | 28 | #include "runtests.h" |
29 | //#include "devices.h" | 29 | |
30 | //#include <klocale.h> | 30 | /* OPIE */ |
31 | #include <opie2/odebug.h> | ||
31 | #include <qpe/config.h> | 32 | #include <qpe/config.h> |
33 | using namespace Opie::Core; | ||
34 | |||
35 | /* QT */ | ||
32 | #include <qmessagebox.h> | 36 | #include <qmessagebox.h> |
33 | #include <qapplication.h> | 37 | #include <qapplication.h> |
34 | // #include <klocale.h> | 38 | |
35 | // #include <kconfig.h> | 39 | /* STD */ |
36 | // #include <kmessagebox.h> | ||
37 | // #include <kapplication.h> | ||
38 | #include <assert.h> | 40 | #include <assert.h> |
39 | 41 | ||
40 | #define SEPARATOR -sseepp- | 42 | #define SEPARATOR -sseepp- |
41 | #define SEP QString("%1SEPARATOR%1") | 43 | #define SEP QString("%1SEPARATOR%1") |
42 | 44 | ||
43 | PPPData::PPPData() | 45 | PPPData::PPPData() |
44 | : passwd(""), | 46 | : passwd(""), |
45 | _modemName(""), | 47 | _modemName(""), |
46 | highcount(-1), // start out with no entries | 48 | highcount(-1), // start out with no entries |
47 | highcountdev(-1), // start out with no entries | 49 | highcountdev(-1), // start out with no entries |
48 | // caccount(-1), // set the current account index also | 50 | // caccount(-1), // set the current account index also |
49 | suidprocessid(-1), // process ID of setuid child | 51 | suidprocessid(-1), // process ID of setuid child |
50 | pppdisrunning(false), | 52 | pppdisrunning(false), |
51 | pppderror(0) | 53 | pppderror(0) |
52 | { | 54 | { |
53 | highcount = readNumConfig(GENERAL_GRP, NUMACCOUNTS_KEY, 0) - 1; | 55 | highcount = readNumConfig(GENERAL_GRP, NUMACCOUNTS_KEY, 0) - 1; |
54 | highcountdev = readNumConfig(GENERAL_GRP, NUMDEVICES_KEY, 0) - 1; | 56 | highcountdev = readNumConfig(GENERAL_GRP, NUMDEVICES_KEY, 0) - 1; |
55 | Config cfg = config(); | 57 | Config cfg = config(); |
56 | cfg.setGroup(GENERAL_GRP); | 58 | cfg.setGroup(GENERAL_GRP); |
57 | accountList = cfg.readListEntry(ACCOUNT_LIST, ',' ); | 59 | accountList = cfg.readListEntry(ACCOUNT_LIST, ',' ); |
58 | deviceList = cfg.readListEntry(DEVICESNAMES_LIST, ',' ); | 60 | deviceList = cfg.readListEntry(DEVICESNAMES_LIST, ',' ); |
59 | odebug << "PPPData::PPPData has a accountList " << accountList.join("---").latin1() << "" << oendl; | 61 | odebug << "PPPData::PPPData has a accountList " << accountList.join("---").latin1() << "" << oendl; |
60 | odebug << "PPPData::PPPData has a deviceList " << deviceList.join("---").latin1() << "" << oendl; | 62 | odebug << "PPPData::PPPData has a deviceList " << deviceList.join("---").latin1() << "" << oendl; |
61 | 63 | ||