Diffstat (limited to 'libopie2/opiepim/core/opimnotifymanager.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimnotifymanager.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/opimnotifymanager.h b/libopie2/opiepim/core/opimnotifymanager.h new file mode 100644 index 0000000..0eebc9b --- a/dev/null +++ b/libopie2/opiepim/core/opimnotifymanager.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef OPIE_PIM_NOTIFY_MANAGER_H | ||
2 | #define OPIE_PIM_NOTIFY_MANAGER_H | ||
3 | |||
4 | #include <qvaluelist.h> | ||
5 | |||
6 | #include <opie/opimnotify.h> | ||
7 | |||
8 | /** | ||
9 | * The notify manager keeps track of the Notifiers.... | ||
10 | */ | ||
11 | class OPimNotifyManager { | ||
12 | public: | ||
13 | typedef QValueList<OPimReminder> Reminders; | ||
14 | typedef QValueList<OPimAlarm> Alarms; | ||
15 | OPimNotifyManager( const Reminders& rems = Reminders(), const Alarms& alarms = Alarms() ); | ||
16 | ~OPimNotifyManager(); | ||
17 | |||
18 | /* we will cast it for you ;) */ | ||
19 | void add( const OPimNotify& ); | ||
20 | void remove( const OPimNotify& ); | ||
21 | /* replaces all with this one! */ | ||
22 | void replace( const OPimNotify& ); | ||
23 | |||
24 | Reminders reminders()const; | ||
25 | Alarms alarms()const; | ||
26 | |||
27 | void setAlarms( const Alarms& ); | ||
28 | void setReminders( const Reminders& ); | ||
29 | |||
30 | /* register is a Ansi C keyword... */ | ||
31 | /** | ||
32 | * This function will register the Notify to the Alarm Server | ||
33 | * or datebook depending on the type of the notify | ||
34 | */ | ||
35 | void registerNotify( const OPimNotify& ); | ||
36 | |||
37 | /** | ||
38 | * this will do the opposite.. | ||
39 | */ | ||
40 | void deregister( const OPimNotify& ); | ||
41 | |||
42 | private: | ||
43 | Reminders m_rem; | ||
44 | Alarms m_al; | ||
45 | |||
46 | class Private; | ||
47 | Private *d; | ||
48 | |||
49 | }; | ||
50 | |||
51 | #endif | ||