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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdelibs/src/tdelibs-trinity-14.1.6/tdeioslave/http/kcookiejar/kcookieserver.h"

#include <kdatastream.h>
#include <tqasciidict.h>


static const int KCookieServer_fhash = 19;
static const char* const KCookieServer_ftable[18][3] = {
    { "TQString", "findCookies(TQString)", "findCookies(TQString)" },
    { "TQString", "findCookies(TQString,long int)", "findCookies(TQString,long int)" },
    { "TQStringList", "findDomains()", "findDomains()" },
    { "TQStringList", "findCookies(TQValueList<int>,TQString,TQString,TQString,TQString)", "findCookies(TQValueList<int>,TQString,TQString,TQString,TQString)" },
    { "TQString", "findDOMCookies(TQString)", "findDOMCookies(TQString)" },
    { "TQString", "findDOMCookies(TQString,long int)", "findDOMCookies(TQString,long int)" },
    { "void", "addCookies(TQString,TQCString,long int)", "addCookies(TQString,TQCString,long int)" },
    { "void", "deleteCookie(TQString,TQString,TQString,TQString)", "deleteCookie(TQString,TQString,TQString,TQString)" },
    { "void", "deleteCookiesFromDomain(TQString)", "deleteCookiesFromDomain(TQString)" },
    { "void", "deleteSessionCookies(long int)", "deleteSessionCookies(long int)" },
    { "void", "deleteSessionCookiesFor(TQString,long int)", "deleteSessionCookiesFor(TQString,long int)" },
    { "void", "deleteAllCookies()", "deleteAllCookies()" },
    { "void", "addDOMCookies(TQString,TQCString,long int)", "addDOMCookies(TQString,TQCString,long int)" },
    { "void", "setDomainAdvice(TQString,TQString)", "setDomainAdvice(TQString url,TQString advice)" },
    { "TQString", "getDomainAdvice(TQString)", "getDomainAdvice(TQString url)" },
    { "void", "reloadPolicy()", "reloadPolicy()" },
    { "void", "shutdown()", "shutdown()" },
    { 0, 0, 0 }
};
static const int KCookieServer_ftable_hiddens[17] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KCookieServer::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KCookieServer_fhash, true, false );
	for ( int i = 0; KCookieServer_ftable[i][1]; i++ )
	    fdict->insert( KCookieServer_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // TQString findCookies(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KCookieServer_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << findCookies(arg0 );
    } break;
    case 1: { // TQString findCookies(TQString,long int)
	TQString arg0;
	long int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KCookieServer_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << findCookies(arg0, arg1 );
    } break;
    case 2: { // TQStringList findDomains()
	replyType = KCookieServer_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << findDomains( );
    } break;
    case 3: { // TQStringList findCookies(TQValueList<int>,TQString,TQString,TQString,TQString)
	TQValueList<int> arg0;
	TQString arg1;
	TQString arg2;
	TQString arg3;
	TQString arg4;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	if (arg.atEnd()) return false;
	arg >> arg3;
	if (arg.atEnd()) return false;
	arg >> arg4;
	replyType = KCookieServer_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << findCookies(arg0, arg1, arg2, arg3, arg4 );
    } break;
    case 4: { // TQString findDOMCookies(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KCookieServer_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << findDOMCookies(arg0 );
    } break;
    case 5: { // TQString findDOMCookies(TQString,long int)
	TQString arg0;
	long int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KCookieServer_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << findDOMCookies(arg0, arg1 );
    } break;
    case 6: { // void addCookies(TQString,TQCString,long int)
	TQString arg0;
	TQCString arg1;
	long int arg2;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	replyType = KCookieServer_ftable[6][0]; 
	addCookies(arg0, arg1, arg2 );
    } break;
    case 7: { // void deleteCookie(TQString,TQString,TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQString arg2;
	TQString arg3;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	if (arg.atEnd()) return false;
	arg >> arg3;
	replyType = KCookieServer_ftable[7][0]; 
	deleteCookie(arg0, arg1, arg2, arg3 );
    } break;
    case 8: { // void deleteCookiesFromDomain(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KCookieServer_ftable[8][0]; 
	deleteCookiesFromDomain(arg0 );
    } break;
    case 9: { // void deleteSessionCookies(long int)
	long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KCookieServer_ftable[9][0]; 
	deleteSessionCookies(arg0 );
    } break;
    case 10: { // void deleteSessionCookiesFor(TQString,long int)
	TQString arg0;
	long int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KCookieServer_ftable[10][0]; 
	deleteSessionCookiesFor(arg0, arg1 );
    } break;
    case 11: { // void deleteAllCookies()
	replyType = KCookieServer_ftable[11][0]; 
	deleteAllCookies( );
    } break;
    case 12: { // void addDOMCookies(TQString,TQCString,long int)
	TQString arg0;
	TQCString arg1;
	long int arg2;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	replyType = KCookieServer_ftable[12][0]; 
	addDOMCookies(arg0, arg1, arg2 );
    } break;
    case 13: { // void setDomainAdvice(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KCookieServer_ftable[13][0]; 
	setDomainAdvice(arg0, arg1 );
    } break;
    case 14: { // TQString getDomainAdvice(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KCookieServer_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getDomainAdvice(arg0 );
    } break;
    case 15: { // void reloadPolicy()
	replyType = KCookieServer_ftable[15][0]; 
	reloadPolicy( );
    } break;
    case 16: { // void shutdown()
	replyType = KCookieServer_ftable[16][0]; 
	shutdown( );
    } break;
    default: 
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList KCookieServer::interfaces()
{
    QCStringList ifaces = KDEDModule::interfaces();
    ifaces += "KCookieServer";
    return ifaces;
}

QCStringList KCookieServer::functions()
{
    QCStringList funcs = KDEDModule::functions();
    for ( int i = 0; KCookieServer_ftable[i][2]; i++ ) {
	if (KCookieServer_ftable_hiddens[i])
	    continue;
	TQCString func = KCookieServer_ftable[i][0];
	func += ' ';
	func += KCookieServer_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


