3 * kPPP: A pppd front end for the KDE project
7 * Copyright (C) 1997 Bernd Johannes Wuebben
8 * wuebben@math.cornell.edu
11 * Copyright (C) 1997 Jay Painter
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Library General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Library General Public License for more details.
24 * You should have received a copy of the GNU Library General Public
25 * License along with this program; if not, write to the Free
26 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
34 #include <QTimerEvent>
35 #include <QCloseEvent>
36 #include <kpushbutton.h>
40 #include "kpppconfig.h"
43 #include "loginterm.h"
45 #define MAXLOOPNEST (MAX_SCRIPT_ENTRIES/2)
49 class ConnectWidget
: public QWidget
{
52 ConnectWidget(QWidget
*parent
, const char *name
, PPPStats
*st
);
56 void set_con_speed_string();
57 void setMsg(const QString
&);
60 // these are only necessary to prevent the user from clicking in the cancel
61 // button during the disconnect delay in KPPPWidget
62 void disableButtons();
67 void aboutToConnect();
71 void timerEvent(QTimerEvent
*);
72 void closeEvent( QCloseEvent
*e
);
75 void readChar(unsigned char);
77 void if_waiting_slot();
82 void script_timed_out();
83 void if_waiting_timed_out();
87 void if_waiting_signal();
88 void debugMessage(const QString
&);
89 void toggleDebugWindow();
90 void closeDebugWindow();
91 void debugPutChar(unsigned char);
92 void startAccounting();
93 void stopAccounting();
96 QString myreadbuffer
; // we want to keep every thing in order to fish for the
98 // connection speed later on
106 QString scriptCommand
, scriptArgument
;
107 QStringList
*comlist
, *arglist
;
109 // static const int maxloopnest=(MAX_SCRIPT_ENTRIES/2);
111 int loopstartindex
[MAXLOOPNEST
];
113 QString loopstr
[MAXLOOPNEST
];
118 QTimer
*timeout_timer
;
120 void writeline(const QString
&);
123 void setExpect(const QString
&);
129 void setScan(const QString
&);
137 LoginTerm
*termwindow
;
142 QTimer
*if_timeout_timer
;
150 int dialnumber
; // the current number to dial
156 // non-member function to kill&wait on the pppd child process
157 extern void killppp();
161 void add_domain(const QString
& newdomain
);
162 void auto_hostname();