summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/odatebookaccess.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/odatebookaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/odatebookaccess.cpp35
1 files changed, 6 insertions, 29 deletions
diff --git a/libopie2/opiepim/core/odatebookaccess.cpp b/libopie2/opiepim/core/odatebookaccess.cpp
index 440ee0a..32fbb7d 100644
--- a/libopie2/opiepim/core/odatebookaccess.cpp
+++ b/libopie2/opiepim/core/odatebookaccess.cpp
@@ -39,7 +39,7 @@ namespace Opie {
39 * @param back The backend to be used or 0 for the default backend 39 * @param back The backend to be used or 0 for the default backend
40 * @param ac What kind of access is intended 40 * @param ac What kind of access is intended
41 */ 41 */
42ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac ) 42ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access )
43 : OPimAccessTemplate<OPimEvent>( back ) 43 : OPimAccessTemplate<OPimEvent>( back )
44{ 44{
45 if (!back ) 45 if (!back )
@@ -51,15 +51,6 @@ ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac )
51ODateBookAccess::~ODateBookAccess() { 51ODateBookAccess::~ODateBookAccess() {
52} 52}
53 53
54/**
55 * @return all events available
56 */
57ODateBookAccess::List ODateBookAccess::rawEvents()const {
58 QArray<int> ints = m_backEnd->rawEvents();
59
60 List lis( ints, this );
61 return lis;
62}
63 54
64/** 55/**
65 * @return all repeating events 56 * @return all repeating events
@@ -82,34 +73,20 @@ ODateBookAccess::List ODateBookAccess::nonRepeats()const {
82} 73}
83 74
84/** 75/**
85 * @return dates in the time span between from and to
86 * @param from Include all events from...
87 * @param to Include all events to...
88 */
89OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) const {
90 return m_backEnd->effectiveEvents( from, to );
91}
92/**
93 * @return all events at a given datetime
94 */
95OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) const {
96 return m_backEnd->effectiveEvents( start );
97}
98
99/**
100 * @return non repeating dates in the time span between from and to 76 * @return non repeating dates in the time span between from and to
101 * @param from Include all events from... 77 * @param from Include all events from...
102 * @param to Include all events to... 78 * @param to Include all events to...
103 */ 79 */
104OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) const { 80OPimOccurrence::List ODateBookAccess::effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) const {
105 return m_backEnd->effectiveNonRepeatingEvents( from, to ); 81 return OPimBase::convertOccurrenceFromBackend( m_backEnd->effectiveNonRepeatingEvents( from, to ) );
106} 82}
107/** 83/**
108 * @return all non repeating events at a given datetime 84 * @return all non repeating events at a given datetime
109 */ 85 */
110OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDateTime& start ) const { 86OPimOccurrence::List ODateBookAccess::effectiveNonRepeatingEvents( const QDateTime& start ) const {
111 return m_backEnd->effectiveNonRepeatingEvents( start ); 87 return OPimBase::convertOccurrenceFromBackend( m_backEnd->effectiveNonRepeatingEvents( start ) );
112} 88}
89
113int ODateBookAccess::rtti() const 90int ODateBookAccess::rtti() const
114{ 91{
115 return OPimResolver::DateBook; 92 return OPimResolver::DateBook;