summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/accounts.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/authwidget.cpp16
-rw-r--r--noncore/settings/networksettings/ppp/config.in2
-rw-r--r--noncore/settings/networksettings/ppp/connect.cpp9
-rw-r--r--noncore/settings/networksettings/ppp/devices.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/general.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/interfaceinformationppp.cpp10
-rw-r--r--noncore/settings/networksettings/ppp/interfaceppp.cpp14
-rw-r--r--noncore/settings/networksettings/ppp/modem.cpp5
-rw-r--r--noncore/settings/networksettings/ppp/ppp.pro3
-rw-r--r--noncore/settings/networksettings/ppp/pppconfig.cpp14
-rw-r--r--noncore/settings/networksettings/ppp/pppdata.cpp14
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp2
13 files changed, 62 insertions, 33 deletions
diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp
index aedc0b9..f05e7ac 100644
--- a/noncore/settings/networksettings/ppp/accounts.cpp
+++ b/noncore/settings/networksettings/ppp/accounts.cpp
@@ -9,49 +9,51 @@
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 "accounts.h" 27#include "accounts.h"
28#include "authwidget.h" 28#include "authwidget.h"
29#include "pppdata.h" 29#include "pppdata.h"
30#include "edit.h" 30#include "edit.h"
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/odebug.h>
33#include <qpe/qpeapplication.h> 34#include <qpe/qpeapplication.h>
35using namespace Opie::Core;
34 36
35/* QT */ 37/* QT */
36#include <qdir.h> 38#include <qdir.h>
37#include <qlayout.h> 39#include <qlayout.h>
38#include <qtabwidget.h> 40#include <qtabwidget.h>
39#include <qtabdialog.h> 41#include <qtabdialog.h>
40#include <qwhatsthis.h> 42#include <qwhatsthis.h>
41#include <qmessagebox.h> 43#include <qmessagebox.h>
42#include <qapplication.h> 44#include <qapplication.h>
43#include <qbuttongroup.h> 45#include <qbuttongroup.h>
44#include <qmessagebox.h> 46#include <qmessagebox.h>
45#include <qvgroupbox.h> 47#include <qvgroupbox.h>
46 48
47/* STD */ 49/* STD */
48#include <stdlib.h> 50#include <stdlib.h>
49 51
50void parseargs(char* buf, char** args); 52void parseargs(char* buf, char** args);
51 53
52 54
53AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name, WFlags f ) 55AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name, WFlags f )
54 : ChooserWidget( pd, parent, name, f ) 56 : ChooserWidget( pd, parent, name, f )
55{ 57{
56 58
57 QWhatsThis::add(edit_b, tr("Allows you to modify the selected account")); 59 QWhatsThis::add(edit_b, tr("Allows you to modify the selected account"));
diff --git a/noncore/settings/networksettings/ppp/authwidget.cpp b/noncore/settings/networksettings/ppp/authwidget.cpp
index f3d842f..c94c3bc 100644
--- a/noncore/settings/networksettings/ppp/authwidget.cpp
+++ b/noncore/settings/networksettings/ppp/authwidget.cpp
@@ -1,36 +1,40 @@
1
2#include <qlayout.h>
3#include <qmessagebox.h>
4#include <qtoolbutton.h>
5#include <qwhatsthis.h>
6
7#include "auth.h" 1#include "auth.h"
8#include "authwidget.h" 2#include "authwidget.h"
9#include "edit.h" 3#include "edit.h"
10#include "pppdata.h" 4#include "pppdata.h"
11 5
6/* OPIE */
7#include <opie2/odebug.h>
8using namespace Opie::Core;
9
10/* QT */
11#include <qlayout.h>
12#include <qmessagebox.h>
13#include <qtoolbutton.h>
14#include <qwhatsthis.h>
12 15
16/* XPM */
13static const char* const image0_data[] = { 17static const char* const image0_data[] = {
14"16 16 2 1", 18"16 16 2 1",
15". c None", 19". c None",
16"# c #000000", 20"# c #000000",
17"................", 21"................",
18"...#...###...##.", 22"...#...###...##.",
19"..#.#..#..#.##..", 23"..#.#..#..#.##..",
20"..###..###.##...", 24"..###..###.##...",
21".#...#.#..##....", 25".#...#.#..##....",
22".#...#.#.##.....", 26".#...#.#.##.....",
23"........##.#..#.", 27"........##.#..#.",
24"..##...##...##..", 28"..##...##...##..",
25".#..#.###...##..", 29".#..#.###...##..",
26".#...##..#.#..#.", 30".#...##..#.#..#.",
27".#..##..........", 31".#..##..........",
28".#.##.#..#.#..#.", 32".#.##.#..#.#..#.",
29"..##...##...##..", 33"..##...##...##..",
30".##....##...##..", 34".##....##...##..",
31".#....#..#.#..#.", 35".#....#..#.#..#.",
32"................"}; 36"................"};
33 37
34 38
35AuthWidget::AuthWidget(PPPData *pd, QWidget *parent, bool isnewaccount, const char *name ) 39AuthWidget::AuthWidget(PPPData *pd, QWidget *parent, bool isnewaccount, const char *name )
36 : QWidget( parent, name), 40 : QWidget( parent, name),
diff --git a/noncore/settings/networksettings/ppp/config.in b/noncore/settings/networksettings/ppp/config.in
index 0b71434..570ebfe 100644
--- a/noncore/settings/networksettings/ppp/config.in
+++ b/noncore/settings/networksettings/ppp/config.in
@@ -1,4 +1,4 @@
1 config PPP 1 config PPP
2 boolean "opie-networksettingsplugin-kppp (PPP module)" 2 boolean "opie-networksettingsplugin-kppp (PPP module)"
3 default "n" if NETWORKSETUP 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && NETWORKSETUP && NETWORKSETUP-CORE && INTERFACES 4 depends ( LIBQPE || LIBQPE-X11 ) && NETWORKSETUP && NETWORKSETUP-CORE && INTERFACES
diff --git a/noncore/settings/networksettings/ppp/connect.cpp b/noncore/settings/networksettings/ppp/connect.cpp
index b75410c..24d33f4 100644
--- a/noncore/settings/networksettings/ppp/connect.cpp
+++ b/noncore/settings/networksettings/ppp/connect.cpp
@@ -3,59 +3,60 @@
3 * 3 *
4 * 4 *
5 * Copyright (C) 1997 Bernd Johannes Wuebben 5 * Copyright (C) 1997 Bernd Johannes Wuebben
6 * wuebben@math.cornell.edu 6 * wuebben@math.cornell.edu
7 * Copyright (C) 1998-2001 Harri Porten <porten@kde.org> 7 * Copyright (C) 1998-2001 Harri Porten <porten@kde.org>
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 <config.h> 27/* OPIE */
28#include <opie2/odebug.h>
29using namespace Opie::Core;
28 30
31/* QT */
29#include <qlayout.h> 32#include <qlayout.h>
30#include <qregexp.h> 33#include <qregexp.h>
31
32#include <qapplication.h> 34#include <qapplication.h>
33//#include <kdebug.h>
34//#include <klocale.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36#include <qpushbutton.h> 36#include <qpushbutton.h>
37 37
38/* STD */
38#include <unistd.h> 39#include <unistd.h>
39#include <stdlib.h> 40#include <stdlib.h>
40#include <string.h> 41#include <string.h>
41#include <fcntl.h> 42#include <fcntl.h>
42#include <netdb.h> 43#include <netdb.h>
43#include <sys/types.h> 44#include <sys/types.h>
44#include <sys/socket.h> 45#include <sys/socket.h>
45#include <arpa/inet.h> 46#include <arpa/inet.h>
46#include <netinet/in.h> 47#include <netinet/in.h>
47#include <sys/ioctl.h> 48#include <sys/ioctl.h>
48#include <assert.h> 49#include <assert.h>
49 50
50#ifdef _XPG4_2 51#ifdef _XPG4_2
51 #define __xnet_connectconnect 52 #define __xnet_connectconnect
52#endif 53#endif
53 54
54#include <errno.h> 55#include <errno.h>
55 56
56#ifdef HAVE_SYS_PARAM_H 57#ifdef HAVE_SYS_PARAM_H
57#include <sys/param.h> 58#include <sys/param.h>
58#endif 59#endif
59 60
60#ifdef __linux__ 61#ifdef __linux__
61#include "runtests.h" 62#include "runtests.h"
diff --git a/noncore/settings/networksettings/ppp/devices.cpp b/noncore/settings/networksettings/ppp/devices.cpp
index 350ff32..42de44c 100644
--- a/noncore/settings/networksettings/ppp/devices.cpp
+++ b/noncore/settings/networksettings/ppp/devices.cpp
@@ -11,49 +11,51 @@
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 "interfaceppp.h" 27#include "interfaceppp.h"
28#include "devices.h" 28#include "devices.h"
29#include "authwidget.h" 29#include "authwidget.h"
30#include "pppdata.h" 30#include "pppdata.h"
31#include "edit.h" 31#include "edit.h"
32#include "general.h" 32#include "general.h"
33 33
34/* OPIE */ 34/* OPIE */
35#include <opie2/odebug.h>
35#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
37using namespace Opie::Core;
36 38
37/* QT */ 39/* QT */
38#include <qdir.h> 40#include <qdir.h>
39#include <qlayout.h> 41#include <qlayout.h>
40#include <qtabwidget.h> 42#include <qtabwidget.h>
41#include <qtabdialog.h> 43#include <qtabdialog.h>
42#include <qwhatsthis.h> 44#include <qwhatsthis.h>
43#include <qmessagebox.h> 45#include <qmessagebox.h>
44#include <qapplication.h> 46#include <qapplication.h>
45#include <qbuttongroup.h> 47#include <qbuttongroup.h>
46#include <qmessagebox.h> 48#include <qmessagebox.h>
47#include <qvgroupbox.h> 49#include <qvgroupbox.h>
48 50
49/* STD */ 51/* STD */
50#include <stdlib.h> 52#include <stdlib.h>
51 53
52 54
53void parseargs(char* buf, char** args); 55void parseargs(char* buf, char** args);
54 56
55DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *name, WFlags f ) 57DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *name, WFlags f )
56 : ChooserWidget(ip->data(), parent, name, f) 58 : ChooserWidget(ip->data(), parent, name, f)
57{ 59{
58 _ifaceppp = ip; 60 _ifaceppp = ip;
59 QWhatsThis::add(edit_b, tr("Allows you to modify the selected device")); 61 QWhatsThis::add(edit_b, tr("Allows you to modify the selected device"));
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp
index 69bb682..40ba19b 100644
--- a/noncore/settings/networksettings/ppp/general.cpp
+++ b/noncore/settings/networksettings/ppp/general.cpp
@@ -10,50 +10,52 @@
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 "general.h" 27#include "general.h"
28#include "interfaceppp.h" 28#include "interfaceppp.h"
29#include "modeminfo.h" 29#include "modeminfo.h"
30#include "modemcmds.h" 30#include "modemcmds.h"
31#include "pppdata.h" 31#include "pppdata.h"
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/odebug.h>
34#include <qpe/config.h> 35#include <qpe/config.h>
35#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
37using namespace Opie::Core;
36 38
37/* QT */ 39/* QT */
38#include <qcheckbox.h> 40#include <qcheckbox.h>
39#include <qcombobox.h> 41#include <qcombobox.h>
40#include <qlabel.h> 42#include <qlabel.h>
41#include <qlayout.h> 43#include <qlayout.h>
42#include <qpushbutton.h> 44#include <qpushbutton.h>
43#include <qslider.h> 45#include <qslider.h>
44#include <qspinbox.h> 46#include <qspinbox.h>
45#include <qwhatsthis.h> 47#include <qwhatsthis.h>
46 48
47/* STD */ 49/* STD */
48#include <termios.h> 50#include <termios.h>
49#include <string.h> 51#include <string.h>
50 52
51 53
52ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name ) 54ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name )
53 : QWidget(parent, name), _pppdata(pd) 55 : QWidget(parent, name), _pppdata(pd)
54{ 56{
55 int k; 57 int k;
56 58
57 QGridLayout *tl = new QGridLayout(this, 8, 2, 0 );//, KDialog::spacingHint()); 59 QGridLayout *tl = new QGridLayout(this, 8, 2, 0 );//, KDialog::spacingHint());
58 60
59 QLabel *label1; 61 QLabel *label1;
diff --git a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
index 5a76293..4755aed 100644
--- a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
+++ b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
@@ -1,34 +1,38 @@
1#include "interfaceinformationppp.h" 1#include "interfaceinformationppp.h"
2#include "connect.h"
3#include "conwindow.h"
4
5/* OPIE */
6#include <opie2/odebug.h>
7using namespace Opie::Core;
2 8
9/* QT */
3#include <qpushbutton.h> 10#include <qpushbutton.h>
4#include <qlabel.h> 11#include <qlabel.h>
5#include <qmessagebox.h> 12#include <qmessagebox.h>
6#include <qabstractlayout.h> 13#include <qabstractlayout.h>
7 14
8#include "connect.h"
9#include "conwindow.h"
10
11#ifdef QWS 15#ifdef QWS
12#else 16#else
13 #define showMaximized show 17 #define showMaximized show
14#endif 18#endif
15 19
16/** 20/**
17 * Constructor for the InterfaceInformationImp class. This class pretty much 21 * Constructor for the InterfaceInformationImp class. This class pretty much
18 * just display's information about the interface that is passed to it. 22 * just display's information about the interface that is passed to it.
19 */ 23 */
20InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f) 24InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f)
21 :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp) 25 :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp)
22{ 26{
23 odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl; 27 odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl;
24 con = new ConnectWidget( (InterfacePPP*)i, this, "con" ); 28 con = new ConnectWidget( (InterfacePPP*)i, this, "con" );
25 con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, 29 con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding,
26 QSizePolicy::Fixed) ); 30 QSizePolicy::Fixed) );
27 31
28 macAddressLabel->hide(); 32 macAddressLabel->hide();
29 subnetMaskLabel->hide(); 33 subnetMaskLabel->hide();
30 broadcastLabel->hide(); 34 broadcastLabel->hide();
31 TextLabel23->hide(); 35 TextLabel23->hide();
32 TextLabel21->hide(); 36 TextLabel21->hide();
33 TextLabel24->hide(); 37 TextLabel24->hide();
34 38
diff --git a/noncore/settings/networksettings/ppp/interfaceppp.cpp b/noncore/settings/networksettings/ppp/interfaceppp.cpp
index 5cc6f70..7d52f66 100644
--- a/noncore/settings/networksettings/ppp/interfaceppp.cpp
+++ b/noncore/settings/networksettings/ppp/interfaceppp.cpp
@@ -1,35 +1,39 @@
1#include "auth.h"
2#include "interfaceppp.h"
3#include "modem.h"
4#include "pppdata.h"
5
6/* OPIE */
7#include <opie2/odebug.h>
8using namespace Opie::Core;
1 9
10/* QT */
2#include <qmessagebox.h> 11#include <qmessagebox.h>
3#include <qlayout.h> 12#include <qlayout.h>
4#include <qlineedit.h> 13#include <qlineedit.h>
5#include <qlabel.h> 14#include <qlabel.h>
6 15
7#include "auth.h"
8#include "interfaceppp.h"
9#include "modem.h"
10#include "pppdata.h"
11
12InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status) 16InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status)
13 : Interface(parent, name, status), 17 : Interface(parent, name, status),
14 _modemPtr(0), 18 _modemPtr(0),
15 _dataPtr(0) 19 _dataPtr(0)
16{ 20{
17 odebug << "InterfacePPP::InterfacePPP(" << oendl; 21 odebug << "InterfacePPP::InterfacePPP(" << oendl;
18} 22}
19 23
20PPPData* InterfacePPP::data()const 24PPPData* InterfacePPP::data()const
21{ 25{
22 if (!_dataPtr){ 26 if (!_dataPtr){
23 odebug << "creating new Data obj" << oendl; 27 odebug << "creating new Data obj" << oendl;
24 _dataPtr = new PPPData(); 28 _dataPtr = new PPPData();
25 _dataPtr->setDevice( getInterfaceName() ); 29 _dataPtr->setDevice( getInterfaceName() );
26 _dataPtr->setAccount( getHardwareName() ); 30 _dataPtr->setAccount( getHardwareName() );
27 } 31 }
28 return _dataPtr; 32 return _dataPtr;
29} 33}
30 34
31Modem* InterfacePPP::modem()const 35Modem* InterfacePPP::modem()const
32{ 36{
33 if (!_modemPtr){ 37 if (!_modemPtr){
34 odebug << "creating new modem obj" << oendl; 38 odebug << "creating new modem obj" << oendl;
35 _modemPtr = new Modem( data() ); 39 _modemPtr = new Modem( data() );
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp
index f3f2639..5913a22 100644
--- a/noncore/settings/networksettings/ppp/modem.cpp
+++ b/noncore/settings/networksettings/ppp/modem.cpp
@@ -3,48 +3,53 @@
3 * 3 *
4 * $Id$ 4 * $Id$
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 * This file was added by Harri Porten <porten@tu-harburg.de> 9 * This file was added by Harri Porten <porten@tu-harburg.de>
10 * 10 *
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/* OPIE */
28#include <opie2/odebug.h>
29using namespace Opie::Core;
30
31/* STD */
27#include <errno.h> 32#include <errno.h>
28#include <stdlib.h> 33#include <stdlib.h>
29#include <unistd.h> 34#include <unistd.h>
30#include <fcntl.h> 35#include <fcntl.h>
31#include <signal.h> 36#include <signal.h>
32#include <sys/ioctl.h> 37#include <sys/ioctl.h>
33#include <sys/types.h> 38#include <sys/types.h>
34#include <sys/stat.h> 39#include <sys/stat.h>
35#include <setjmp.h> 40#include <setjmp.h>
36#include <regex.h> 41#include <regex.h>
37#include <qregexp.h> 42#include <qregexp.h>
38#include <assert.h> 43#include <assert.h>
39#include <string.h> 44#include <string.h>
40 45
41#ifdef HAVE_RESOLV_H 46#ifdef HAVE_RESOLV_H
42# include <arpa/nameser.h> 47# include <arpa/nameser.h>
43# include <resolv.h> 48# include <resolv.h>
44#endif 49#endif
45 50
46#ifndef _PATH_RESCONF 51#ifndef _PATH_RESCONF
47#define _PATH_RESCONF "/etc/resolv.conf" 52#define _PATH_RESCONF "/etc/resolv.conf"
48#endif 53#endif
49 54
50#define strlcpy strcpy 55#define strlcpy strcpy
diff --git a/noncore/settings/networksettings/ppp/ppp.pro b/noncore/settings/networksettings/ppp/ppp.pro
index 62ca2b5..45fa0ee 100644
--- a/noncore/settings/networksettings/ppp/ppp.pro
+++ b/noncore/settings/networksettings/ppp/ppp.pro
@@ -1,17 +1,14 @@
1#TEMPLATE = app
2#
3TEMPLATE = lib 1TEMPLATE = lib
4#CONFIG += qt plugin warn_on
5 CONFIG += qt plugin warn_on 2 CONFIG += qt plugin warn_on
6DESTDIR = $(OPIEDIR)/plugins/networksettings 3DESTDIR = $(OPIEDIR)/plugins/networksettings
7 HEADERS = pppmodule.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h conwindow.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h interfaceinformationppp.h interfaceppp.h authwidget.h chooserwidget.h devices.h 4 HEADERS = pppmodule.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h conwindow.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h interfaceinformationppp.h interfaceppp.h authwidget.h chooserwidget.h devices.h
8 SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp conwindow.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp interfaceinformationppp.cpp interfaceppp.cpp authwidget.cpp chooserwidget.cpp devices.cpp 5 SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp conwindow.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp interfaceinformationppp.cpp interfaceppp.cpp authwidget.cpp chooserwidget.cpp devices.cpp
9 INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ 6 INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/
10 DEPENDPATH+= $(OPIEDIR)/include 7 DEPENDPATH+= $(OPIEDIR)/include
11LIBS += -lqpe -L../interfaces/ -linterfaces 8LIBS += -lqpe -L../interfaces/ -linterfaces
12 TARGET = kppp 9 TARGET = kppp
13 VERSION = 1.0.0 10 VERSION = 1.0.0
14 11
15 12
16 13
17include ( $(OPIEDIR)/include.pro ) 14include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp
index a8c99fd..d2a1490 100644
--- a/noncore/settings/networksettings/ppp/pppconfig.cpp
+++ b/noncore/settings/networksettings/ppp/pppconfig.cpp
@@ -1,38 +1,42 @@
1
2#include <qlayout.h>
3#include <qmessagebox.h>
4#include <qtabwidget.h>
5
6#include "accounts.h" 1#include "accounts.h"
7#include "devices.h" 2#include "devices.h"
8#include "general.h" 3#include "general.h"
9#include "interfaceppp.h" 4#include "interfaceppp.h"
10#include "modem.h" 5#include "modem.h"
11#include "pppconfig.h" 6#include "pppconfig.h"
12#include "pppdata.h" 7#include "pppdata.h"
13#include "runtests.h" 8#include "runtests.h"
14 9
10/* OPIE */
11#include <opie2/odebug.h>
12using namespace Opie::Core;
13
14/* QT */
15#include <qlayout.h>
16#include <qmessagebox.h>
17#include <qtabwidget.h>
18
15PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent, 19PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent,
16 const char *name, 20 const char *name,
17 bool modal, WFlags fl ) 21 bool modal, WFlags fl )
18 : QDialog(parent, name, modal, fl) 22 : QDialog(parent, name, modal, fl)
19{ 23{
20 setCaption(tr("Configure Modem")); 24 setCaption(tr("Configure Modem"));
21 int result = runTests(); 25 int result = runTests();
22 if(result == TEST_CRITICAL){ 26 if(result == TEST_CRITICAL){
23 QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); 27 QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") );
24 return; 28 return;
25 } 29 }
26 30
27 interface = iface; 31 interface = iface;
28 odebug << "PPPConfigWidget::PPPConfigWidget" << oendl; 32 odebug << "PPPConfigWidget::PPPConfigWidget" << oendl;
29 odebug << " interface->getHardwareName >" << interface->getHardwareName().latin1() << "<" << oendl; 33 odebug << " interface->getHardwareName >" << interface->getHardwareName().latin1() << "<" << oendl;
30 34
31 odebug << " _pppdata->accname >" << interface->data()->accname().latin1() << "<" << oendl; 35 odebug << " _pppdata->accname >" << interface->data()->accname().latin1() << "<" << oendl;
32 36
33 37
34 QVBoxLayout *layout = new QVBoxLayout( this ); 38 QVBoxLayout *layout = new QVBoxLayout( this );
35 layout->setSpacing( 0 ); 39 layout->setSpacing( 0 );
36 layout->setMargin( 1 ); 40 layout->setMargin( 1 );
37 tabWindow = new QTabWidget( this, "tabWidget" ); 41 tabWindow = new QTabWidget( this, "tabWidget" );
38 layout->addWidget( tabWindow ); 42 layout->addWidget( tabWindow );
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>
33using 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
43PPPData::PPPData() 45PPPData::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
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index 2291e8a..b102a10 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -1,35 +1,37 @@
1 1
2#include "modem.h" 2#include "modem.h"
3#include "pppconfig.h" 3#include "pppconfig.h"
4#include "pppmodule.h" 4#include "pppmodule.h"
5#include "pppdata.h" 5#include "pppdata.h"
6#include "interfaceinformationppp.h" 6#include "interfaceinformationppp.h"
7#include "interfaceppp.h" 7#include "interfaceppp.h"
8 8
9/* OPIE */ 9/* OPIE */
10#include <opie2/odebug.h>
10#include <qpe/config.h> 11#include <qpe/config.h>
11#include <qpe/qpeapplication.h> 12#include <qpe/qpeapplication.h>
13using namespace Opie::Core;
12 14
13/* QT */ 15/* QT */
14 16
15/* STD */ 17/* STD */
16#include <errno.h> 18#include <errno.h>
17#include <signal.h> 19#include <signal.h>
18 20
19// don't polute global namespace 21// don't polute global namespace
20namespace 22namespace
21{ 23{
22 /* 24 /*
23 * If network settings is qutting and we've ppp 25 * If network settings is qutting and we've ppp
24 * devices open we need to save the pid_t the PPData 26 * devices open we need to save the pid_t the PPData
25 * and the interface number 27 * and the interface number
26 */ 28 */
27 struct Connection 29 struct Connection
28 { 30 {
29 pid_t pid; 31 pid_t pid;
30 QString device; 32 QString device;
31 QString name; 33 QString name;
32 }; 34 };
33 class InterfaceKeeper 35 class InterfaceKeeper
34 { 36 {
35 public: 37 public: