# class KProcIO |
Definition | `#include <kprocio.h>`
Inherits | KProcess (kdecore) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KProcIO ( QTextCodec *codec = 0 )
- bool start (RunMode runmode = NotifyOnExit)
- virtual bool writeStdin (const QString &line, bool AppendNewLine=TRUE)
- bool fputs (const QString &line, bool AppendNewLine=TRUE)
- virtual int readln (QString &line, bool autoAck=FALSE)
- int fgets (QString &line, bool autoAck=FALSE)
- virtual void resetAll ()
- virtual void ackRead ()
- void enableReadSignals (bool enable)

#### Signals

- void readReady (KProcIO *)

#### Protected Methods

- void controlledEmission ()

#### Protected Slots

- void received (KProcess *proc, char *buffer, int buflen)
- void sent (KProcess *)

#### Protected Members

- QStrList qlist
- QCString recvbuffer
- QTextCodec *codec
- int rbi
- bool needreadsignal
- bool readsignalon
- bool writeready

## Detailed Description

KProcIO ( QTextCodec *codec = 0 ) | ### KProcIO

bool start (RunMode runmode = NotifyOnExit) | ### start

Reimplemented from KProcess.

bool writeStdin (const QString &line, bool AppendNewLine=TRUE) | ### writeStdin

[virtual]

The buffer is zero terminated. A deep copy is made of the buffer, so you don't need to bother with that. A newline ( '\n' ) is appended unless you specify FALSE as the second parameter. FALSE is returned on an error, or else TRUE is.

Reimplemented from KProcess.

bool fputs (const QString &line, bool AppendNewLine=TRUE) | ### fputs

int readln (QString &line, bool autoAck=FALSE) | ### readln

[virtual]

readln() reads up to '\n' (or max characters) and returns the number of characters placed in buffer. Zero is returned if no more data is available.

Use readln() in response to a readReady() signal. You may use it multiple times if more than one line of data is available. Be sure to use ackRead() when you have finished processing the readReady() signal. This informs KProcIO that you are ready for another readReady() signal.

readln() never blocks.

autoAck==TRUE makes these functions call ackRead() for you.

int fgets (QString &line, bool autoAck=FALSE) | ### fgets

void resetAll () | ### resetAll

[virtual]

Reset the class. Doesn't kill the process.

void ackRead () | ### ackRead

[virtual]

Call this after you have finished processing a readReady() signal. This call need not be made in the slot that was signalled by readReady(). You won't receive any more readReady() signals until you acknowledge with ackRead(). This prevents your slot from being reentered while you are still processesing the current data. If this doesn't matter, then call ackRead() right away in your readReady()-processing slot.

void enableReadSignals (bool enable) | ### enableReadSignals

Turns readReady() signals on and off. You can turn this off at will and not worry about losing any data. (as long as you turn it back on at some point...)

void readReady (KProcIO *) | ### readReady

[signal]

QStrList qlist | ### qlist

[protected]

QCString recvbuffer | ### recvbuffer

[protected]

QTextCodec * codec | ### codec

[protected]

int rbi | ### rbi

[protected]

bool needreadsignal | ### needreadsignal

[protected]

bool readsignalon | ### readsignalon

[protected]

bool writeready | ### writeready

[protected]

void controlledEmission () | ### controlledEmission

[protected]

void received (KProcess *proc, char *buffer, int buflen) | ### received

[protected slots slot]

void sent (KProcess *) | ### sent

[protected slots slot]

Generated by: root@sparc.ports.openbsd.org on Wed May 2 09:46:40 2001, using kdoc 2.0a53.