kalarm

kalarmiface.h
Go to the documentation of this file.
1 /*
2  * kalarmiface.h - DCOP interface to KAlarm
3  * Program: kalarm
4  * Copyright © 2004-2006,2008 by David Jarvie <djarvie@kde.org>
5  *
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.
10  *
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.
15  *
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.
19  */
20 
21 #ifndef KALARMIFACE_H
22 #define KALARMIFACE_H
23 
26 // No forward declarations - dcopidl2cpp won't work
27 #include <dcopobject.h>
28 #include <kurl.h>
29 #include <tqstringlist.h>
30 class TQString;
31 
36 class KAlarmIface : virtual public DCOPObject
37 {
38  K_DCOP
39  public:
54  enum Flags
55  {
56  REPEAT_AT_LOGIN = 0x01, // repeat alarm at every login
57  BEEP = 0x02, // sound audible beep when alarm is displayed
58  REPEAT_SOUND = 0x08, // repeat sound file while alarm is displayed
59  CONFIRM_ACK = 0x04, // closing the alarm message window requires confirmation prompt
60  AUTO_CLOSE = 0x10, // auto-close alarm window after late-cancel period
61  EMAIL_BCC = 0x20, // blind copy the email to the user
62  DISABLED = 0x40, // alarm is currently disabled
63  SCRIPT = 0x80, // command is a script, not a shell command line
64  EXEC_IN_XTERM = 0x100, // execute command alarm in terminal window
65  SPEAK = 0x200, // speak the alarm message when it is displayed
66  SHOW_IN_KORG = 0x400 // show the alarm as an event in KOrganizer
67  };
75  enum RecurType
76  {
77  MINUTELY = 1, // the repeat interval is measured in minutes
78  DAILY = 2, // the repeat interval is measured in days
79  WEEKLY = 3, // the repeat interval is measured in weeks
80  MONTHLY = 4, // the repeat interval is measured in months
81  YEARLY = 5 // the repeat interval is measured in years
82  };
83 
84  k_dcop:
91  virtual bool cancelEvent(const TQString& url, const TQString& eventId) = 0;
92 
99  virtual bool triggerEvent(const TQString& url, const TQString& eventId) = 0;
100 
122  virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
123  const TQString& bgColor, const TQString& fgColor, const TQString& font,
124  const KURL& audioFile, int reminderMins, const TQString& recurrence,
125  int repeatInterval, int repeatCount) = 0;
149  virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
150  const TQString& bgColor, const TQString& fgColor, const TQString& font,
151  const KURL& audioFile, int reminderMins,
152  int repeatType, int repeatInterval, int repeatCount) = 0;
176  virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
177  const TQString& bgColor, const TQString& fgColor, const TQString& font,
178  const KURL& audioFile, int reminderMins,
179  int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
180 
197  virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
198  const KURL& audioFile, int reminderMins, const TQString& recurrence,
199  int repeatInterval, int repeatCount) = 0;
218  virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
219  const KURL& audioFile, int reminderMins, int repeatType, int repeatInterval, int repeatCount) = 0;
238  virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
239  const KURL& audioFile, int reminderMins,
240  int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
241 
252  virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
253  const TQString& recurrence, int repeatInterval, int repeatCount) = 0;
266  virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
267  int repeatType, int repeatInterval, int repeatCount) = 0;
280  virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
281  int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
282 
298  virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
299  const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
300  const TQString& recurrence, int repeatInterval, int repeatCount) = 0;
318  virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
319  const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
320  int repeatType, int repeatInterval, int repeatCount) = 0;
338  virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
339  const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
340  int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
345  virtual bool edit(const TQString& eventID) = 0;
352  virtual bool editNew(const TQString& templateName) = 0;
353 };
354 
355 #endif // KALARMIFACE_H
KAlarmIface provides a DCOP interface for other applications to request KAlarm actions.
Definition: kalarmiface.h:37
virtual bool scheduleCommand(const TQString &commandLine, const TQString &startDateTime, int lateCancel, unsigned flags, int repeatType, int repeatInterval, const TQString &endDateTime)=0
Schedule a command execution alarm.
Flags
Bit values for the flags parameter of "scheduleXxxx()" DCOP calls.
Definition: kalarmiface.h:55
virtual bool scheduleFile(const KURL &file, const TQString &startDateTime, int lateCancel, unsigned flags, const TQString &bgColor, const KURL &audioFile, int reminderMins, int repeatType, int repeatInterval, const TQString &endDateTime)=0
Schedule a file display alarm.
RecurType
Values for the repeatType parameter of "scheduleXxxx()" DCOP calls.
Definition: kalarmiface.h:76
virtual bool scheduleCommand(const TQString &commandLine, const TQString &startDateTime, int lateCancel, unsigned flags, const TQString &recurrence, int repeatInterval, int repeatCount)=0
Schedule a command execution alarm.
virtual bool edit(const TQString &eventID)=0
Open the alarm edit dialog to edit an existing alarm.
virtual bool scheduleMessage(const TQString &message, const TQString &startDateTime, int lateCancel, unsigned flags, const TQString &bgColor, const TQString &fgColor, const TQString &font, const KURL &audioFile, int reminderMins, const TQString &recurrence, int repeatInterval, int repeatCount)=0
Schedule a message display alarm.
virtual bool scheduleEmail(const TQString &fromID, const TQString &addresses, const TQString &subject, const TQString &message, const TQString &attachments, const TQString &startDateTime, int lateCancel, unsigned flags, int repeatType, int repeatInterval, int repeatCount)=0
Schedule an email alarm.
virtual bool scheduleCommand(const TQString &commandLine, const TQString &startDateTime, int lateCancel, unsigned flags, int repeatType, int repeatInterval, int repeatCount)=0
Schedule a command execution alarm.
virtual bool cancelEvent(const TQString &url, const TQString &eventId)=0
Cancel (delete) an already scheduled alarm.
virtual bool editNew(const TQString &templateName)=0
Open the alarm edit dialog to edit a new alarm.
virtual bool triggerEvent(const TQString &url, const TQString &eventId)=0
Trigger the immediate display or execution of an alarm, regardless of what time it is scheduled for.
virtual bool scheduleFile(const KURL &file, const TQString &startDateTime, int lateCancel, unsigned flags, const TQString &bgColor, const KURL &audioFile, int reminderMins, int repeatType, int repeatInterval, int repeatCount)=0
Schedule a file display alarm.
virtual bool scheduleFile(const KURL &file, const TQString &startDateTime, int lateCancel, unsigned flags, const TQString &bgColor, const KURL &audioFile, int reminderMins, const TQString &recurrence, int repeatInterval, int repeatCount)=0
Schedule a file display alarm.
virtual bool scheduleEmail(const TQString &fromID, const TQString &addresses, const TQString &subject, const TQString &message, const TQString &attachments, const TQString &startDateTime, int lateCancel, unsigned flags, int repeatType, int repeatInterval, const TQString &endDateTime)=0
Schedule an email alarm.
virtual bool scheduleMessage(const TQString &message, const TQString &startDateTime, int lateCancel, unsigned flags, const TQString &bgColor, const TQString &fgColor, const TQString &font, const KURL &audioFile, int reminderMins, int repeatType, int repeatInterval, const TQString &endDateTime)=0
Schedule a message display alarm.
virtual bool scheduleMessage(const TQString &message, const TQString &startDateTime, int lateCancel, unsigned flags, const TQString &bgColor, const TQString &fgColor, const TQString &font, const KURL &audioFile, int reminderMins, int repeatType, int repeatInterval, int repeatCount)=0
Schedule a message display alarm.
virtual bool scheduleEmail(const TQString &fromID, const TQString &addresses, const TQString &subject, const TQString &message, const TQString &attachments, const TQString &startDateTime, int lateCancel, unsigned flags, const TQString &recurrence, int repeatInterval, int repeatCount)=0
Schedule an email alarm.