SVN_SILENT made messages (after extraction)
[kdepim.git] / kalarm / dbushandler.cpp
blob40e8a65dd7c236733c2c0f444152c37ed8195b0b
1 /*
2 * dbushandler.cpp - handler for D-Bus calls by other applications
3 * Program: kalarm
4 * Copyright © 2002-2012 by David Jarvie <djarvie@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "kalarm.h"
23 #include "alarmcalendar.h"
24 #include "alarmtime.h"
25 #include "functions.h"
26 #include "kalarmapp.h"
27 #include "kamail.h"
28 #include "mainwindow.h"
29 #include "preferences.h"
30 #include "dbushandler.h"
31 #include <kalarmadaptor.h>
33 #include <kalarmcal/identities.h>
34 #include <kalarmcal/karecurrence.h>
36 #include <KCalCore/Duration>
37 using namespace KCalCore;
39 #include <QtDBus/QtDBus>
40 #include "kalarm_debug.h"
42 #include <stdlib.h>
44 namespace
46 const QString REQUEST_DBUS_OBJECT(QStringLiteral("/kalarm")); // D-Bus object path of KAlarm's request interface
50 /*=============================================================================
51 = DBusHandler
52 = This class's function is to handle D-Bus requests by other applications.
53 =============================================================================*/
54 DBusHandler::DBusHandler()
56 qCDebug(KALARM_LOG);
57 new KalarmAdaptor(this);
58 QDBusConnection::sessionBus().registerObject(REQUEST_DBUS_OBJECT, this);
62 bool DBusHandler::cancelEvent(const QString& eventId)
64 return theApp()->dbusDeleteEvent(EventId(eventId));
67 bool DBusHandler::triggerEvent(const QString& eventId)
69 return theApp()->dbusTriggerEvent(EventId(eventId));
72 QString DBusHandler::list()
74 return theApp()->dbusList();
77 bool DBusHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
78 const QString& bgColor, const QString& fgColor, const QString& font,
79 const QString& audioUrl, int reminderMins, const QString& recurrence,
80 int subRepeatInterval, int subRepeatCount)
82 KDateTime start;
83 KARecurrence recur;
84 Duration subRepeatDuration;
85 if (!convertRecurrence(start, recur, startDateTime, recurrence, subRepeatInterval, subRepeatDuration))
86 return false;
87 return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font,
88 QUrl::fromUserInput(audioUrl, QString(), QUrl::AssumeLocalFile),
89 reminderMins, recur, subRepeatDuration, subRepeatCount);
92 bool DBusHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
93 const QString& bgColor, const QString& fgColor, const QString& font,
94 const QString& audioUrl, int reminderMins,
95 int recurType, int recurInterval, int recurCount)
97 KDateTime start;
98 KARecurrence recur;
99 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, recurCount))
100 return false;
101 return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font,
102 QUrl::fromUserInput(audioUrl, QString(), QUrl::AssumeLocalFile),
103 reminderMins, recur);
106 bool DBusHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
107 const QString& bgColor, const QString& fgColor, const QString& font,
108 const QString& audioUrl, int reminderMins,
109 int recurType, int recurInterval, const QString& endDateTime)
111 KDateTime start;
112 KARecurrence recur;
113 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, endDateTime))
114 return false;
115 return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font,
116 QUrl::fromUserInput(audioUrl, QString(), QUrl::AssumeLocalFile),
117 reminderMins, recur);
120 bool DBusHandler::scheduleFile(const QString& url, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
121 const QString& audioUrl, int reminderMins, const QString& recurrence,
122 int subRepeatInterval, int subRepeatCount)
124 KDateTime start;
125 KARecurrence recur;
126 Duration subRepeatDuration;
127 if (!convertRecurrence(start, recur, startDateTime, recurrence, subRepeatInterval, subRepeatDuration))
128 return false;
129 return scheduleFile(QUrl::fromUserInput(url, QString(), QUrl::AssumeLocalFile),
130 start, lateCancel, flags, bgColor,
131 QUrl::fromUserInput(audioUrl, QString(), QUrl::AssumeLocalFile),
132 reminderMins, recur, subRepeatDuration, subRepeatCount);
135 bool DBusHandler::scheduleFile(const QString& url, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
136 const QString& audioUrl, int reminderMins, int recurType, int recurInterval, int recurCount)
138 KDateTime start;
139 KARecurrence recur;
140 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, recurCount))
141 return false;
142 return scheduleFile(QUrl::fromUserInput(url, QString(), QUrl::AssumeLocalFile),
143 start, lateCancel, flags, bgColor,
144 QUrl::fromUserInput(audioUrl, QString(), QUrl::AssumeLocalFile),
145 reminderMins, recur);
148 bool DBusHandler::scheduleFile(const QString& url, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
149 const QString& audioUrl, int reminderMins, int recurType, int recurInterval, const QString& endDateTime)
151 KDateTime start;
152 KARecurrence recur;
153 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, endDateTime))
154 return false;
155 return scheduleFile(QUrl::fromUserInput(url, QString(), QUrl::AssumeLocalFile),
156 start, lateCancel, flags, bgColor,
157 QUrl::fromUserInput(audioUrl, QString(), QUrl::AssumeLocalFile),
158 reminderMins, recur);
161 bool DBusHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
162 const QString& recurrence, int subRepeatInterval, int subRepeatCount)
164 KDateTime start;
165 KARecurrence recur;
166 Duration subRepeatDuration;
167 if (!convertRecurrence(start, recur, startDateTime, recurrence, subRepeatInterval, subRepeatDuration))
168 return false;
169 return scheduleCommand(commandLine, start, lateCancel, flags, recur, subRepeatDuration, subRepeatCount);
172 bool DBusHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
173 int recurType, int recurInterval, int recurCount)
175 KDateTime start = convertDateTime(startDateTime);
176 if (!start.isValid())
177 return false;
178 KARecurrence recur;
179 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, recurCount))
180 return false;
181 return scheduleCommand(commandLine, start, lateCancel, flags, recur);
184 bool DBusHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
185 int recurType, int recurInterval, const QString& endDateTime)
187 KDateTime start;
188 KARecurrence recur;
189 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, endDateTime))
190 return false;
191 return scheduleCommand(commandLine, start, lateCancel, flags, recur);
194 bool DBusHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
195 const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
196 const QString& recurrence, int subRepeatInterval, int subRepeatCount)
198 KDateTime start;
199 KARecurrence recur;
200 Duration subRepeatDuration;
201 if (!convertRecurrence(start, recur, startDateTime, recurrence, subRepeatInterval, subRepeatDuration))
202 return false;
203 return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur, subRepeatDuration, subRepeatCount);
206 bool DBusHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
207 const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
208 int recurType, int recurInterval, int recurCount)
210 KDateTime start;
211 KARecurrence recur;
212 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, recurCount))
213 return false;
214 return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur);
217 bool DBusHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
218 const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
219 int recurType, int recurInterval, const QString& endDateTime)
221 KDateTime start;
222 KARecurrence recur;
223 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, endDateTime))
224 return false;
225 return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur);
228 bool DBusHandler::scheduleAudio(const QString& audioUrl, int volumePercent, const QString& startDateTime, int lateCancel,
229 unsigned flags, const QString& recurrence, int subRepeatInterval, int subRepeatCount)
231 KDateTime start;
232 KARecurrence recur;
233 Duration subRepeatDuration;
234 if (!convertRecurrence(start, recur, startDateTime, recurrence, subRepeatInterval, subRepeatDuration))
235 return false;
236 return scheduleAudio(audioUrl, volumePercent, start, lateCancel, flags, recur, subRepeatDuration, subRepeatCount);
239 bool DBusHandler::scheduleAudio(const QString& audioUrl, int volumePercent, const QString& startDateTime, int lateCancel,
240 unsigned flags, int recurType, int recurInterval, int recurCount)
242 KDateTime start = convertDateTime(startDateTime);
243 if (!start.isValid())
244 return false;
245 KARecurrence recur;
246 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, recurCount))
247 return false;
248 return scheduleAudio(audioUrl, volumePercent, start, lateCancel, flags, recur);
251 bool DBusHandler::scheduleAudio(const QString& audioUrl, int volumePercent, const QString& startDateTime, int lateCancel,
252 unsigned flags, int recurType, int recurInterval, const QString& endDateTime)
254 KDateTime start;
255 KARecurrence recur;
256 if (!convertRecurrence(start, recur, startDateTime, recurType, recurInterval, endDateTime))
257 return false;
258 return scheduleAudio(audioUrl, volumePercent, start, lateCancel, flags, recur);
261 bool DBusHandler::edit(const QString& eventID)
263 return KAlarm::editAlarmById(EventId(eventID));
266 bool DBusHandler::editNew(int type)
268 EditAlarmDlg::Type dlgtype;
269 switch (type)
271 case DISPLAY: dlgtype = EditAlarmDlg::DISPLAY; break;
272 case COMMAND: dlgtype = EditAlarmDlg::COMMAND; break;
273 case EMAIL: dlgtype = EditAlarmDlg::EMAIL; break;
274 case AUDIO: dlgtype = EditAlarmDlg::AUDIO; break;
275 default:
276 qCCritical(KALARM_LOG) << "D-Bus call: invalid alarm type:" << type;
277 return false;
279 KAlarm::editNewAlarm(dlgtype);
280 return true;
283 bool DBusHandler::editNew(const QString& templateName)
285 return KAlarm::editNewAlarm(templateName);
289 /******************************************************************************
290 * Schedule a message alarm, after converting the parameters from strings.
292 bool DBusHandler::scheduleMessage(const QString& message, const KDateTime& start, int lateCancel, unsigned flags,
293 const QString& bgColor, const QString& fgColor, const QString& fontStr,
294 const QUrl& audioFile, int reminderMins, const KARecurrence& recurrence,
295 const Duration& subRepeatDuration, int subRepeatCount)
297 KAEvent::Flags kaEventFlags = convertStartFlags(start, flags);
298 KAEvent::SubAction action = (kaEventFlags & KAEvent::DISPLAY_COMMAND) ? KAEvent::COMMAND : KAEvent::MESSAGE;
299 QColor bg = convertBgColour(bgColor);
300 if (!bg.isValid())
301 return false;
302 QColor fg;
303 if (fgColor.isEmpty())
304 fg = Preferences::defaultFgColour();
305 else
307 fg.setNamedColor(fgColor);
308 if (!fg.isValid())
310 qCCritical(KALARM_LOG) << "D-Bus call: invalid foreground color:" << fgColor;
311 return false;
314 QFont font;
315 if (fontStr.isEmpty())
316 kaEventFlags |= KAEvent::DEFAULT_FONT;
317 else
319 if (!font.fromString(fontStr)) // N.B. this doesn't do good validation
321 qCCritical(KALARM_LOG) << "D-Bus call: invalid font:" << fontStr;
322 return false;
325 return theApp()->scheduleEvent(action, message, start, lateCancel, kaEventFlags, bg, fg, font,
326 audioFile.toString(), -1, reminderMins, recurrence, subRepeatDuration, subRepeatCount);
329 /******************************************************************************
330 * Schedule a file alarm, after converting the parameters from strings.
332 bool DBusHandler::scheduleFile(const QUrl& file,
333 const KDateTime& start, int lateCancel, unsigned flags, const QString& bgColor,
334 const QUrl& audioFile, int reminderMins, const KARecurrence& recurrence,
335 const Duration& subRepeatDuration, int subRepeatCount)
337 KAEvent::Flags kaEventFlags = convertStartFlags(start, flags);
338 QColor bg = convertBgColour(bgColor);
339 if (!bg.isValid())
340 return false;
341 return theApp()->scheduleEvent(KAEvent::FILE, file.toString(), start, lateCancel, kaEventFlags, bg, Qt::black, QFont(),
342 audioFile.toString(), -1, reminderMins, recurrence, subRepeatDuration, subRepeatCount);
345 /******************************************************************************
346 * Schedule a command alarm, after converting the parameters from strings.
348 bool DBusHandler::scheduleCommand(const QString& commandLine,
349 const KDateTime& start, int lateCancel, unsigned flags,
350 const KARecurrence& recurrence, const Duration& subRepeatDuration, int subRepeatCount)
352 KAEvent::Flags kaEventFlags = convertStartFlags(start, flags);
353 return theApp()->scheduleEvent(KAEvent::COMMAND, commandLine, start, lateCancel, kaEventFlags, Qt::black, Qt::black, QFont(),
354 QString(), -1, 0, recurrence, subRepeatDuration, subRepeatCount);
357 /******************************************************************************
358 * Schedule an email alarm, after validating the addresses and attachments.
360 bool DBusHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject,
361 const QString& message, const QString& attachments,
362 const KDateTime& start, int lateCancel, unsigned flags,
363 const KARecurrence& recurrence, const Duration& subRepeatDuration, int subRepeatCount)
365 KAEvent::Flags kaEventFlags = convertStartFlags(start, flags);
366 uint senderId = 0;
367 if (!fromID.isEmpty())
369 senderId = Identities::identityUoid(fromID);
370 if (!senderId)
372 qCCritical(KALARM_LOG) << "D-Bus call scheduleEmail(): unknown sender ID:" << fromID;
373 return false;
376 KCalCore::Person::List addrs;
377 QString bad = KAMail::convertAddresses(addresses, addrs);
378 if (!bad.isEmpty())
380 qCCritical(KALARM_LOG) << "D-Bus call scheduleEmail(): invalid email addresses:" << bad;
381 return false;
383 if (addrs.isEmpty())
385 qCCritical(KALARM_LOG) << "D-Bus call scheduleEmail(): no email address";
386 return false;
388 QStringList atts;
389 bad = KAMail::convertAttachments(attachments, atts);
390 if (!bad.isEmpty())
392 qCCritical(KALARM_LOG) << "D-Bus call scheduleEmail(): invalid email attachment:" << bad;
393 return false;
395 return theApp()->scheduleEvent(KAEvent::EMAIL, message, start, lateCancel, kaEventFlags, Qt::black, Qt::black, QFont(),
396 QString(), -1, 0, recurrence, subRepeatDuration, subRepeatCount, senderId, addrs, subject, atts);
399 /******************************************************************************
400 * Schedule a audio alarm, after converting the parameters from strings.
402 bool DBusHandler::scheduleAudio(const QString& audioUrl, int volumePercent,
403 const KDateTime& start, int lateCancel, unsigned flags,
404 const KARecurrence& recurrence, const Duration& subRepeatDuration, int subRepeatCount)
406 KAEvent::Flags kaEventFlags = convertStartFlags(start, flags);
407 float volume = (volumePercent >= 0) ? volumePercent / 100.0f : -1;
408 return theApp()->scheduleEvent(KAEvent::AUDIO, QString(), start, lateCancel, kaEventFlags, Qt::black, Qt::black, QFont(),
409 audioUrl, volume, 0, recurrence, subRepeatDuration, subRepeatCount);
413 /******************************************************************************
414 * Convert the start date/time string to a KDateTime. The date/time string is in
415 * the format YYYY-MM-DD[THH:MM[:SS]][ TZ] or [T]HH:MM[:SS].
416 * The time zone specifier (TZ) is a system time zone name, e.g. "Europe/London".
417 * If no time zone is specified, it defaults to the local clock time (which is
418 * not the same as the local time zone).
420 KDateTime DBusHandler::convertDateTime(const QString& dateTime, const KDateTime& defaultDt)
422 int i = dateTime.indexOf(QLatin1Char(' '));
423 QString dtString = dateTime.left(i);
424 QString zone = dateTime.mid(i);
425 QDate date;
426 QTime time;
427 bool haveTime = true;
428 bool error = false;
429 if (dtString.length() > 10)
431 // Both a date and a time are specified
432 QDateTime dt = QDateTime::fromString(dtString, Qt::ISODate);
433 error = !dt.isValid();
434 date = dt.date();
435 time = dt.time();
437 else
439 // Check whether a time is specified
440 QString t;
441 if (dtString[0] == QLatin1Char('T'))
442 t = dtString.mid(1); // it's a time: remove the leading 'T'
443 else if (!dtString[2].isDigit())
444 t = dtString; // it's a time with no leading 'T'
446 if (t.isEmpty())
448 // It's a date only
449 date = QDate::fromString(dtString, Qt::ISODate);
450 error = !date.isValid();
451 haveTime = false;
453 else
455 // It's a time only
456 time = QTime::fromString(t, Qt::ISODate);
457 error = !time.isValid();
460 KDateTime result;
461 if (!error)
462 result = AlarmTime::applyTimeZone(zone, date, time, haveTime, defaultDt);
463 if (error || !result.isValid())
465 if (!defaultDt.isValid())
466 qCCritical(KALARM_LOG) << "D-Bus call: invalid start date/time: '" << dateTime << "'";
467 else
468 qCCritical(KALARM_LOG) << "D-Bus call: invalid recurrence end date/time: '" << dateTime << "'";
470 return result;
473 /******************************************************************************
474 * Convert the flag bits to KAEvent flag bits.
476 KAEvent::Flags DBusHandler::convertStartFlags(const KDateTime& start, unsigned flags)
478 KAEvent::Flags kaEventFlags = 0;
479 if (flags & REPEAT_AT_LOGIN) kaEventFlags |= KAEvent::REPEAT_AT_LOGIN;
480 if (flags & BEEP) kaEventFlags |= KAEvent::BEEP;
481 if (flags & SPEAK) kaEventFlags |= KAEvent::SPEAK;
482 if (flags & CONFIRM_ACK) kaEventFlags |= KAEvent::CONFIRM_ACK;
483 if (flags & REPEAT_SOUND) kaEventFlags |= KAEvent::REPEAT_SOUND;
484 if (flags & AUTO_CLOSE) kaEventFlags |= KAEvent::AUTO_CLOSE;
485 if (flags & EMAIL_BCC) kaEventFlags |= KAEvent::EMAIL_BCC;
486 if (flags & DISPLAY_COMMAND) kaEventFlags |= KAEvent::DISPLAY_COMMAND;
487 if (flags & SCRIPT) kaEventFlags |= KAEvent::SCRIPT;
488 if (flags & EXEC_IN_XTERM) kaEventFlags |= KAEvent::EXEC_IN_XTERM;
489 if (flags & SHOW_IN_KORG) kaEventFlags |= KAEvent::COPY_KORGANIZER;
490 if (flags & EXCL_HOLIDAYS) kaEventFlags |= KAEvent::EXCL_HOLIDAYS;
491 if (flags & WORK_TIME_ONLY) kaEventFlags |= KAEvent::WORK_TIME_ONLY;
492 if (flags & DISABLED) kaEventFlags |= KAEvent::DISABLED;
493 if (start.isDateOnly()) kaEventFlags |= KAEvent::ANY_TIME;
494 return kaEventFlags;
497 /******************************************************************************
498 * Convert the background colour string to a QColor.
500 QColor DBusHandler::convertBgColour(const QString& bgColor)
502 if (bgColor.isEmpty())
503 return Preferences::defaultBgColour();
504 QColor bg(bgColor);
505 if (!bg.isValid())
506 qCCritical(KALARM_LOG) << "D-Bus call: invalid background color:" << bgColor;
507 return bg;
510 bool DBusHandler::convertRecurrence(KDateTime& start, KARecurrence& recurrence,
511 const QString& startDateTime, const QString& icalRecurrence,
512 int subRepeatInterval, Duration& subRepeatDuration)
514 start = convertDateTime(startDateTime);
515 if (!start.isValid())
516 return false;
517 if (!recurrence.set(icalRecurrence))
518 return false;
519 if (subRepeatInterval && recurrence.type() == KARecurrence::NO_RECUR)
521 subRepeatInterval = 0;
522 qCWarning(KALARM_LOG) << "D-Bus call: no recurrence specified, so sub-repetition ignored";
524 if (subRepeatInterval && !(subRepeatInterval % (24*60)))
525 subRepeatDuration = Duration(subRepeatInterval / (24*60), Duration::Days);
526 else
527 subRepeatDuration = Duration(subRepeatInterval * 60, Duration::Seconds);
528 return true;
531 bool DBusHandler::convertRecurrence(KDateTime& start, KARecurrence& recurrence, const QString& startDateTime,
532 int recurType, int recurInterval, int recurCount)
534 start = convertDateTime(startDateTime);
535 if (!start.isValid())
536 return false;
537 return convertRecurrence(recurrence, start, recurType, recurInterval, recurCount, KDateTime());
540 bool DBusHandler::convertRecurrence(KDateTime& start, KARecurrence& recurrence, const QString& startDateTime,
541 int recurType, int recurInterval, const QString& endDateTime)
543 start = convertDateTime(startDateTime);
544 if (!start.isValid())
545 return false;
546 KDateTime end = convertDateTime(endDateTime, start);
547 if (end.isDateOnly() && !start.isDateOnly())
549 qCCritical(KALARM_LOG) << "D-Bus call: alarm is date-only, but recurrence end is date/time";
550 return false;
552 if (!end.isDateOnly() && start.isDateOnly())
554 qCCritical(KALARM_LOG) << "D-Bus call: alarm is timed, but recurrence end is date-only";
555 return false;
557 return convertRecurrence(recurrence, start, recurType, recurInterval, 0, end);
560 bool DBusHandler::convertRecurrence(KARecurrence& recurrence, const KDateTime& start, int recurType,
561 int recurInterval, int recurCount, const KDateTime& end)
563 KARecurrence::Type type;
564 switch (recurType)
566 case MINUTELY: type = KARecurrence::MINUTELY; break;
567 case DAILY: type = KARecurrence::DAILY; break;
568 case WEEKLY: type = KARecurrence::WEEKLY; break;
569 case MONTHLY: type = KARecurrence::MONTHLY_DAY; break;
570 case YEARLY: type = KARecurrence::ANNUAL_DATE; break;
571 default:
572 qCCritical(KALARM_LOG) << "D-Bus call: invalid recurrence type:" << recurType;
573 return false;
575 recurrence.set(type, recurInterval, recurCount, start, end);
576 return true;
579 // vim: et sw=4: