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.h22
1 files changed, 3 insertions, 19 deletions
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h
index 15a7b7f..26af762 100644
--- a/libopie2/opiepim/backend/opimaccessbackend.h
+++ b/libopie2/opiepim/backend/opimaccessbackend.h
@@ -90,15 +90,15 @@ public:
virtual QArray<int> queryByExample( const T& t, int settings, const QDateTime& d = QDateTime() ) = 0;
/**
* find the OPimRecord with uid @param uid
* returns T and T.isEmpty() if nothing was found
*/
- virtual T find(int uid )const = 0;
+ virtual T find( int uid )const = 0;
- virtual T find(int uid, const QArray<int>& items,
+ virtual T find( int uid, const QArray<int>& items,
uint current, typename Frontend::CacheDirection ) const;
/**
* clear the back end
*/
virtual void clear() = 0;
@@ -128,19 +128,12 @@ public:
void setReadAhead( uint count );
protected:
int access()const;
void cache( const T& t )const;
- /**
- * Returns the element with given uid out of the cache.
- * Returns empty element if nothing was found.
- * <b>Attention:</b> This just works if we have a frontend which contains the cache !
- */
- T cacheFind( int uid ) const;
-
/**
* use a prime number here!
*/
void setSaneCacheSize( int );
uint readAhead()const;
@@ -170,31 +163,22 @@ void OPimAccessBackend<T>::setFrontend( Frontend* fr ) {
template <class T>
void OPimAccessBackend<T>::cache( const T& t )const {
if ( m_front )
m_front->cache( t );
}
-template <class T>
-T OPimAccessBackend<T>::cacheFind( int uid )const {
- if ( ! m_front ){
- qWarning ( "No frontend assigned ! Therefore we cannot access the cache to return the right element!" );
- return T();
- }
-
- return m_front->cacheFind( uid );
-}
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, typename Frontend::CacheDirection ) const{
- qDebug( "*** Lookahead feature not supported. Fallback to default find!" );
+ qDebug( "*** Lookahead feature not supported. Fallback to default find!!" );
return find( uid );
}
template <class T>
void OPimAccessBackend<T>::setReadAhead( uint count ) {
m_read = count;
}