summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/modem.h
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/modem.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/modem.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.h b/noncore/settings/networksettings/ppp/modem.h
index b494977..103cbeb 100644
--- a/noncore/settings/networksettings/ppp/modem.h
+++ b/noncore/settings/networksettings/ppp/modem.h
@@ -26,33 +26,33 @@
26 26
27#ifndef _MODEM_H_ 27#ifndef _MODEM_H_
28#define _MODEM_H_ 28#define _MODEM_H_
29 29
30#include <qdir.h> 30#include <qdir.h>
31 31
32#include <sys/types.h> 32#include <sys/types.h>
33#include <termios.h> 33#include <termios.h>
34#include <unistd.h> 34#include <unistd.h>
35 35
36#include <qsocketnotifier.h> 36#include <qsocketnotifier.h>
37 37
38//#include <config.h> 38class PPPData;
39 39
40void alarm_handler(int); 40void alarm_handler(int);
41const char *pppdPath(); 41const char *pppdPath();
42 42
43class Modem : public QObject { 43class Modem : public QObject {
44 Q_OBJECT 44 Q_OBJECT
45public: 45public:
46 Modem(); 46 Modem(PPPData*);
47 ~Modem(); 47 ~Modem();
48 48
49 const QString getDevice() {return device;}; 49 const QString getDevice() {return device;};
50 void setDevice(const QString dev) {device = dev;}; 50 void setDevice(const QString dev) {device = dev;};
51 51
52 bool opentty(); 52 bool opentty();
53 bool closetty(); 53 bool closetty();
54 bool hangup(); 54 bool hangup();
55 bool writeChar(unsigned char); 55 bool writeChar(unsigned char);
56 bool writeLine(const char *); 56 bool writeLine(const char *);
57 bool dataMode() const { return data_mode; } 57 bool dataMode() const { return data_mode; }
58 void setDataMode(bool set) { data_mode = set; } 58 void setDataMode(bool set) { data_mode = set; }
@@ -67,25 +67,25 @@ public:
67 void unlockdevice(); 67 void unlockdevice();
68 68
69 bool setSecret(int,const char*,const char*); 69 bool setSecret(int,const char*,const char*);
70 bool removeSecret(int); 70 bool removeSecret(int);
71 void killPPPDaemon(); 71 void killPPPDaemon();
72 int pppdExitStatus(); 72 int pppdExitStatus();
73 bool execPPPDaemon(const QString & arguments); 73 bool execPPPDaemon(const QString & arguments);
74 int openResolv(int flags); 74 int openResolv(int flags);
75 bool setHostname(const QString & name); 75 bool setHostname(const QString & name);
76 76
77public: 77public:
78 enum Auth { PAP = 1, CHAP }; 78 enum Auth { PAP = 1, CHAP };
79 static Modem *modem; 79 // static Modem *modem;
80 int lastStatus; 80 int lastStatus;
81 81
82signals: 82signals:
83 void charWaiting(unsigned char); 83 void charWaiting(unsigned char);
84 84
85private slots: 85private slots:
86 void startNotifier(); 86 void startNotifier();
87 void stopNotifier(); 87 void stopNotifier();
88 void readtty(int); 88 void readtty(int);
89 89
90private: 90private:
91 enum { MaxPathLen = 30, MaxStrLen = 40, MaxArgs = 100 }; 91 enum { MaxPathLen = 30, MaxStrLen = 40, MaxArgs = 100 };
@@ -103,17 +103,18 @@ private:
103private: 103private:
104 QString device; 104 QString device;
105 QString lockfile; 105 QString lockfile;
106 int modemfd; 106 int modemfd;
107 int pppdPid; 107 int pppdPid;
108 int _pppdExitStatus; 108 int _pppdExitStatus;
109 QSocketNotifier *sn; 109 QSocketNotifier *sn;
110 bool data_mode; 110 bool data_mode;
111 QString errmsg; 111 QString errmsg;
112 struct termios initial_tty; 112 struct termios initial_tty;
113 struct termios tty; 113 struct termios tty;
114 bool modem_is_locked; 114 bool modem_is_locked;
115 PPPData *_pppdata;
115}; 116};
116 117
117#endif 118#endif
118 119
119 120