@ -24,19 +24,19 @@
# include <stdio.h>
# include " k procio.h"
# include " tde procio.h"
# include <kdebug.h>
# include <tqtextcodec.h>
class K ProcIOPrivate {
class TDE ProcIOPrivate {
public :
K ProcIOPrivate( ) : comm ( TDEProcess : : All ) { }
TDE ProcIOPrivate( ) : comm ( TDEProcess : : All ) { }
TDEProcess : : Communication comm ;
} ;
KProcIO: : K ProcIO ( TQTextCodec * _codec )
: codec ( _codec ) , d ( new K ProcIOPrivate)
TDEProcIO: : TDE ProcIO ( TQTextCodec * _codec )
: codec ( _codec ) , d ( new TDE ProcIOPrivate)
{
rbi = 0 ;
readsignalon = writeready = true ;
@ -52,13 +52,13 @@ KProcIO::KProcIO ( TQTextCodec *_codec)
}
}
KProcIO: : ~ K ProcIO( )
TDEProcIO: : ~ TDE ProcIO( )
{
delete d ;
}
void
K ProcIO: : resetAll ( )
TDE ProcIO: : resetAll ( )
{
if ( isRunning ( ) )
kill ( ) ;
@ -80,12 +80,12 @@ KProcIO::resetAll ()
}
void K ProcIO: : setComm ( Communication comm )
void TDE ProcIO: : setComm ( Communication comm )
{
d - > comm = comm ;
}
bool K ProcIO: : start ( RunMode runmode , bool includeStderr )
bool TDE ProcIO: : start ( RunMode runmode , bool includeStderr )
{
connect ( this , TQ_SIGNAL ( receivedStdout ( TDEProcess * , char * , int ) ) ,
this , TQ_SLOT ( received ( TDEProcess * , char * , int ) ) ) ;
@ -102,12 +102,12 @@ bool KProcIO::start (RunMode runmode, bool includeStderr)
return TDEProcess : : start ( runmode , d - > comm ) ;
}
bool K ProcIO: : writeStdin ( const TQString & line , bool appendnewline )
bool TDE ProcIO: : writeStdin ( const TQString & line , bool appendnewline )
{
return writeStdin ( TQCString ( codec - > fromUnicode ( line ) ) , appendnewline ) ;
}
bool K ProcIO: : writeStdin ( const TQCString & line , bool appendnewline )
bool TDE ProcIO: : writeStdin ( const TQCString & line , bool appendnewline )
{
TQCString * qs = new TQCString ( line ) ;
@ -136,7 +136,7 @@ bool KProcIO::writeStdin (const TQCString &line, bool appendnewline)
return true ;
}
bool K ProcIO: : writeStdin ( const TQByteArray & data )
bool TDE ProcIO: : writeStdin ( const TQByteArray & data )
{
if ( ! data . size ( ) )
return true ;
@ -151,7 +151,7 @@ bool KProcIO::writeStdin(const TQByteArray &data)
return true ;
}
void K ProcIO: : closeWhenDone ( )
void TDE ProcIO: : closeWhenDone ( )
{
if ( writeready )
{
@ -163,7 +163,7 @@ void KProcIO::closeWhenDone()
return ;
}
void K ProcIO: : sent ( TDEProcess * )
void TDE ProcIO: : sent ( TDEProcess * )
{
outbuffer . removeFirst ( ) ;
@ -186,21 +186,21 @@ void KProcIO::sent(TDEProcess *)
}
void K ProcIO: : received ( TDEProcess * , char * buffer , int buflen )
void TDE ProcIO: : received ( TDEProcess * , char * buffer , int buflen )
{
recvbuffer + = TQCString ( buffer , buflen + 1 ) ;
controlledEmission ( ) ;
}
void K ProcIO: : ackRead ( )
void TDE ProcIO: : ackRead ( )
{
readsignalon = true ;
if ( needreadsignal | | recvbuffer . length ( ) ! = 0 )
controlledEmission ( ) ;
}
void K ProcIO: : controlledEmission ( )
void TDE ProcIO: : controlledEmission ( )
{
if ( readsignalon )
{
@ -214,7 +214,7 @@ void KProcIO::controlledEmission ()
}
}
void K ProcIO: : enableReadSignals ( bool enable )
void TDE ProcIO: : enableReadSignals ( bool enable )
{
readsignalon = enable ;
@ -222,7 +222,7 @@ void KProcIO::enableReadSignals (bool enable)
emit readReady ( this ) ;
}
int K ProcIO: : readln ( TQString & line , bool autoAck , bool * partial )
int TDE ProcIO: : readln ( TQString & line , bool autoAck , bool * partial )
{
int len ;
@ -269,8 +269,8 @@ int KProcIO::readln (TQString &line, bool autoAck, bool *partial)
}
void K ProcIO: : virtual_hook ( int id , void * data )
void TDE ProcIO: : virtual_hook ( int id , void * data )
{ TDEProcess : : virtual_hook ( id , data ) ; }
# include " k procio.moc"
# include " tde procio.moc"