summaryrefslogtreecommitdiff
path: root/libopie/pim/odatebookaccess.cpp
Unidiff
Diffstat (limited to 'libopie/pim/odatebookaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/odatebookaccess.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/libopie/pim/odatebookaccess.cpp b/libopie/pim/odatebookaccess.cpp
index 08e61ff..a3661a3 100644
--- a/libopie/pim/odatebookaccess.cpp
+++ b/libopie/pim/odatebookaccess.cpp
@@ -1,6 +1,13 @@
1#include "obackendfactory.h" 1#include "obackendfactory.h"
2#include "odatebookaccess.h" 2#include "odatebookaccess.h"
3 3
4/**
5 * Simple constructor
6 * It takes a ODateBookAccessBackend as parent. If it is 0 the default implementation
7 * will be used!
8 * @param back The backend to be used or 0 for the default backend
9 * @param ac What kind of access is intended
10 */
4ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac ) 11ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac )
5 : OPimAccessTemplate<OEvent>( back ) 12 : OPimAccessTemplate<OEvent>( back )
6{ 13{
@@ -12,27 +19,48 @@ ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac )
12} 19}
13ODateBookAccess::~ODateBookAccess() { 20ODateBookAccess::~ODateBookAccess() {
14} 21}
22
23/**
24 * @return all events available
25 */
15ODateBookAccess::List ODateBookAccess::rawEvents()const { 26ODateBookAccess::List ODateBookAccess::rawEvents()const {
16 QArray<int> ints = m_backEnd->rawEvents(); 27 QArray<int> ints = m_backEnd->rawEvents();
17 28
18 List lis( ints, this ); 29 List lis( ints, this );
19 return lis; 30 return lis;
20} 31}
32
33/**
34 * @return all repeating events
35 */
21ODateBookAccess::List ODateBookAccess::rawRepeats()const { 36ODateBookAccess::List ODateBookAccess::rawRepeats()const {
22 QArray<int> ints = m_backEnd->rawRepeats(); 37 QArray<int> ints = m_backEnd->rawRepeats();
23 38
24 List lis( ints, this ); 39 List lis( ints, this );
25 return lis; 40 return lis;
26} 41}
42
43/**
44 * @return all non repeating events
45 */
27ODateBookAccess::List ODateBookAccess::nonRepeats()const { 46ODateBookAccess::List ODateBookAccess::nonRepeats()const {
28 QArray<int> ints = m_backEnd->nonRepeats(); 47 QArray<int> ints = m_backEnd->nonRepeats();
29 48
30 List lis( ints, this ); 49 List lis( ints, this );
31 return lis; 50 return lis;
32} 51}
52
53/**
54 * @return dates in the time span between from and to
55 * @param from Include all events from...
56 * @param to Include all events to...
57 */
33OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) { 58OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) {
34 return m_backEnd->effecticeEvents( from, to ); 59 return m_backEnd->effecticeEvents( from, to );
35} 60}
61/**
62 * @return all events at a given datetime
63 */
36OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) { 64OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) {
37 return m_backEnd->effecticeEvents( start ); 65 return m_backEnd->effecticeEvents( start );
38} 66}