summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/opimaccessbackend.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/opimaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/opimaccessbackend.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h
index 27d3cb8..0bd2723 100644
--- a/libopie2/opiepim/backend/opimaccessbackend.h
+++ b/libopie2/opiepim/backend/opimaccessbackend.h
@@ -74,34 +74,41 @@ public:
virtual bool remove( int uid ) = 0;
/**
* replace a record with T.uid()
*/
virtual bool replace( const T& t ) = 0;
/*
* setTheFrontEnd!!!
*/
void setFrontend( Frontend* front );
+ /**
+ * set the read ahead count
+ */
+ void setReadAhead( uint count );
protected:
void cache( const T& t )const;
/**
* use a prime number here!
*/
void setSaneCacheSize( int );
+ uint readAhead()const;
+
private:
Frontend* m_front;
+ uint m_read;
};
template <class T>
OPimAccessBackend<T>::OPimAccessBackend() {
m_front = 0l;
}
template <class T>
OPimAccessBackend<T>::~OPimAccessBackend() {
}
template <class T>
@@ -114,14 +121,21 @@ void OPimAccessBackend<T>::cache( const T& t )const {
m_front->cache( t );
}
template <class T>
void OPimAccessBackend<T>::setSaneCacheSize( int size) {
if (m_front )
m_front->setSaneCacheSize( size );
}
template <class T>
T OPimAccessBackend<T>::find( int uid, const QArray<int>&,
uint, Frontend::CacheDirection )const {
return find( uid );
}
-
+template <class T>
+void OPimAccessBackend<T>::setReadAhead( uint count ) {
+ m_read = count;
+}
+template <class T>
+uint OPimAccessBackend<T>::readAhead()const {
+ return m_read;
+}
#endif