author | eilers <eilers> | 2002-10-16 10:52:40 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-16 10:52:40 (UTC) |
commit | f9756ca203a06fa60413ef1a96416d87b9dc1a6b (patch) (side-by-side diff) | |
tree | 0b67c3c485349a1c31ea82e7c12526b990654d58 /libopie/pim/opimaccesstemplate.h | |
parent | 9eba62fc184260f1a0455a6dd057e2ccebf4bdac (diff) | |
download | opie-f9756ca203a06fa60413ef1a96416d87b9dc1a6b.zip opie-f9756ca203a06fa60413ef1a96416d87b9dc1a6b.tar.gz opie-f9756ca203a06fa60413ef1a96416d87b9dc1a6b.tar.bz2 |
Added some docu to the interface and now using the cache infrastucture by zecke.. :)
Diffstat (limited to 'libopie/pim/opimaccesstemplate.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/opimaccesstemplate.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/libopie/pim/opimaccesstemplate.h b/libopie/pim/opimaccesstemplate.h index 3e1f393..50cb1e4 100644 --- a/libopie/pim/opimaccesstemplate.h +++ b/libopie/pim/opimaccesstemplate.h @@ -38,11 +38,15 @@ public: virtual bool load(); - /** - * reload from the backend + /** Reload database. + * You should execute this function if the external database + * was changed. + * This function will load the external database and afterwards + * rejoin the local changes. Therefore the local database will be set consistent. */ virtual bool reload(); - /** - * save to the backend + /** Save contacts database. + * Save is more a "commit". After calling this function, all changes are public available. + * @return true if successful */ virtual bool save(); @@ -50,4 +54,6 @@ public: /** * if the resource was changed externally + * You should use the signal handling instead of polling possible changes ! + * zecke: Do you implement a signal for otodoaccess ? */ bool wasChangedExternally()const; @@ -60,5 +66,5 @@ public: /** - * queryByExample) + * queryByExample. * @see otodoaccess, ocontactaccess */ @@ -84,4 +90,6 @@ public: /** * add T to the backend + * @param t The item to add. + * @return <i>true</i> if added successfully. */ virtual bool add( const T& t ) ; @@ -90,4 +98,6 @@ public: /** * remove T from the backend + * @param t The item to remove + * @return <i>true</i> if successful. */ virtual bool remove( const T& t ); @@ -95,4 +105,6 @@ public: /** * remove the OPimRecord with uid + * @param uid The ID of the item to remove + * @return <i>true</i> if successful. */ virtual bool remove( int uid ); @@ -100,4 +112,6 @@ public: /** * replace T from backend + * @param t The item to replace + * @return <i>true</i> if successful. */ virtual bool replace( const T& t) ; @@ -143,5 +157,6 @@ bool OPimAccessTemplate<T>::load() { template <class T> bool OPimAccessTemplate<T>::reload() { - return m_backEnd->reload(); + invalidateCache(); // zecke: I think this should be added (se) + return m_backEnd->reload(); } template <class T> |