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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tdetoys/src/tdetoys-trinity-14.1.6/kweather/weatherservice.h"

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


static const int WeatherService_fhash = 37;
static const char* const WeatherService_ftable[37][3] = {
    { "TQString", "temperature(TQString)", "temperature(TQString stationID)" },
    { "TQString", "dewPoint(TQString)", "dewPoint(TQString stationID)" },
    { "TQString", "relativeHumidity(TQString)", "relativeHumidity(TQString stationID)" },
    { "TQString", "heatIndex(TQString)", "heatIndex(TQString stationID)" },
    { "TQString", "windChill(TQString)", "windChill(TQString stationID)" },
    { "TQString", "wind(TQString)", "wind(TQString stationID)" },
    { "TQString", "pressure(TQString)", "pressure(TQString stationID)" },
    { "TQPixmap", "icon(TQString,uint)", "icon(TQString stationID,uint iconSize)" },
    { "TQString", "iconName(TQString,uint)", "iconName(TQString stationID,uint iconSize)" },
    { "TQString", "iconPath(TQString,uint)", "iconPath(TQString stationID,uint iconSize)" },
    { "TQString", "date(TQString)", "date(TQString stationID)" },
    { "TQString", "visibility(TQString)", "visibility(TQString stationID)" },
    { "TQStringList", "cover(TQString)", "cover(TQString stationID)" },
    { "TQStringList", "weather(TQString)", "weather(TQString stationID)" },
    { "bool", "stationNeedsMaintenance(TQString)", "stationNeedsMaintenance(TQString stationID)" },
    { "bool", "weatherDataAvailable(TQString)", "weatherDataAvailable(TQString stationID)" },
    { "TQString", "stationName(TQString)", "stationName(TQString stationID)" },
    { "TQString", "stationCountry(TQString)", "stationCountry(TQString stationID)" },
    { "TQString", "longitude(TQString)", "longitude(TQString stationID)" },
    { "TQString", "latitude(TQString)", "latitude(TQString stationID)" },
    { "TQStringList", "findStations(float,float)", "findStations(float lon,float lat)" },
    { "TQString", "sunRiseTime(TQString)", "sunRiseTime(TQString stationID)" },
    { "TQString", "sunSetTime(TQString)", "sunSetTime(TQString stationID)" },
    { "TQString", "civilTwilightStart(TQString)", "civilTwilightStart(TQString stationID)" },
    { "TQString", "civilTwilightEnd(TQString)", "civilTwilightEnd(TQString stationID)" },
    { "void", "update(TQString)", "update(TQString stationID)" },
    { "void", "updateAll()", "updateAll()" },
    { "void", "forceUpdate(TQString)", "forceUpdate(TQString stationID)" },
    { "void", "forceUpdateAll()", "forceUpdateAll()" },
    { "void", "removeStation(TQString)", "removeStation(TQString stationID)" },
    { "void", "addStation(TQString)", "addStation(TQString stationID)" },
    { "TQStringList", "listStations()", "listStations()" },
    { "TQString", "stationCode(TQString)", "stationCode(TQString stationName)" },
    { "void", "useIconTheme(bool)", "useIconTheme(bool use)" },
    { "bool", "usingIconTheme()", "usingIconTheme()" },
    { "void", "exit()", "exit()" },
    { 0, 0, 0 }
};
static const int WeatherService_ftable_hiddens[36] = {
    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,
    0,
};

