/****************************************************************************
**
** DCOP Stub Implementation created by dcopidl2cpp from WebServer.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "WebServer_stub.h"
#include <dcopclient.h>

#include <kdatastream.h>

namespace KPF {

WebServer_stub::WebServer_stub( const TQCString& app, const TQCString& obj )
  : DCOPStub( app, obj )
{
}

WebServer_stub::WebServer_stub( DCOPClient* client, const TQCString& app, const TQCString& obj )
  : DCOPStub( client, app, obj )
{
}

WebServer_stub::WebServer_stub( const DCOPRef& ref )
  : DCOPStub( ref )
{
}

TQString WebServer_stub::root()
{
    TQString result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "root()", data, replyType, replyData ) ) {
	if ( replyType == "TQString" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

TQString WebServer_stub::serverName()
{
    TQString result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "serverName()", data, replyType, replyData ) ) {
	if ( replyType == "TQString" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

ulong WebServer_stub::bandwidthLimit()
{
    ulong result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "bandwidthLimit()", data, replyType, replyData ) ) {
	if ( replyType == "ulong" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

uint WebServer_stub::connectionLimit()
{
    uint result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "connectionLimit()", data, replyType, replyData ) ) {
	if ( replyType == "uint" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

uint WebServer_stub::listenPort()
{
    uint result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "listenPort()", data, replyType, replyData ) ) {
	if ( replyType == "uint" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

bool WebServer_stub::followSymlinks()
{
    bool result = false;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "followSymlinks()", data, replyType, replyData ) ) {
	if ( replyType == "bool" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

bool WebServer_stub::customErrorMessages()
{
    bool result = false;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "customErrorMessages()", data, replyType, replyData ) ) {
	if ( replyType == "bool" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

void WebServer_stub::setBandwidthLimit( ulong arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "setBandwidthLimit(ulong)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void WebServer_stub::setConnectionLimit( uint arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "setConnectionLimit(uint)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void WebServer_stub::setListenPort( uint arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "setListenPort(uint)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void WebServer_stub::setServerName( const TQString& arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "setServerName(TQString)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void WebServer_stub::setFollowSymlinks( bool arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "setFollowSymlinks(bool)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void WebServer_stub::setCustomErrorMessages( bool arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "setCustomErrorMessages(bool)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void WebServer_stub::set( uint arg0, ulong arg1, uint arg2, bool arg3, const TQString& arg4 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    arg << arg3;
    arg << arg4;
    if ( dcopClient()->call( app(), obj(), "set(uint,ulong,uint,bool,TQString)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void WebServer_stub::restart()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "restart()", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void WebServer_stub::pause( bool arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "pause(bool)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

bool WebServer_stub::paused()
{
    bool result = false;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "paused()", data, replyType, replyData ) ) {
	if ( replyType == "bool" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

bool WebServer_stub::portContention()
{
    bool result = false;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "portContention()", data, replyType, replyData ) ) {
	if ( replyType == "bool" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

uint WebServer_stub::connectionCount()
{
    uint result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "connectionCount()", data, replyType, replyData ) ) {
	if ( replyType == "uint" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

} // namespace

