Diffstat (limited to 'noncore/settings/networksettings/ppp/modem.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/modem.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.h b/noncore/settings/networksettings/ppp/modem.h index 103cbeb..8ecc354 100644 --- a/noncore/settings/networksettings/ppp/modem.h +++ b/noncore/settings/networksettings/ppp/modem.h | |||
@@ -46,12 +46,14 @@ public: | |||
46 | Modem(PPPData*); | 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 | void save(); | ||
53 | |||
52 | bool opentty(); | 54 | bool opentty(); |
53 | bool closetty(); | 55 | bool closetty(); |
54 | bool hangup(); | 56 | bool hangup(); |
55 | bool writeChar(unsigned char); | 57 | bool writeChar(unsigned char); |
56 | bool writeLine(const char *); | 58 | bool writeLine(const char *); |
57 | bool dataMode() const { return data_mode; } | 59 | bool dataMode() const { return data_mode; } |
@@ -71,24 +73,30 @@ public: | |||
71 | void killPPPDaemon(); | 73 | void killPPPDaemon(); |
72 | int pppdExitStatus(); | 74 | int pppdExitStatus(); |
73 | bool execPPPDaemon(const QString & arguments); | 75 | bool execPPPDaemon(const QString & arguments); |
74 | int openResolv(int flags); | 76 | int openResolv(int flags); |
75 | bool setHostname(const QString & name); | 77 | bool setHostname(const QString & name); |
76 | 78 | ||
79 | QString pppDevice()const; | ||
80 | void setPPPDevice( const QString& ); | ||
81 | pid_t pppPID()const; | ||
82 | void setPPPDPid( pid_t ); | ||
83 | |||
77 | public: | 84 | public: |
78 | enum Auth { PAP = 1, CHAP }; | 85 | enum Auth { PAP = 1, CHAP }; |
79 | // static Modem *modem; | 86 | // static Modem *modem; |
80 | int lastStatus; | 87 | int lastStatus; |
81 | 88 | ||
82 | signals: | 89 | signals: |
83 | void charWaiting(unsigned char); | 90 | void charWaiting(unsigned char); |
84 | 91 | ||
85 | private slots: | 92 | private slots: |
86 | void startNotifier(); | 93 | void startNotifier(); |
87 | void stopNotifier(); | 94 | void stopNotifier(); |
88 | void readtty(int); | 95 | void readtty(int); |
96 | void slotModemDebug(int); | ||
89 | 97 | ||
90 | private: | 98 | private: |
91 | enum { MaxPathLen = 30, MaxStrLen = 40, MaxArgs = 100 }; | 99 | enum { MaxPathLen = 30, MaxStrLen = 40, MaxArgs = 100 }; |
92 | enum { Original=0x100, New=0x200, Old=0x400 } Version; | 100 | enum { Original=0x100, New=0x200, Old=0x400 } Version; |
93 | 101 | ||
94 | const char* authFile(Auth method, int version = Original ); | 102 | const char* authFile(Auth method, int version = Original ); |
@@ -104,17 +112,20 @@ private: | |||
104 | QString device; | 112 | QString device; |
105 | QString lockfile; | 113 | QString lockfile; |
106 | int modemfd; | 114 | int modemfd; |
107 | int pppdPid; | 115 | int pppdPid; |
108 | int _pppdExitStatus; | 116 | int _pppdExitStatus; |
109 | QSocketNotifier *sn; | 117 | QSocketNotifier *sn; |
118 | QSocketNotifier *m_modemDebug; | ||
110 | bool data_mode; | 119 | bool data_mode; |
111 | QString errmsg; | 120 | QString errmsg; |
112 | struct termios initial_tty; | 121 | struct termios initial_tty; |
113 | struct termios tty; | 122 | struct termios tty; |
114 | bool modem_is_locked; | 123 | bool modem_is_locked; |
115 | PPPData *_pppdata; | 124 | PPPData *_pppdata; |
125 | int m_pppdLOG[2]; | ||
126 | QString m_pppdDev; | ||
116 | }; | 127 | }; |
117 | 128 | ||
118 | #endif | 129 | #endif |
119 | 130 | ||
120 | 131 | ||