summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/odatebookaccessbackend.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend.h47
1 files changed, 20 insertions, 27 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.h b/libopie2/opiepim/backend/odatebookaccessbackend.h
index a9cce6a..8927ca1 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend.h
@@ -42,8 +42,6 @@ namespace Opie {
42 */ 42 */
43class ODateBookAccessBackend : public OPimAccessBackend<OPimEvent> { 43class ODateBookAccessBackend : public OPimAccessBackend<OPimEvent> {
44public: 44public:
45 typedef int UID;
46
47 /** 45 /**
48 * c'tor without parameter 46 * c'tor without parameter
49 */ 47 */
@@ -52,36 +50,29 @@ public:
52 50
53 /** 51 /**
54 * This method should return a list of UIDs containing 52 * This method should return a list of UIDs containing
55 * all events. No filter should be applied
56 * @return list of events
57 */
58 virtual QArray<UID> rawEvents()const = 0;
59
60 /**
61 * This method should return a list of UIDs containing
62 * all repeating events. No filter should be applied 53 * all repeating events. No filter should be applied
63 * @return list of repeating events 54 * @return list of repeating events
64 */ 55 */
65 virtual QArray<UID> rawRepeats()const = 0; 56 virtual UIDArray rawRepeats()const = 0;
66 57
67 /** 58 /**
68 * This mthod should return a list of UIDs containing all non 59 * This mthod should return a list of UIDs containing all non
69 * repeating events. No filter should be applied 60 * repeating events. No filter should be applied
70 * @return list of nonrepeating events 61 * @return list of nonrepeating events
71 */ 62 */
72 virtual QArray<UID> nonRepeats() const = 0; 63 virtual UIDArray nonRepeats() const = 0;
73 64
74 /** 65 /**
75 * If you do not want to implement the effectiveEvents methods below 66 * If you do not want to implement the effectiveEvents methods below
76 * you need to supply it with directNonRepeats. 67 * you need to supply it with directNonRepeats.
77 * This method can return empty lists if effectiveEvents is implememted 68 * This method can return empty lists if effectiveEvents is implememted
78 */ 69 */
79 virtual OPimEvent::ValueList directNonRepeats() = 0; 70 virtual OPimEvent::ValueList directNonRepeats()const = 0;
80 71
81 /** 72 /**
82 * Same as above but return raw repeats! 73 * Same as above but return raw repeats!
83 */ 74 */
84 virtual OPimEvent::ValueList directRawRepeats() = 0; 75 virtual OPimEvent::ValueList directRawRepeats()const = 0;
85 76
86 /* is implemented by default but you can reimplement it*/ 77 /* is implemented by default but you can reimplement it*/
87 /** 78 /**
@@ -89,27 +80,29 @@ public:
89 * EffectiveEvents bases on the directNonRepeats and directRawRepeats. You may implement this method 80 * EffectiveEvents bases on the directNonRepeats and directRawRepeats. You may implement this method
90 * yourself 81 * yourself
91 */ 82 */
92 virtual OEffectiveEvent::ValueList effectiveEvents( const QDate& from, const QDate& to ); 83 virtual OPimBackendOccurrence::List effectiveNonRepeatingEvents( const QDate& from, const QDate& to )const;
93 84
94 /** 85 /**
95 * this is an overloaded member function 86 * this is an overloaded member function
96 * @see effectiveEvents( const QDate& from, const QDate& to ) 87 * @see effectiveNonRepeatingEvents( const QDate& from, const QDate& to )
97 */
98 virtual OEffectiveEvent::ValueList effectiveEvents( const QDateTime& start );
99
100 /**
101 * Effective Events are special event occuring during a time frame. This method does calcualte
102 * EffectiveEvents bases on the directNonRepeats and directRawRepeats. You may implement this method
103 * yourself
104 */ 88 */
105 virtual OEffectiveEvent::ValueList effectiveNonRepeatingEvents( const QDate& from, const QDate& to ); 89 virtual OPimBackendOccurrence::List effectiveNonRepeatingEvents( const QDateTime& start )const;
106 90
107 /** 91 /**
108 * this is an overloaded member function 92 * Common and probably inefficent implementation
109 * @see effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) 93 * for queryByExample, sorted
94 * and occurrences
110 */ 95 */
111 virtual OEffectiveEvent::ValueList effectiveNonRepeatingEvents( const QDateTime& start ); 96//@{
112 97 UIDArray queryByExample( const OPimEvent&, int settings, const QDateTime& d = QDateTime() )const;
98 UIDArray sorted( const UIDArray&, bool asc, int, int, const QArray<int>& )const;
99 OPimBackendOccurrence::List occurrences( const QDate&, const QDate& end )const;
100 OPimBackendOccurrence::List occurrences( const QDateTime& )const;
101//@}
102
103protected:
104 static OPimBackendOccurrence::List filterOccurrences(const OPimBackendOccurrence::List,
105 const QDateTime& time );
113private: 106private:
114 class Private; 107 class Private;
115 Private *d; 108 Private *d;