kpty.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __kpty_h__
00024 #define __kpty_h__
00025
00026 #include <qglobal.h>
00027 #include <kdelibs_export.h>
00028
00029 #ifdef Q_OS_UNIX
00030
00031 struct KPtyPrivate;
00032
00040 class KDECORE_EXPORT KPty {
00041
00042 public:
00043
00047 KPty();
00048
00055 ~KPty();
00056
00062 bool open();
00063
00069 bool setPty(int pty_master);
00070
00074 void close();
00075
00080 void setCTty();
00081
00092 void login(const char *user = 0, const char *remotehost = 0);
00093
00097 void logout();
00098
00106 void setWinSize(int lines, int columns);
00107
00115 void setXonXoff(bool useXonXoff);
00116
00124 void setUtf8Mode(bool useUtf8);
00125
00126
00132 const char *ttyName() const;
00133
00139 int masterFd() const;
00140
00146 int slaveFd() const;
00147
00148 protected:
00149 bool _attachPty(int pty_master);
00150
00151 private:
00152 bool chownpty(bool grant);
00153
00154 KPtyPrivate *d;
00155 };
00156
00157 #endif //Q_OS_UNIX
00158 #endif
00159
|