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

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

#include <kdatastream.h>

namespace KMPlayer {

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

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

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

void Callback_stub::statusMessage( int arg0, TQString arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "statusMessage(int,TQString)", data );
    setStatus( CallSucceeded );
}

void Callback_stub::errorMessage( int arg0, TQString arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "errorMessage(int,TQString)", data );
    setStatus( CallSucceeded );
}

void Callback_stub::subMrl( TQString arg0, TQString arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "subMrl(TQString,TQString)", data );
    setStatus( CallSucceeded );
}

void Callback_stub::finished()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    dcopClient()->send( app(), obj(), "finished()", data );
    setStatus( CallSucceeded );
}

void Callback_stub::playing()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    dcopClient()->send( app(), obj(), "playing()", data );
    setStatus( CallSucceeded );
}

void Callback_stub::started( TQCString arg0, TQByteArray arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    dcopClient()->send( app(), obj(), "started(TQCString,TQByteArray)", data );
    setStatus( CallSucceeded );
}

void Callback_stub::movieParams( int arg0, int arg1, int arg2, float arg3, TQStringList arg4, TQStringList arg5 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    arg << arg3;
    arg << arg4;
    arg << arg5;
    dcopClient()->send( app(), obj(), "movieParams(int,int,int,float,TQStringList,TQStringList)", data );
    setStatus( CallSucceeded );
}

void Callback_stub::moviePosition( int arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    dcopClient()->send( app(), obj(), "moviePosition(int)", data );
    setStatus( CallSucceeded );
}

void Callback_stub::loadingProgress( int arg0 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    dcopClient()->send( app(), obj(), "loadingProgress(int)", data );
    setStatus( CallSucceeded );
}

void Callback_stub::toggleFullScreen()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data;
    dcopClient()->send( app(), obj(), "toggleFullScreen()", data );
    setStatus( CallSucceeded );
}

} // namespace

