Diffstat (limited to 'libopie2/opiepim/core/odatebookaccess.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/odatebookaccess.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/odatebookaccess.h b/libopie2/opiepim/core/odatebookaccess.h index 0be8606..d2e3925 100644 --- a/libopie2/opiepim/core/odatebookaccess.h +++ b/libopie2/opiepim/core/odatebookaccess.h | |||
@@ -1,76 +1,101 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de) | 3 | Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de) |
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | 4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | #ifndef OPIE_DATE_BOOK_ACCESS_H | 29 | #ifndef OPIE_DATE_BOOK_ACCESS_H |
30 | #define OPIE_DATE_BOOK_ACCESS_H | 30 | #define OPIE_DATE_BOOK_ACCESS_H |
31 | 31 | ||
32 | #include "odatebookaccessbackend.h" | 32 | #include "odatebookaccessbackend.h" |
33 | #include "opimaccesstemplate.h" | 33 | #include "opimaccesstemplate.h" |
34 | 34 | ||
35 | #include <opie2/opimevent.h> | 35 | #include <opie2/opimevent.h> |
36 | 36 | ||
37 | namespace Opie { | 37 | namespace Opie { |
38 | /** | 38 | /** |
39 | * This is the object orientated datebook database. It'll use OBackendFactory | 39 | * This is the object orientated datebook database. It'll use OBackendFactory |
40 | * to query for a backend. | 40 | * to query for a backend. |
41 | * All access to the datebook should be done via this class. | 41 | * All access to the datebook should be done via this class. |
42 | * Make sure to load and save the datebook this is not part of | 42 | * Make sure to load and save the datebook this is not part of |
43 | * destructing and creating the object | 43 | * destructing and creating the object |
44 | * | 44 | * |
45 | * @author Holger Freyther, Stefan Eilers | 45 | * @author Holger Freyther, Stefan Eilers |
46 | */ | 46 | */ |
47 | class ODateBookAccess : public OPimAccessTemplate<OPimEvent> { | 47 | class ODateBookAccess : public OPimAccessTemplate<OPimEvent> { |
48 | public: | 48 | public: |
49 | /** | ||
50 | * Filter for sorted() | ||
51 | * @see SortFilterBase in OPimBase | ||
52 | */ | ||
53 | enum SortFilter { | ||
54 | |||
55 | }; | ||
56 | |||
57 | /** | ||
58 | * Sort order for sorted() | ||
59 | * @see SortOrderBase in OPimBase | ||
60 | */ | ||
61 | enum SortOrder { | ||
62 | SortDescription = SortCustom, | ||
63 | SortLocation, | ||
64 | SortNote, | ||
65 | SortStartTime, | ||
66 | SortEndTime, | ||
67 | SortStartDate, | ||
68 | SortEndDate, | ||
69 | SortStartDateTime, | ||
70 | SortEndDateTime, | ||
71 | SortAlarmDateTime, | ||
72 | }; | ||
73 | |||
49 | ODateBookAccess( ODateBookAccessBackend* = 0l, enum Access acc = Random ); | 74 | ODateBookAccess( ODateBookAccessBackend* = 0l, enum Access acc = Random ); |
50 | ~ODateBookAccess(); | 75 | ~ODateBookAccess(); |
51 | 76 | ||
52 | /* return repeating events */ | 77 | /* return repeating events */ |
53 | List rawRepeats()const; | 78 | List rawRepeats()const; |
54 | 79 | ||
55 | /* return non repeating events */ | 80 | /* return non repeating events */ |
56 | List nonRepeats()const; | 81 | List nonRepeats()const; |
57 | 82 | ||
58 | /* return non repeating events (from,to) */ | 83 | /* return non repeating events (from,to) */ |
59 | OPimOccurrence::List effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) const; | 84 | OPimOccurrence::List effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) const; |
60 | OPimOccurrence::List effectiveNonRepeatingEvents( const QDateTime& start ) const; | 85 | OPimOccurrence::List effectiveNonRepeatingEvents( const QDateTime& start ) const; |
61 | 86 | ||
62 | /** | 87 | /** |
63 | * Return identification of used records | 88 | * Return identification of used records |
64 | */ | 89 | */ |
65 | int rtti() const; | 90 | int rtti() const; |
66 | 91 | ||
67 | 92 | ||
68 | private: | 93 | private: |
69 | ODateBookAccessBackend* m_backEnd; | 94 | ODateBookAccessBackend* m_backEnd; |
70 | class Private; | 95 | class Private; |
71 | Private* d; | 96 | Private* d; |
72 | }; | 97 | }; |
73 | 98 | ||
74 | } | 99 | } |
75 | 100 | ||
76 | #endif | 101 | #endif |