bool WeatherService::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( WeatherService_fhash, true, false );
	for ( int i = 0; WeatherService_ftable[i][1]; i++ )
	    fdict->insert( WeatherService_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // TQString temperature(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << temperature(arg0 );
    } break;
    case 1: { // TQString dewPoint(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << dewPoint(arg0 );
    } break;
    case 2: { // TQString relativeHumidity(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << relativeHumidity(arg0 );
    } break;
    case 3: { // TQString heatIndex(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << heatIndex(arg0 );
    } break;
    case 4: { // TQString windChill(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << windChill(arg0 );
    } break;
    case 5: { // TQString wind(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << wind(arg0 );
    } break;
    case 6: { // TQString pressure(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << pressure(arg0 );
    } break;
    case 7: { // TQPixmap icon(TQString,uint)
	TQString arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = WeatherService_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << icon(arg0, arg1 );
    } break;
    case 8: { // TQString iconName(TQString,uint)
	TQString arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = WeatherService_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << iconName(arg0, arg1 );
    } break;
    case 9: { // TQString iconPath(TQString,uint)
	TQString arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = WeatherService_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << iconPath(arg0, arg1 );
    } break;
    case 10: { // TQString date(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << date(arg0 );
    } break;
    case 11: { // TQString visibility(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << visibility(arg0 );
    } break;
    case 12: { // TQStringList cover(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cover(arg0 );
    } break;
    case 13: { // TQStringList weather(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << weather(arg0 );
    } break;
    case 14: { // bool stationNeedsMaintenance(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << stationNeedsMaintenance(arg0 );
    } break;
    case 15: { // bool weatherDataAvailable(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << weatherDataAvailable(arg0 );
    } break;
    case 16: { // TQString stationName(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << stationName(arg0 );
    } break;
    case 17: { // TQString stationCountry(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[17][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << stationCountry(arg0 );
    } break;
    case 18: { // TQString longitude(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << longitude(arg0 );
    } break;
    case 19: { // TQString latitude(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[19][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << latitude(arg0 );
    } break;
    case 20: { // TQStringList findStations(float,float)
	float arg0;
	float arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = WeatherService_ftable[20][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << findStations(arg0, arg1 );
    } break;
    case 21: { // TQString sunRiseTime(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[21][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sunRiseTime(arg0 );
    } break;
    case 22: { // TQString sunSetTime(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[22][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sunSetTime(arg0 );
    } break;
    case 23: { // TQString civilTwilightStart(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[23][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << civilTwilightStart(arg0 );
    } break;
    case 24: { // TQString civilTwilightEnd(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[24][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << civilTwilightEnd(arg0 );
    } break;
    case 25: { // void update(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[25][0]; 
	update(arg0 );
    } break;
    case 26: { // void updateAll()
	replyType = WeatherService_ftable[26][0]; 
	updateAll( );
    } break;
    case 27: { // void forceUpdate(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[27][0]; 
	forceUpdate(arg0 );
    } break;
    case 28: { // void forceUpdateAll()
	replyType = WeatherService_ftable[28][0]; 
	forceUpdateAll( );
    } break;
    case 29: { // void removeStation(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[29][0]; 
	removeStation(arg0 );
    } break;
    case 30: { // void addStation(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[30][0]; 
	addStation(arg0 );
    } break;
    case 31: { // TQStringList listStations()
	replyType = WeatherService_ftable[31][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << listStations( );
    } break;
    case 32: { // TQString stationCode(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[32][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << stationCode(arg0 );
    } break;
    case 33: { // void useIconTheme(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WeatherService_ftable[33][0]; 
	useIconTheme(arg0 );
    } break;
    case 34: { // bool usingIconTheme()
	replyType = WeatherService_ftable[34][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << usingIconTheme( );
    } break;
    case 35: { // void exit()
	replyType = WeatherService_ftable[35][0]; 
	exit( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList WeatherService::interfaces()
{
    QCStringList ifaces = DCOPObject::interfaces();
    ifaces += "WeatherService";
    return ifaces;
}

QCStringList WeatherService::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; WeatherService_ftable[i][2]; i++ ) {
	if (WeatherService_ftable_hiddens[i])
	    continue;
	TQCString func = WeatherService_ftable[i][0];
	func += ' ';
	func += WeatherService_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

void WeatherService::fileUpdating( TQString arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "fileUpdating(TQString)", data );
}

void WeatherService::fileUpdate( TQString arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "fileUpdate(TQString)", data );
}

void WeatherService::stationRemoved( TQString arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "stationRemoved(TQString)", data );
}

void WeatherService::stationAdded( TQString arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "stationAdded(TQString)", data );
}


