rem: case SCHEDULE_FILE: case SCHEDULE_FILE_n: type = KAlarmAlarm::FILE; break; case SCHEDULE_COMMAND: case SCHEDULE_COMMAND_n: type = KAlarmAlarm::COMMAND; break;
add: }
context: bool DcopHandler::process(const QCString& func, const QByteArray& data, QCString& replyType, QByteArray&){	kdDebug(5950) << "DcopHandler::process(): " << func << endl;	enum	{		ERR, HANDLE, CANCEL, TRIGGER,		REP_FLAG           = 0x01,		SCHEDULE           = 0x100,		SCHEDULE_n         = SCHEDULE | REP_FLAG,		SCHEDULE_FILE      = SCHEDULE | 0x10,		SCHEDULE_FILE_n    = SCHEDULE_FILE | REP_FLAG,		SCHEDULE_COMMAND   = SCHEDULE | 0x20,		SCHEDULE_COMMAND_n = SCHEDULE_COMMAND | REP_FLAG	};	int function;	if      (func == "handleEvent(const QString&,const QString&)"	||       func == "handleEvent(QString,QString)")		function = HANDLE;	else if (func == "cancelEvent(const QString&,const QString&)"	||       func == "cancelEvent(QString,QString)"	||       func == "cancelMessage(const QString&,const QString&)"    // deprecated	||       func == "cancelMessage(QString,QString)")                 // deprecated		function = CANCEL;	else if (func == "triggerEvent(const QString&,const QString&)"	||       func == "triggerEvent(QString,QString)"	||       func == "displayMessage(const QString&,const QString&)"   // deprecated	||       func == "displayMessage(QString,QString)")                // deprecated		function = TRIGGER;	else if (func == "scheduleMessage(const QString&,const QDateTime&,QColor,Q_UINT32)"	||       func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32)")		function = SCHEDULE;	else if (func == "scheduleMessage(const QString&,const QDateTime&,QColor,Q_UINT32,Q_INT32,Q_INT32)"	||       func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,Q_INT32,Q_INT32)")		function = SCHEDULE_n;	else if (func == "scheduleFile(const QString&,const QDateTime&,QColor,Q_UINT32)"	||       func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32)")		function = SCHEDULE_FILE;	else if (func == "scheduleFile(const QString&,const QDateTime&,QColor,Q_UINT32,Q_INT32,Q_INT32)"	||       func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,Q_INT32,Q_INT32)")		function = SCHEDULE_FILE_n;	else if (func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32)"	||       func == "scheduleCommand(QString,QDateTime,Q_UINT32)")		function = SCHEDULE_COMMAND;	else if (func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32)"	||       func == "scheduleCommand(QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32)")		function = SCHEDULE_COMMAND_n;	else	{		kdDebug(5950) << "DcopHandler::process(): unknown DCOP function" << endl;		return false;	}	KAlarmAlarm::Type type;;	switch (function)	{		case HANDLE:        // trigger or cancel event with specified ID from calendar file		case CANCEL:        // cancel event with specified ID from calendar file		case TRIGGER:       // trigger event with specified ID in calendar file		{			QDataStream arg(data, IO_ReadOnly);			QString urlString, vuid;			arg >> urlString >> vuid;			replyType = "void";			switch (function)			{				case HANDLE:					theApp()->handleEvent(urlString, vuid);					break;				case CANCEL:					theApp()->deleteEvent(urlString, vuid);					break;				case TRIGGER:					theApp()->triggerEvent(urlString, vuid);					break;			}			break;		}		case SCHEDULE:         // schedule a new event		case SCHEDULE_n:       // schedule a new repeating event			type = KAlarmAlarm::MESSAGE;			break;		case SCHEDULE_FILE:    // schedule the display of a file's contents		case SCHEDULE_FILE_n:  // schedule the repeating display of a file's contents			type = KAlarmAlarm::FILE;			break;		case SCHEDULE_COMMAND:    // schedule the execution of a command		case SCHEDULE_COMMAND_n:  // schedule the repeating execution of a command			type = KAlarmAlarm::COMMAND;			break;	}	if (function & SCHEDULE)	{		QDataStream arg(data, IO_ReadOnly);		QString text;		QDateTime dateTime;		QColor bgColour;		Q_UINT32 flags;		Q_INT32 repeatCount = 0;		Q_INT32 repeatInterval = 0;		arg >> text;		arg.readRawBytes((char*)&dateTime, sizeof(dateTime));		if (type != KAlarmAlarm::COMMAND)			arg.readRawBytes((char*)&bgColour, sizeof(bgColour));		arg >> flags;		if (function & REP_FLAG)			arg >> repeatCount >> repeatInterval;		theApp()->scheduleEvent(text, &dateTime, bgColour, flags, type, repeatCount, repeatInterval);		replyType = "void";	}	return true;}