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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdebase/src/tdebase-trinity-14.1.6/tdeioslave/media/mediamanager/mediamanager.h"

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


static const int MediaManager_fhash = 29;
static const char* const MediaManager_ftable[24][3] = {
    { "TQStringList", "fullList()", "fullList()" },
    { "TQStringList", "properties(TQString)", "properties(TQString name)" },
    { "TQStringList", "mountoptions(TQString)", "mountoptions(TQString name)" },
    { "bool", "setMountoptions(TQString,TQStringList)", "setMountoptions(TQString name,TQStringList options)" },
    { "TQStringVariantMap", "mount(TQString)", "mount(TQString uid)" },
    { "TQStringVariantMap", "unmount(TQString)", "unmount(TQString uid)" },
    { "TQStringVariantMap", "unlock(TQString,TQString)", "unlock(TQString uid,TQString password)" },
    { "TQStringVariantMap", "lock(TQString,bool)", "lock(TQString uid,bool releaseHolders)" },
    { "TQStringVariantMap", "eject(TQString)", "eject(TQString uid)" },
    { "TQStringVariantMap", "safeRemove(TQString)", "safeRemove(TQString uid)" },
    { "TQStringVariantMap", "mountByNode(TQString)", "mountByNode(TQString deviceNode)" },
    { "TQStringVariantMap", "unmountByNode(TQString)", "unmountByNode(TQString deviceNode)" },
    { "TQStringVariantMap", "unlockByNode(TQString,TQString)", "unlockByNode(TQString deviceNode,TQString password)" },
    { "TQStringVariantMap", "lockByNode(TQString,bool)", "lockByNode(TQString deviceNode,bool releaseHolders)" },
    { "TQStringVariantMap", "ejectByNode(TQString)", "ejectByNode(TQString deviceNode)" },
    { "TQStringVariantMap", "safeRemoveByNode(TQString)", "safeRemoveByNode(TQString deviceNode)" },
    { "TQString", "mimeType(TQString)", "mimeType(TQString name)" },
    { "TQString", "nameForLabel(TQString)", "nameForLabel(TQString label)" },
    { "ASYNC", "setUserLabel(TQString,TQString)", "setUserLabel(TQString name,TQString label)" },
    { "ASYNC", "reloadBackends()", "reloadBackends()" },
    { "bool", "removablePlug(TQString,TQString)", "removablePlug(TQString devNode,TQString label)" },
    { "bool", "removableUnplug(TQString)", "removableUnplug(TQString devNode)" },
    { "bool", "removableCamera(TQString)", "removableCamera(TQString devNode)" },
    { 0, 0, 0 }
};
static const int MediaManager_ftable_hiddens[23] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool MediaManager::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( MediaManager_fhash, true, false );
	for ( int i = 0; MediaManager_ftable[i][1]; i++ )
	    fdict->insert( MediaManager_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // TQStringList fullList()
	replyType = MediaManager_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << fullList( );
    } break;
    case 1: { // TQStringList properties(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << properties(arg0 );
    } break;
    case 2: { // TQStringList mountoptions(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mountoptions(arg0 );
    } break;
    case 3: { // bool setMountoptions(TQString,TQStringList)
	TQString arg0;
	TQStringList arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MediaManager_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setMountoptions(arg0, arg1 );
    } break;
    case 4: { // TQStringVariantMap mount(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mount(arg0 );
    } break;
    case 5: { // TQStringVariantMap unmount(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << unmount(arg0 );
    } break;
    case 6: { // TQStringVariantMap unlock(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 = MediaManager_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << unlock(arg0, arg1 );
    } break;
    case 7: { // TQStringVariantMap lock(TQString,bool)
	TQString arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MediaManager_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << lock(arg0, arg1 );
    } break;
    case 8: { // TQStringVariantMap eject(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << eject(arg0 );
    } break;
    case 9: { // TQStringVariantMap safeRemove(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << safeRemove(arg0 );
    } break;
    case 10: { // TQStringVariantMap mountByNode(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mountByNode(arg0 );
    } break;
    case 11: { // TQStringVariantMap unmountByNode(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << unmountByNode(arg0 );
    } break;
    case 12: { // TQStringVariantMap unlockByNode(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 = MediaManager_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << unlockByNode(arg0, arg1 );
    } break;
    case 13: { // TQStringVariantMap lockByNode(TQString,bool)
	TQString arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MediaManager_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << lockByNode(arg0, arg1 );
    } break;
    case 14: { // TQStringVariantMap ejectByNode(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << ejectByNode(arg0 );
    } break;
    case 15: { // TQStringVariantMap safeRemoveByNode(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << safeRemoveByNode(arg0 );
    } break;
    case 16: { // TQString mimeType(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mimeType(arg0 );
    } break;
    case 17: { // TQString nameForLabel(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[17][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << nameForLabel(arg0 );
    } break;
    case 18: { // void setUserLabel(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 = MediaManager_ftable[18][0]; 
	setUserLabel(arg0, arg1 );
    } break;
    case 19: { // void reloadBackends()
	replyType = MediaManager_ftable[19][0]; 
	reloadBackends( );
    } break;
    case 20: { // bool removablePlug(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 = MediaManager_ftable[20][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << removablePlug(arg0, arg1 );
    } break;
    case 21: { // bool removableUnplug(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[21][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << removableUnplug(arg0 );
    } break;
    case 22: { // bool removableCamera(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = MediaManager_ftable[22][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << removableCamera(arg0 );
    } break;
    default: 
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

void MediaManager::mediumAdded( const TQString& arg0, bool arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "mediumAdded(TQString,bool)", data );
}

void MediaManager::mediumRemoved( const TQString& arg0, bool arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "mediumRemoved(TQString,bool)", data );
}

void MediaManager::mediumChanged( const TQString& arg0, bool arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "mediumChanged(TQString,bool)", data );
}

void MediaManager::mediumAdded( const TQString& arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "mediumAdded(TQString)", data );
}

void MediaManager::mediumRemoved( const TQString& arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "mediumRemoved(TQString)", data );
}

void MediaManager::mediumChanged( const TQString& arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "mediumChanged(TQString)", data );
}


