summaryrefslogtreecommitdiff
path: root/libopie/pim/opimaccesstemplate.h
Unidiff
Diffstat (limited to 'libopie/pim/opimaccesstemplate.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/opimaccesstemplate.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libopie/pim/opimaccesstemplate.h b/libopie/pim/opimaccesstemplate.h
index 50cb1e4..c5523a8 100644
--- a/libopie/pim/opimaccesstemplate.h
+++ b/libopie/pim/opimaccesstemplate.h
@@ -56,25 +56,25 @@ public:
56 * You should use the signal handling instead of polling possible changes ! 56 * You should use the signal handling instead of polling possible changes !
57 * zecke: Do you implement a signal for otodoaccess ? 57 * zecke: Do you implement a signal for otodoaccess ?
58 */ 58 */
59 bool wasChangedExternally()const; 59 bool wasChangedExternally()const;
60 60
61 /** 61 /**
62 * return a List of records 62 * return a List of records
63 * you can iterate over them 63 * you can iterate over them
64 */ 64 */
65 virtual List allRecords()const; 65 virtual List allRecords()const;
66 66
67 /** 67 /**
68 * queryByExample. 68 * queryByExample.
69 * @see otodoaccess, ocontactaccess 69 * @see otodoaccess, ocontactaccess
70 */ 70 */
71 virtual List queryByExample( const T& t, int querySettings ); 71 virtual List queryByExample( const T& t, int querySettings );
72 72
73 /** 73 /**
74 * find the OPimRecord uid 74 * find the OPimRecord uid
75 */ 75 */
76 virtual T find( int uid )const; 76 virtual T find( int uid )const;
77 77
78 /** 78 /**
79 * read ahead cache find method ;) 79 * read ahead cache find method ;)
80 */ 80 */
@@ -107,24 +107,25 @@ public:
107 * @param uid The ID of the item to remove 107 * @param uid The ID of the item to remove
108 * @return <i>true</i> if successful. 108 * @return <i>true</i> if successful.
109 */ 109 */
110 virtual bool remove( int uid ); 110 virtual bool remove( int uid );
111 111
112 /** 112 /**
113 * replace T from backend 113 * replace T from backend
114 * @param t The item to replace 114 * @param t The item to replace
115 * @return <i>true</i> if successful. 115 * @return <i>true</i> if successful.
116 */ 116 */
117 virtual bool replace( const T& t) ; 117 virtual bool replace( const T& t) ;
118 118
119 void setReadAhead( uint count );
119 /** 120 /**
120 * @internal 121 * @internal
121 */ 122 */
122 void cache( const T& )const; 123 void cache( const T& )const;
123 void setSaneCacheSize( int ); 124 void setSaneCacheSize( int );
124protected: 125protected:
125 /** 126 /**
126 * invalidate the cache 127 * invalidate the cache
127 */ 128 */
128 void invalidateCache(); 129 void invalidateCache();
129 130
130 void setBackEnd( BackEnd* end ); 131 void setBackEnd( BackEnd* end );
@@ -242,13 +243,17 @@ void OPimAccessTemplate<T>::setBackEnd( BackEnd* end ) {
242 if (m_backEnd ) 243 if (m_backEnd )
243 m_backEnd->setFrontend( this ); 244 m_backEnd->setFrontend( this );
244} 245}
245template <class T> 246template <class T>
246void OPimAccessTemplate<T>::cache( const T& t ) const{ 247void OPimAccessTemplate<T>::cache( const T& t ) const{
247 /* hacky we need to work around the const*/ 248 /* hacky we need to work around the const*/
248 ((OPimAccessTemplate<T>*)this)->m_cache.add( t ); 249 ((OPimAccessTemplate<T>*)this)->m_cache.add( t );
249} 250}
250template <class T> 251template <class T>
251void OPimAccessTemplate<T>::setSaneCacheSize( int size ) { 252void OPimAccessTemplate<T>::setSaneCacheSize( int size ) {
252 m_cache.setSize( size ); 253 m_cache.setSize( size );
253} 254}
255template <class T>
256void OPimAccessTemplate<T>::setReadAhead( uint count ) {
257 m_backEnd->setReadAhead( count );
258}
254#endif 259#endif