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

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

#include <kdatastream.h>


UIServer_stub::UIServer_stub( const QCString& app, const QCString& obj )
  : DCOPStub( app, obj )
{
}

UIServer_stub::UIServer_stub( DCOPClient* client, const QCString& app, const QCString& obj )
  : DCOPStub( client, app, obj )
{
}

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

int UIServer_stub::newJob( QCString arg0, bool arg1 )
{
    int result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    if ( dcopClient()->call( app(), obj(), "newJob(QCString,bool)", data, replyType, replyData ) ) {
	if ( replyType == "int" ) {
	    QDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

void UIServer_stub::jobFinished( int arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    dcopClient()->send( app(), obj(), "jobFinished(int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::totalSize( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "totalSize(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::totalSize64( int arg0, KIO::filesize_t arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "totalSize64(int,KIO::filesize_t)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::totalFiles( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "totalFiles(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::totalDirs( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "totalDirs(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::processedSize( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "processedSize(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::processedSize64( int arg0, KIO::filesize_t arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "processedSize64(int,KIO::filesize_t)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::processedFiles( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "processedFiles(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::processedDirs( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "processedDirs(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::percent( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "percent(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::speed( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "speed(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::infoMessage( int arg0, const QString& arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "infoMessage(int,QString)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::copying( int arg0, KURL arg1, KURL arg2 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    dcopClient()->send( app(), obj(), "copying(int,KURL,KURL)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::moving( int arg0, KURL arg1, KURL arg2 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    dcopClient()->send( app(), obj(), "moving(int,KURL,KURL)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::deleting( int arg0, KURL arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "deleting(int,KURL)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::transferring( int arg0, KURL arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "transferring(int,KURL)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::creatingDir( int arg0, KURL arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "creatingDir(int,KURL)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::stating( int arg0, KURL arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "stating(int,KURL)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::mounting( int arg0, QString arg1, QString arg2 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    dcopClient()->send( app(), obj(), "mounting(int,QString,QString)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::unmounting( int arg0, QString arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "unmounting(int,QString)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::canResume( int arg0, unsigned long int arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "canResume(int,unsigned long int)", data );
    setStatus( CallSucceeded );
}

void UIServer_stub::canResume64( int arg0, KIO::filesize_t arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "canResume64(int,KIO::filesize_t)", data );
    setStatus( CallSucceeded );
}

QByteArray UIServer_stub::openPassDlg( const KIO::AuthInfo& arg0 )
{
    QByteArray result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "openPassDlg(KIO::AuthInfo)", data, replyType, replyData ) ) {
	if ( replyType == "QByteArray" ) {
	    QDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

int UIServer_stub::messageBox( int arg0, int arg1, const QString& arg2, const QString& arg3, const QString& arg4, const QString& arg5 )
{
    int result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    arg << arg3;
    arg << arg4;
    arg << arg5;
    if ( dcopClient()->call( app(), obj(), "messageBox(int,int,QString,QString,QString,QString)", data, replyType, replyData ) ) {
	if ( replyType == "int" ) {
	    QDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

QByteArray UIServer_stub::open_RenameDlg64( int arg0, const QString& arg1, const QString& arg2, const QString& arg3, int arg4, KIO::filesize_t arg5, KIO::filesize_t arg6, unsigned long int arg7, unsigned long int arg8, unsigned long int arg9, unsigned long int arg10 )
{
    QByteArray result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    arg << arg3;
    arg << arg4;
    arg << arg5;
    arg << arg6;
    arg << arg7;
    arg << arg8;
    arg << arg9;
    arg << arg10;
    if ( dcopClient()->call( app(), obj(), "open_RenameDlg64(int,QString,QString,QString,int,KIO::filesize_t,KIO::filesize_t,unsigned long int,unsigned long int,unsigned long int,unsigned long int)", data, replyType, replyData ) ) {
	if ( replyType == "QByteArray" ) {
	    QDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

QByteArray UIServer_stub::open_RenameDlg( int arg0, const QString& arg1, const QString& arg2, const QString& arg3, int arg4, unsigned long int arg5, unsigned long int arg6, unsigned long int arg7, unsigned long int arg8, unsigned long int arg9, unsigned long int arg10 )
{
    QByteArray result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    arg << arg3;
    arg << arg4;
    arg << arg5;
    arg << arg6;
    arg << arg7;
    arg << arg8;
    arg << arg9;
    arg << arg10;
    if ( dcopClient()->call( app(), obj(), "open_RenameDlg(int,QString,QString,QString,int,unsigned long int,unsigned long int,unsigned long int,unsigned long int,unsigned long int,unsigned long int)", data, replyType, replyData ) ) {
	if ( replyType == "QByteArray" ) {
	    QDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

int UIServer_stub::open_SkipDlg( int arg0, int arg1, const QString& arg2 )
{
    int result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    if ( dcopClient()->call( app(), obj(), "open_SkipDlg(int,int,QString)", data, replyType, replyData ) ) {
	if ( replyType == "int" ) {
	    QDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

void UIServer_stub::setListMode( bool arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "setListMode(bool)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void UIServer_stub::setJobVisible( int arg0, bool arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    if ( dcopClient()->call( app(), obj(), "setJobVisible(int,bool)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void UIServer_stub::showSSLInfoDialog( const QString& arg0, const KIO::MetaData& arg1, int arg2 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    if ( dcopClient()->call( app(), obj(), "showSSLInfoDialog(QString,KIO::MetaData,int)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void UIServer_stub::showSSLInfoDialog( const QString& arg0, const KIO::MetaData& arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    if ( dcopClient()->call( app(), obj(), "showSSLInfoDialog(QString,KIO::MetaData)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

KSSLCertDlgRet UIServer_stub::showSSLCertDialog( const QString& arg0, const QStringList& arg1, int arg2 )
{
    KSSLCertDlgRet result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    if ( dcopClient()->call( app(), obj(), "showSSLCertDialog(QString,QStringList,int)", data, replyType, replyData ) ) {
	if ( replyType == "KSSLCertDlgRet" ) {
	    QDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

KSSLCertDlgRet UIServer_stub::showSSLCertDialog( const QString& arg0, const QStringList& arg1 )
{
    KSSLCertDlgRet result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    QByteArray data, replyData;
    QCString replyType;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    if ( dcopClient()->call( app(), obj(), "showSSLCertDialog(QString,QStringList)", data, replyType, replyData ) ) {
	if ( replyType == "KSSLCertDlgRet" ) {
	    QDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}


