• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
kprocio.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1997 David Sweet <dsweet@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef KPROCIO_H_
19 #define KPROCIO_H_
20 
21 #include <tqstring.h>
22 #include <kprocess.h>
23 #include <tqstrlist.h>
24 #include "kdelibs_export.h"
25 
26 class KProcIOPrivate;
27 class TQTextCodec;
28 
50 class KDECORE_EXPORT KProcIO : public KProcess
51 {
52  Q_OBJECT
53 
54 public:
58  KProcIO ( TQTextCodec *codec = 0 );
59 
63  ~KProcIO();
64 
72  void setComm (Communication comm);
73 
88  bool start (RunMode runmode = NotifyOnExit, bool includeStderr = false);
89 
96  bool writeStdin(const TQString &line, bool appendnewline=true);
97 
104  bool writeStdin(const TQCString &line, bool appendnewline);
105 
111  bool writeStdin(const TQByteArray &data);
112 
113  //I like fputs better -- it's the same as writeStdin
114  //inline
123  KDE_DEPRECATED bool fputs (const TQString &line, bool AppendNewLine=true)
124  { return writeStdin(line, AppendNewLine); }
125 
129  void closeWhenDone();
130 
152  int readln (TQString &line, bool autoAck=true, bool *partial=0);
153 
162  KDE_DEPRECATED int fgets (TQString &line, bool autoAck=false)
163  { return readln (line, autoAck); }
164 
168  void resetAll ();
169 
179  void ackRead ();
180 
187  void enableReadSignals (bool enable);
188 
189 signals:
195  void readReady(KProcIO *pio);
196 
197 protected:
198  TQPtrList<TQByteArray> outbuffer;
199  TQCString recvbuffer;
200  TQTextCodec *codec;
201  int rbi;
202  bool needreadsignal, readsignalon, writeready;
203 
204  void controlledEmission ();
205 
206 protected slots:
207  void received (KProcess *proc, char *buffer, int buflen);
208  void sent (KProcess *);
209 
210 protected:
211  virtual void virtual_hook( int id, void* data );
212 private:
213  KProcIOPrivate *d;
214 };
215 
216 #endif // KPROCIO_H_
217 

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |