rem: void AlarmDaemon::registerApp(const QCString& appName, const QString& appTitle, const QCString& dcopObject, const QString& calendarUrl, bool startClient) { kdDebug(5900) << "AlarmDaemon::registerApp(" << appName << ", " << appTitle << ", " <<  dcopObject << ", " << startClient << ")" << endl; KAlarmd::RegisterResult result; if (appName.isEmpty()) result = KAlarmd::FAILURE; else if (startClient  &&  KStandardDirs::findExe(appName).isNull()) { kdError() << "AlarmDaemon::registerApp(): app not found" << endl; result = KAlarmd::NOT_FOUND; } else { ADCalendar* keepCal = 0; ClientInfo* client = ClientInfo::get(appName); if (client) {   if (client->calendar()  &&  client->calendar()->urlString() == calendarUrl) { keepCal = client->calendar(); client->detachCalendar(); } ClientInfo::remove(appName); }  if (keepCal) client = new ClientInfo(appName, appTitle, dcopObject, keepCal, startClient); else client = new ClientInfo(appName, appTitle, dcopObject, calendarUrl, startClient); client->calendar()->setUnregistered(false); ADConfigData::writeClient(appName, client);  ADConfigData::enableAutoStart(true); setTimerStatus(); notifyCalStatus(client->calendar()); result = KAlarmd::SUCCESS; }   AlarmGuiIface_stub stub(appName, dcopObject); stub.registered(false, result); kdDebug(5900) << "AlarmDaemon::registerApp() -> " << result << endl; }
add: void    registerApp(const QCString& appName, const QString& appTitle, const QCString& dcopObject, int notificationType, bool displayCalendarName) { registerApp_(appName, appTitle, dcopObject, notificationType, displayCalendarName, false); }
context: void AlarmDaemon::registerApp(const QCString& appName, const QString& appTitle,                              const QCString& dcopObject, const QString& calendarUrl,			      bool startClient){	kdDebug(5900) << "AlarmDaemon::registerApp(" << appName << ", " << appTitle << ", "	              <<  dcopObject << ", " << startClient << ")" << endl;	KAlarmd::RegisterResult result;	if (appName.isEmpty())		result = KAlarmd::FAILURE;	else if (startClient  &&  KStandardDirs::findExe(appName).isNull())	{		kdError() << "AlarmDaemon::registerApp(): app not found" << endl;		result = KAlarmd::NOT_FOUND;	}	else	{		ADCalendar* keepCal = 0;		ClientInfo* client = ClientInfo::get(appName);		if (client)		{			// The application is already a client.			// If it's the same calendar file, don't delete its calendar object.			if (client->calendar()  &&  client->calendar()->urlString() == calendarUrl)			{				keepCal = client->calendar();				client->detachCalendar();			}			ClientInfo::remove(appName);    // this deletes the calendar if not detached		}		if (keepCal)			client = new ClientInfo(appName, appTitle, dcopObject, keepCal, startClient);		else			client = new ClientInfo(appName, appTitle, dcopObject, calendarUrl, startClient);		client->calendar()->setUnregistered(false);		ADConfigData::writeClient(appName, client);		ADConfigData::enableAutoStart(true);		setTimerStatus();		notifyCalStatus(client->calendar());		result = KAlarmd::SUCCESS;	}	// Notify the client of whether the call succeeded.	AlarmGuiIface_stub stub(appName, dcopObject);	stub.registered(false, result);	kdDebug(5900) << "AlarmDaemon::registerApp() -> " << result << endl;}