/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from kssld.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/tdeio/misc/kssld/kssld.h"

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


static const int KSSLD_fhash = 37;
static const char* const KSSLD_ftable[36][3] = {
    { "void", "cacheAddCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool)", "cacheAddCertificate(KSSLCertificate cert,KSSLCertificateCache::KSSLCertificatePolicy policy,bool permanent)" },
    { "KSSLCertificateCache::KSSLCertificatePolicy", "cacheGetPolicyByCN(TQString)", "cacheGetPolicyByCN(TQString cn)" },
    { "KSSLCertificateCache::KSSLCertificatePolicy", "cacheGetPolicyByCertificate(KSSLCertificate)", "cacheGetPolicyByCertificate(KSSLCertificate cert)" },
    { "bool", "cacheSeenCN(TQString)", "cacheSeenCN(TQString cn)" },
    { "bool", "cacheSeenCertificate(KSSLCertificate)", "cacheSeenCertificate(KSSLCertificate cert)" },
    { "bool", "cacheRemoveByCN(TQString)", "cacheRemoveByCN(TQString cn)" },
    { "bool", "cacheRemoveBySubject(TQString)", "cacheRemoveBySubject(TQString subject)" },
    { "bool", "cacheRemoveByCertificate(KSSLCertificate)", "cacheRemoveByCertificate(KSSLCertificate cert)" },
    { "bool", "cacheIsPermanent(KSSLCertificate)", "cacheIsPermanent(KSSLCertificate cert)" },
    { "void", "cacheReload()", "cacheReload()" },
    { "bool", "cacheModifyByCN(TQString,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)", "cacheModifyByCN(TQString cn,KSSLCertificateCache::KSSLCertificatePolicy policy,bool permanent,TQDateTime expires)" },
    { "bool", "cacheModifyByCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)", "cacheModifyByCertificate(KSSLCertificate cert,KSSLCertificateCache::KSSLCertificatePolicy policy,bool permanent,TQDateTime expires)" },
    { "TQStringList", "cacheGetHostList(KSSLCertificate)", "cacheGetHostList(KSSLCertificate cert)" },
    { "bool", "cacheAddHost(KSSLCertificate,TQString)", "cacheAddHost(KSSLCertificate cert,TQString host)" },
    { "bool", "cacheRemoveHost(KSSLCertificate,TQString)", "cacheRemoveHost(KSSLCertificate cert,TQString host)" },
    { "void", "caVerifyUpdate()", "caVerifyUpdate()" },
    { "bool", "caRegenerate()", "caRegenerate()" },
    { "TQStringList", "caList()", "caList()" },
    { "bool", "caUseForSSL(TQString)", "caUseForSSL(TQString subject)" },
    { "bool", "caUseForEmail(TQString)", "caUseForEmail(TQString subject)" },
    { "bool", "caUseForCode(TQString)", "caUseForCode(TQString subject)" },
    { "bool", "caAdd(TQString,bool,bool,bool)", "caAdd(TQString certificate,bool ssl,bool email,bool code)" },
    { "bool", "caAddFromFile(TQString,bool,bool,bool)", "caAddFromFile(TQString filename,bool ssl,bool email,bool code)" },
    { "bool", "caRemove(TQString)", "caRemove(TQString subject)" },
    { "bool", "caRemoveFromFile(TQString)", "caRemoveFromFile(TQString filename)" },
    { "TQString", "caGetCert(TQString)", "caGetCert(TQString subject)" },
    { "bool", "caSetUse(TQString,bool,bool,bool)", "caSetUse(TQString subject,bool ssl,bool email,bool code)" },
    { "TQStringList", "getKDEKeyByEmail(TQString)", "getKDEKeyByEmail(TQString email)" },
    { "KSSLCertificate", "getCertByMD5Digest(TQString)", "getCertByMD5Digest(TQString key)" },
    { "TQStringList", "getHomeCertificateList()", "getHomeCertificateList()" },
    { "bool", "addHomeCertificateFile(TQString,TQString,bool)", "addHomeCertificateFile(TQString filename,TQString password,bool storePass)" },
    { "bool", "addHomeCertificatePKCS12(TQString,TQString)", "addHomeCertificatePKCS12(TQString base64cert,TQString passToStore)" },
    { "bool", "deleteHomeCertificateByFile(TQString,TQString)", "deleteHomeCertificateByFile(TQString filename,TQString password)" },
    { "bool", "deleteHomeCertificateByPKCS12(TQString,TQString)", "deleteHomeCertificateByPKCS12(TQString base64cert,TQString password)" },
    { "bool", "deleteHomeCertificateByName(TQString)", "deleteHomeCertificateByName(TQString name)" },
    { 0, 0, 0 }
};
static const int KSSLD_ftable_hiddens[35] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KSSLD::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KSSLD_fhash, true, false );
	for ( int i = 0; KSSLD_ftable[i][1]; i++ )
	    fdict->insert( KSSLD_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void cacheAddCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool)
	KSSLCertificate arg0;
	KSSLCertificateCache::KSSLCertificatePolicy arg1;
	bool 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 = KSSLD_ftable[0][0]; 
	cacheAddCertificate(arg0, arg1, arg2 );
    } break;
    case 1: { // KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCN(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheGetPolicyByCN(arg0 );
    } break;
    case 2: { // KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCertificate(KSSLCertificate)
	KSSLCertificate arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheGetPolicyByCertificate(arg0 );
    } break;
    case 3: { // bool cacheSeenCN(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheSeenCN(arg0 );
    } break;
    case 4: { // bool cacheSeenCertificate(KSSLCertificate)
	KSSLCertificate arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheSeenCertificate(arg0 );
    } break;
    case 5: { // bool cacheRemoveByCN(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheRemoveByCN(arg0 );
    } break;
    case 6: { // bool cacheRemoveBySubject(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheRemoveBySubject(arg0 );
    } break;
    case 7: { // bool cacheRemoveByCertificate(KSSLCertificate)
	KSSLCertificate arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheRemoveByCertificate(arg0 );
    } break;
    case 8: { // bool cacheIsPermanent(KSSLCertificate)
	KSSLCertificate arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheIsPermanent(arg0 );
    } break;
    case 9: { // void cacheReload()
	replyType = KSSLD_ftable[9][0]; 
	cacheReload( );
    } break;
    case 10: { // bool cacheModifyByCN(TQString,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)
	TQString arg0;
	KSSLCertificateCache::KSSLCertificatePolicy arg1;
	bool arg2;
	TQDateTime 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 = KSSLD_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheModifyByCN(arg0, arg1, arg2, arg3 );
    } break;
    case 11: { // bool cacheModifyByCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)
	KSSLCertificate arg0;
	KSSLCertificateCache::KSSLCertificatePolicy arg1;
	bool arg2;
	TQDateTime 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 = KSSLD_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheModifyByCertificate(arg0, arg1, arg2, arg3 );
    } break;
    case 12: { // TQStringList cacheGetHostList(KSSLCertificate)
	KSSLCertificate arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheGetHostList(arg0 );
    } break;
    case 13: { // bool cacheAddHost(KSSLCertificate,TQString)
	KSSLCertificate arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSSLD_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheAddHost(arg0, arg1 );
    } break;
    case 14: { // bool cacheRemoveHost(KSSLCertificate,TQString)
	KSSLCertificate arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KSSLD_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cacheRemoveHost(arg0, arg1 );
    } break;
    case 15: { // void caVerifyUpdate()
	replyType = KSSLD_ftable[15][0]; 
	caVerifyUpdate( );
    } break;
    case 16: { // bool caRegenerate()
	replyType = KSSLD_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caRegenerate( );
    } break;
    case 17: { // TQStringList caList()
	replyType = KSSLD_ftable[17][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caList( );
    } break;
    case 18: { // bool caUseForSSL(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caUseForSSL(arg0 );
    } break;
    case 19: { // bool caUseForEmail(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[19][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caUseForEmail(arg0 );
    } break;
    case 20: { // bool caUseForCode(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[20][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caUseForCode(arg0 );
    } break;
    case 21: { // bool caAdd(TQString,bool,bool,bool)
	TQString arg0;
	bool arg1;
	bool arg2;
	bool 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 = KSSLD_ftable[21][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caAdd(arg0, arg1, arg2, arg3 );
    } break;
    case 22: { // bool caAddFromFile(TQString,bool,bool,bool)
	TQString arg0;
	bool arg1;
	bool arg2;
	bool 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 = KSSLD_ftable[22][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caAddFromFile(arg0, arg1, arg2, arg3 );
    } break;
    case 23: { // bool caRemove(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[23][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caRemove(arg0 );
    } break;
    case 24: { // bool caRemoveFromFile(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[24][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caRemoveFromFile(arg0 );
    } break;
    case 25: { // TQString caGetCert(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[25][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caGetCert(arg0 );
    } break;
    case 26: { // bool caSetUse(TQString,bool,bool,bool)
	TQString arg0;
	bool arg1;
	bool arg2;
	bool 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 = KSSLD_ftable[26][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << caSetUse(arg0, arg1, arg2, arg3 );
    } break;
    case 27: { // TQStringList getKDEKeyByEmail(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[27][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getKDEKeyByEmail(arg0 );
    } break;
    case 28: { // KSSLCertificate getCertByMD5Digest(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[28][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getCertByMD5Digest(arg0 );
    } break;
    case 29: { // TQStringList getHomeCertificateList()
	replyType = KSSLD_ftable[29][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getHomeCertificateList( );
    } break;
    case 30: { // bool addHomeCertificateFile(TQString,TQString,bool)
	TQString arg0;
	TQString arg1;
	bool 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 = KSSLD_ftable[30][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << addHomeCertificateFile(arg0, arg1, arg2 );
    } break;
    case 31: { // bool addHomeCertificatePKCS12(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 = KSSLD_ftable[31][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << addHomeCertificatePKCS12(arg0, arg1 );
    } break;
    case 32: { // bool deleteHomeCertificateByFile(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 = KSSLD_ftable[32][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << deleteHomeCertificateByFile(arg0, arg1 );
    } break;
    case 33: { // bool deleteHomeCertificateByPKCS12(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 = KSSLD_ftable[33][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << deleteHomeCertificateByPKCS12(arg0, arg1 );
    } break;
    case 34: { // bool deleteHomeCertificateByName(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSSLD_ftable[34][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << deleteHomeCertificateByName(arg0 );
    } break;
    default: 
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


