class KProcIO


Definition#include <kprocio.h>
InheritsKProcess [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Protected Methods

Protected Slots

Protected Members


Detailed Description

 KProcIO ( QTextCodec *codec = 0 )

KProcIO

 ~KProcIO ()

~KProcIO

bool  start (RunMode runmode = NotifyOnExit, bool includeStderr = false)

start

Starts the process.

The following problems could cause this function to return false:

Parameters:
runmodeFor a detailed description of the various run modes, have a look at the general description of the KProcess class.
includeStderrIf true, data from both stdout and stderr is listened to. If false, only stdout is listened to.

Returns: true on success, false on error

Reimplemented from KProcess.

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

writeStdin

Writes text to stdin of the process.

Parameters:
lineText to write.
AppendNewLineif true, a newline '\n' is appended.

Reimplemented from KProcess.

bool  writeStdin (const QCString &line, bool appendnewline)

writeStdin

Reimplemented from KProcess.

bool  writeStdin (const QByteArray &data)

writeStdin

Writes data to stdin of the process.

Parameters:
dataData to write.

Reimplemented from KProcess.

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

fputs

void  closeWhenDone ()

closeWhenDone

closes stdin after all data has been send.

int  readln (QString &line, bool autoAck=true, bool *partial=0)

readln

reads a line of text (up to and including '\n')

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.

Parameters:
lineis used to store the line that was read.
autoAckwhen true, ackRead() is called for you.
partialwhen provided the line is returned even if it does not contain a '\n'. *partial will be set to false if the line contains a '\n' and false otherwise.

Returns: the number of characters read, or -1 if no data is available.

int  fgets (QString &line, bool autoAck=false)

fgets

void  resetAll ()

resetAll

Reset the class. Doesn't kill the process.

void  ackRead ()

ackRead

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 processing 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]

QPtrList<QByteArray> outbuffer

outbuffer

[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]

void  virtual_hook ( int id, void* data )

virtual_hook

[protected virtual]

Reimplemented from KProcess.


Generated by: dfaure on faure on Tue Apr 16 08:49:00 2002, using kdoc 2.0a53.