summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimnotify.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/opimnotify.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimnotify.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/opimnotify.h b/libopie2/opiepim/core/opimnotify.h
index 58417db..fed3970 100644
--- a/libopie2/opiepim/core/opimnotify.h
+++ b/libopie2/opiepim/core/opimnotify.h
@@ -1,30 +1,60 @@
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_H 29#ifndef OPIE_PIM_NOTIFY_H
2#define OPIE_PIM_NOTIFY_H 30#define OPIE_PIM_NOTIFY_H
3 31
4#include <qdatetime.h> 32#include <qdatetime.h>
5#include <qvaluelist.h> 33#include <qvaluelist.h>
6 34
35
36namespace Opie {
7/** 37/**
8 * This is the base class of Notifiers. Possible 38 * This is the base class of Notifiers. Possible
9 * notifiers would be Alarms, Reminders 39 * notifiers would be Alarms, Reminders
10 * What they share is that they have 40 * What they share is that they have
11 * A DateTime, Type, Duration 41 * A DateTime, Type, Duration
12 * This is what this base class takes care of 42 * This is what this base class takes care of
13 * on top of that it's shared 43 * on top of that it's shared
14 */ 44 */
15/* 45/*
16 * TALK to eilers: have a class OPimDuration which sets the Duration 46 * TALK to eilers: have a class OPimDuration which sets the Duration
17 * given on the Due/Start Date? -zecke 47 * given on the Due/Start Date? -zecke
18 * discuss: do we need a uid for the notify? -zecke 48 * discuss: do we need a uid for the notify? -zecke
19 */ 49 */
20class OPimNotify { 50class OPimNotify {
21public: 51public:
22 typedef QValueList<OPimNotify> ValueList; 52 typedef QValueList<OPimNotify> ValueList;
23 OPimNotify( const QDateTime& start = QDateTime(), int duration = 0, int parent = 0 ); 53 OPimNotify( const QDateTime& start = QDateTime(), int duration = 0, int parent = 0 );
24 OPimNotify( const OPimNotify& ); 54 OPimNotify( const OPimNotify& );
25 virtual ~OPimNotify(); 55 virtual ~OPimNotify();
26 56
27 OPimNotify &operator=(const OPimNotify& ); 57 OPimNotify &operator=(const OPimNotify& );
28 bool operator==( const OPimNotify& ); 58 bool operator==( const OPimNotify& );
29 59
30 virtual QString type()const = 0; 60 virtual QString type()const = 0;
@@ -120,25 +150,27 @@ public:
120 OPimReminder( const OPimReminder& ); 150 OPimReminder( const OPimReminder& );
121 OPimReminder &operator=(const OPimReminder& ); 151 OPimReminder &operator=(const OPimReminder& );
122 152
123 QString type()const; 153 QString type()const;
124 154
125 bool operator==( const OPimReminder& ); 155 bool operator==( const OPimReminder& );
126 156
127 /** 157 /**
128 * the uid of the alarm 158 * the uid of the alarm
129 * inside the 'datebook' application 159 * inside the 'datebook' application
130 */ 160 */
131 int recordUid()const; 161 int recordUid()const;
132 void setRecordUid( int uid ); 162 void setRecordUid( int uid );
133 163
134private: 164private:
135 void deref(); 165 void deref();
136 void copyIntern(); 166 void copyIntern();
137 167
138 struct Data; 168 struct Data;
139 Data* data; 169 Data* data;
140 class Private; 170 class Private;
141 Private *d; 171 Private *d;
142}; 172};
143 173
174}
175
144#endif 176#endif