/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from KPPPIface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tdenetwork/src/tdenetwork-trinity-14.1.6/kppp/KPPPIface.h"

#include <kdatastream.h>


static const char* const KpppIface_ftable[4][3] = {
    { "void", "beginConnect()", "beginConnect()" },
    { "void", "disconnect()", "disconnect()" },
    { "bool", "isConnected()", "isConnected()" },
    { 0, 0, 0 }
};
static const int KpppIface_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool KpppIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KpppIface_ftable[0][1] ) { // void beginConnect()
	replyType = KpppIface_ftable[0][0]; 
	beginConnect( );
    } else if ( fun == KpppIface_ftable[1][1] ) { // void disconnect()
	replyType = KpppIface_ftable[1][0]; 
	disconnect( );
    } else if ( fun == KpppIface_ftable[2][1] ) { // bool isConnected()
	replyType = KpppIface_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isConnected( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList KpppIface::interfaces()
{
    QCStringList ifaces = DCOPObject::interfaces();
    ifaces += "KpppIface";
    return ifaces;
}

QCStringList KpppIface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; KpppIface_ftable[i][2]; i++ ) {
	if (KpppIface_ftable_hiddens[i])
	    continue;
	TQCString func = KpppIface_ftable[i][0];
	func += ' ';
	func += KpppIface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

void KpppIface::aboutToConnect()
{
    TQByteArray data;
    emitDCOPSignal( "aboutToConnect()", data );
}

void KpppIface::connected()
{
    TQByteArray data;
    emitDCOPSignal( "connected()", data );
}

void KpppIface::aboutToDisconnect()
{
    TQByteArray data;
    emitDCOPSignal( "aboutToDisconnect()", data );
}

void KpppIface::disconnected()
{
    TQByteArray data;
    emitDCOPSignal( "disconnected()", data );
}


