summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimnotifymanager.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/opimnotifymanager.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimnotifymanager.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/opimnotifymanager.h b/libopie2/opiepim/core/opimnotifymanager.h
index f3c22f9..0272e5d 100644
--- a/libopie2/opiepim/core/opimnotifymanager.h
+++ b/libopie2/opiepim/core/opimnotifymanager.h
@@ -1,91 +1,122 @@
1/*
2 This file is part of the Opie Project
3 Copyright (C) The Main Author <main-author@whereever.org>
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6 .>+-=
7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software
11 - . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more
20++= -. .` .: details.
21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
1#ifndef OPIE_PIM_NOTIFY_MANAGER_H 29#ifndef OPIE_PIM_NOTIFY_MANAGER_H
2#define OPIE_PIM_NOTIFY_MANAGER_H 30#define OPIE_PIM_NOTIFY_MANAGER_H
3 31
4#include <qvaluelist.h> 32#include <qvaluelist.h>
5 33
6#include <opie/opimnotify.h> 34#include <opie2/opimnotify.h>
7 35
36namespace Opie {
8/** 37/**
9 * The notify manager keeps track of the Notifiers.... 38 * The notify manager keeps track of the Notifiers....
10 */ 39 */
11class OPimNotifyManager { 40class OPimNotifyManager {
12public: 41public:
13 typedef QValueList<OPimReminder> Reminders; 42 typedef QValueList<OPimReminder> Reminders;
14 typedef QValueList<OPimAlarm> Alarms; 43 typedef QValueList<OPimAlarm> Alarms;
15 OPimNotifyManager( const Reminders& rems = Reminders(), const Alarms& alarms = Alarms() ); 44 OPimNotifyManager( const Reminders& rems = Reminders(), const Alarms& alarms = Alarms() );
16 ~OPimNotifyManager(); 45 ~OPimNotifyManager();
17 46
18 /* we will cast it for you ;) */ 47 /* we will cast it for you ;) */
19 void add( const OPimNotify& ); 48 void add( const OPimNotify& );
20 void remove( const OPimNotify& ); 49 void remove( const OPimNotify& );
21 /* replaces all with this one! */ 50 /* replaces all with this one! */
22 void replace( const OPimNotify& ); 51 void replace( const OPimNotify& );
23 52
24 Reminders reminders()const; 53 Reminders reminders()const;
25 54
26 /** 55 /**
27 * Return 56 * Return
28 */ 57 */
29 Alarms alarms()const; 58 Alarms alarms()const;
30 59
31 /** 60 /**
32 * Return alarm at DateTime "when". If more than one is registered at this 61 * Return alarm at DateTime "when". If more than one is registered at this
33 * DateTime, the first one is returned. 62 * DateTime, the first one is returned.
34 * If none was found, an empty Alarm is returned. 63 * If none was found, an empty Alarm is returned.
35 * @param when The date and time of the returned alarm 64 * @param when The date and time of the returned alarm
36 * @param found Returns true if anything was found. 65 * @param found Returns true if anything was found.
37 * @return Returns the found alarm at given DateTime. It is empty if found is false 66 * @return Returns the found alarm at given DateTime. It is empty if found is false
38 * (nothing could be found at given date and time) 67 * (nothing could be found at given date and time)
39 */ 68 */
40 OPimAlarm alarmAtDateTime( const QDateTime& when, bool& found ) const; 69 OPimAlarm alarmAtDateTime( const QDateTime& when, bool& found ) const;
41 70
42 void setAlarms( const Alarms& ); 71 void setAlarms( const Alarms& );
43 void setReminders( const Reminders& ); 72 void setReminders( const Reminders& );
44 73
45 /* register is a Ansi C keyword... */ 74 /* register is a Ansi C keyword... */
46 /** 75 /**
47 * This function will register the Notify to the Alarm Server 76 * This function will register the Notify to the Alarm Server
48 * or datebook depending on the type of the notify 77 * or datebook depending on the type of the notify
49 */ 78 */
50 void registerNotify( const OPimNotify& ); 79 void registerNotify( const OPimNotify& );
51 80
52 /** 81 /**
53 * this will do the opposite.. 82 * this will do the opposite..
54 */ 83 */
55 void deregister( const OPimNotify& ); 84 void deregister( const OPimNotify& );
56 85
57 bool isEmpty()const; 86 bool isEmpty()const;
58 87
59 /** 88 /**
60 * Return all alarms as string 89 * Return all alarms as string
61 */ 90 */
62 QString alarmsToString() const; 91 QString alarmsToString() const;
63 /** 92 /**
64 * Return all notifiers as string 93 * Return all notifiers as string
65 */ 94 */
66 QString remindersToString() const; 95 QString remindersToString() const;
67 96
68 /** 97 /**
69 * Convert string to alarms 98 * Convert string to alarms
70 * @param str String created by alarmsToString() 99 * @param str String created by alarmsToString()
71 */ 100 */
72 void alarmsFromString( const QString& str ); 101 void alarmsFromString( const QString& str );
73 102
74 /** 103 /**
75 * Convert string to reminders 104 * Convert string to reminders
76 * @param str String created by remindersToString() 105 * @param str String created by remindersToString()
77 */ 106 */
78 void remindersFromString( const QString& str ); 107 void remindersFromString( const QString& str );
79 108
80 109
81 110
82private: 111private:
83 Reminders m_rem; 112 Reminders m_rem;
84 Alarms m_al; 113 Alarms m_al;
85 114
86 class Private; 115 class Private;
87 Private *d; 116 Private *d;
88 117
89}; 118};
90 119
120}
121
91#endif 122#endif