KDE3Support
k3procio.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1997 David Sweet <dsweet@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 #ifndef K3PROCIO_H 00019 #define K3PROCIO_H 00020 00021 #include <kde3support_export.h> 00022 #include <k3process.h> 00023 00024 #include <QtCore/QString> 00025 00026 class KProcIOPrivate; 00027 class QTextCodec; 00028 00050 class KDE3SUPPORT_EXPORT_DEPRECATED K3ProcIO : public K3Process 00051 { 00052 Q_OBJECT 00053 00054 public: 00058 explicit K3ProcIO ( QTextCodec *codec = 0 ); 00059 00063 ~K3ProcIO(); 00064 00072 void setComm (Communication comm); 00073 00088 bool start (RunMode runmode = NotifyOnExit, bool includeStderr = false); 00089 00096 bool writeStdin(const QString &line, bool appendnewline=true); 00097 00104 bool writeStdin(const QByteArray &line, bool appendnewline); 00105 00111 bool writeStdin(const QByteArray &data); 00112 00116 void closeWhenDone(); 00117 00139 int readln (QString &line, bool autoAck=true, bool *partial=0); 00140 00144 void resetAll (); 00145 00155 void ackRead (); 00156 00163 void enableReadSignals (bool enable); 00164 00165 Q_SIGNALS: 00171 void readReady(K3ProcIO *pio); 00172 00173 protected: 00174 void controlledEmission (); 00175 00176 protected Q_SLOTS: 00177 void received (K3Process *proc, char *buffer, int buflen); 00178 void sent (K3Process *); 00179 00180 private: 00181 KProcIOPrivate* const d; 00182 }; 00183 00184 #endif // K3PROCIO_H 00185
KDE 4.6 API Reference