author | eilers <eilers> | 2004-10-27 14:28:16 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-10-27 14:28:16 (UTC) |
commit | 03adfc8b698fbed4b6f31c8320f510eb6da0d51d (patch) (unidiff) | |
tree | cb2faa9af5eedab6c816ca81433f457e8930cfc2 /libopie2/opiepim | |
parent | e44d35ca3fd26ef7a3184b07516f6535d8844a83 (diff) | |
download | opie-03adfc8b698fbed4b6f31c8320f510eb6da0d51d.zip opie-03adfc8b698fbed4b6f31c8320f510eb6da0d51d.tar.gz opie-03adfc8b698fbed4b6f31c8320f510eb6da0d51d.tar.bz2 |
Switching to sqlite3
Please read the following page for upgrade your old sqlite V2 database:
http://opie.handhelds.org/cgi-bin/moin.cgi/SqlBackends
-rw-r--r-- | libopie2/opiepim/core/opimaccesstemplate.h | 7 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimcontactfields.h | 2 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimtemplatebase.h | 6 |
3 files changed, 1 insertions, 14 deletions
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index 7ab1ea5..f936d4e 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h | |||
@@ -173,17 +173,16 @@ public: | |||
173 | * @return <i>true</i> if successful. | 173 | * @return <i>true</i> if successful. |
174 | */ | 174 | */ |
175 | virtual bool replace( const T& t) ; | 175 | virtual bool replace( const T& t) ; |
176 | 176 | ||
177 | void setReadAhead( uint count ); | 177 | void setReadAhead( uint count ); |
178 | /** | 178 | /** |
179 | * @internal | 179 | * @internal |
180 | */ | 180 | */ |
181 | virtual T cacheFind( int uid )const; | ||
182 | void cache( const T& )const; | 181 | void cache( const T& )const; |
183 | void setSaneCacheSize( int ); | 182 | void setSaneCacheSize( int ); |
184 | 183 | ||
185 | QArray<int> records()const; | 184 | QArray<int> records()const; |
186 | protected: | 185 | protected: |
187 | /** | 186 | /** |
188 | * invalidate the cache | 187 | * invalidate the cache |
189 | */ | 188 | */ |
@@ -261,22 +260,16 @@ T OPimAccessTemplate<T>::find( int uid ) const{ | |||
261 | 260 | ||
262 | T t = m_backEnd->find( uid ); | 261 | T t = m_backEnd->find( uid ); |
263 | cache( t ); | 262 | cache( t ); |
264 | 263 | ||
265 | return t; | 264 | return t; |
266 | } | 265 | } |
267 | 266 | ||
268 | template <class T> | 267 | template <class T> |
269 | T OPimAccessTemplate<T>::cacheFind( int uid ) const | ||
270 | { | ||
271 | return m_cache.find( uid ); | ||
272 | } | ||
273 | |||
274 | template <class T> | ||
275 | T OPimAccessTemplate<T>::find( int uid, const QArray<int>& ar, | 268 | T OPimAccessTemplate<T>::find( int uid, const QArray<int>& ar, |
276 | uint current, typename OTemplateBase<T>::CacheDirection dir )const { | 269 | uint current, typename OTemplateBase<T>::CacheDirection dir )const { |
277 | /* | 270 | /* |
278 | * better do T.isEmpty() | 271 | * better do T.isEmpty() |
279 | * after a find this way we would | 272 | * after a find this way we would |
280 | * avoid two finds in QCache... | 273 | * avoid two finds in QCache... |
281 | */ | 274 | */ |
282 | // owarn << "find it now " << uid << oendl; | 275 | // owarn << "find it now " << uid << oendl; |
diff --git a/libopie2/opiepim/core/opimcontactfields.h b/libopie2/opiepim/core/opimcontactfields.h index 3aa3894..2e42951 100644 --- a/libopie2/opiepim/core/opimcontactfields.h +++ b/libopie2/opiepim/core/opimcontactfields.h | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Main Author <main-author@whereever.org> | 3 | Copyright (C) Stefan Eielrs <eilers.stefan@epost.de> |
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | 4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
diff --git a/libopie2/opiepim/core/opimtemplatebase.h b/libopie2/opiepim/core/opimtemplatebase.h index ec9a94e..787486c 100644 --- a/libopie2/opiepim/core/opimtemplatebase.h +++ b/libopie2/opiepim/core/opimtemplatebase.h | |||
@@ -88,22 +88,16 @@ public: | |||
88 | 88 | ||
89 | /** | 89 | /** |
90 | * read ahead find | 90 | * read ahead find |
91 | */ | 91 | */ |
92 | virtual T find( int uid, const QArray<int>& items, | 92 | virtual T find( int uid, const QArray<int>& items, |
93 | uint current, CacheDirection dir = Forward )const = 0; | 93 | uint current, CacheDirection dir = Forward )const = 0; |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * Find in Cache.. | ||
97 | * Returns empty object if nothing found. | ||
98 | */ | ||
99 | virtual T cacheFind( int uid )const = 0; | ||
100 | |||
101 | /** | ||
102 | * Put element into Cache | 96 | * Put element into Cache |
103 | */ | 97 | */ |
104 | virtual void cache( const T& )const = 0; | 98 | virtual void cache( const T& )const = 0; |
105 | virtual void setSaneCacheSize( int ) = 0; | 99 | virtual void setSaneCacheSize( int ) = 0; |
106 | 100 | ||
107 | OPimRecord* record()const; | 101 | OPimRecord* record()const; |
108 | OPimRecord* record(int uid )const; | 102 | OPimRecord* record(int uid )const; |
109 | static T* rec(); | 103 | static T* rec(); |