⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modem.h

📁 KDE下的西门子手机管理程序
💻 H
字号:
/* *              kPPP: A pppd Front End for the KDE project * * $Id: modem.h,v 1.1 2001/02/16 13:02:25 matze Exp $ * *              Copyright (C) 1997 Bernd Johannes Wuebben *                      wuebben@math.cornell.edu *  * This file was added by Harri Porten <porten@tu-harburg.de> * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */#ifndef _MODEM_H_#define _MODEM_H_#include <qdir.h>#include <sys/types.h>#include <termios.h>#include <unistd.h>#include <qsocketnotifier.h>#include <config.h>void    alarm_handler(int);class Modem : public QObject {  Q_OBJECTpublic:  Modem();  ~Modem();  bool opentty(const QString&);  bool closetty();  bool hangup();  bool writeChar(unsigned char);  bool writeLine(const char *);  bool dataMode() const { return data_mode; }  void setDataMode(bool set) { data_mode = set; }  const QString& modemMessage();  speed_t modemSpeed();  void notify(const QObject *, const char *);  void stop();  void flush();  /** returns the modem init delay, in milliseconds */  int modemInitDelay() const;  /** returns the current modem hangup string (e.g. "ATH0") */  const QString& modemHangupString() const;  /** return the current line termination character, which is either "CR", "LF" or "CR/LF" */  const QString& lineTerminator() const;  /** return the guard time after sending the escape sequence to the modem in milliseconds */  int modemEscapeGuardTime() const;  /** return the escape sequence of the modem */  const QString& modemEscapeString() const;  /** set the line terminator. valid are "CR", "CR/LF", "ESC". */  void setLineTerminator(QString);signals:  void charWaiting(unsigned char);private slots:  void startNotifier();  void stopNotifier();  void readtty(int);  private:  void escape_to_command_mode();  /** return the flow control setting of the modem device */  const QString & flowControl() const;private:  int modemfd;  QSocketNotifier *sn;  bool data_mode;  QString errmsg;  struct termios initial_tty;  struct termios tty;  /** hangup string to send to the modem */  QString m_modemHangupString;  /** holds the current line terminator of the modem */  QString m_lineTerminator;  /** the data rate of the modem */  speed_t m_modemSpeed;  /**  modem escape guard time in milliseconds */  int m_modemEscapeGuardTime;  /** the escape sequence to return to command mode */  QString m_modemEscapeString;  /** modem init delay in milliseconds */  int m_modemInitDelay;  /** the flow control mode of the modem */  QString m_flowControl;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -