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

tdecore

  • tdecore
tdeprocio.h
1 /* This file is part of the TDE 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 TDEPROCIO_H_
19 #define TDEPROCIO_H_
20 
21 #include <tqstring.h>
22 #include <tdeprocess.h>
23 #include <tqstrlist.h>
24 #include "tdelibs_export.h"
25 
26 class TDEProcIOPrivate;
27 class TQTextCodec;
28 
50 class TDECORE_EXPORT TDEProcIO : public TDEProcess
51 {
52  TQ_OBJECT
53 
54 public:
58  TDEProcIO ( TQTextCodec *codec = 0 );
59 
63  ~TDEProcIO();
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  TDE_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  TDE_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(TDEProcIO *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 (TDEProcess *proc, char *buffer, int buflen);
208  void sent (TDEProcess *);
209 
210 protected:
211  virtual void virtual_hook( int id, void* data );
212 private:
213  TDEProcIOPrivate *d;
214 };
215 
216 #endif
TDEProcIO
TDEProcIO.
Definition: tdeprocio.h:51
TDEProcIO::fgets
TDE_DEPRECATED int fgets(TQString &line, bool autoAck=false)
This function calls readln().
Definition: tdeprocio.h:162
TDEProcIO::readReady
void readReady(TDEProcIO *pio)
Emitted when the process is ready for reading.
TDEProcIO::fputs
TDE_DEPRECATED bool fputs(const TQString &line, bool AppendNewLine=true)
This function just calls writeStdin().
Definition: tdeprocio.h:123
TDEProcess
Child process invocation, monitoring and control.
Definition: tdeprocess.h:131
TDEProcess::start
virtual bool start(RunMode runmode=NotifyOnExit, Communication comm=NoCommunication)
Starts the process.
Definition: tdeprocess.cpp:293
TDEProcess::RunMode
RunMode
Run-modes for a child process.
Definition: tdeprocess.h:169
TDEProcess::Communication
Communication
Modes in which the communication channel can be opened.
Definition: tdeprocess.h:157
TDEProcess::writeStdin
bool writeStdin(const char *buffer, int buflen)
Definition: tdeprocess.cpp:623

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.1
This website is maintained by Timothy Pearson.