summaryrefslogtreecommitdiff
path: root/libopie/pim/opimaccesstemplate.h
authoreilers <eilers>2002-10-16 10:52:40 (UTC)
committer eilers <eilers>2002-10-16 10:52:40 (UTC)
commitf9756ca203a06fa60413ef1a96416d87b9dc1a6b (patch) (unidiff)
tree0b67c3c485349a1c31ea82e7c12526b990654d58 /libopie/pim/opimaccesstemplate.h
parent9eba62fc184260f1a0455a6dd057e2ccebf4bdac (diff)
downloadopie-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.h27
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
@@ -37,18 +37,24 @@ public:
37 */ 37 */
38 virtual bool load(); 38 virtual bool load();
39 39
40 /** 40 /** Reload database.
41 * reload from the backend 41 * You should execute this function if the external database
42 * was changed.
43 * This function will load the external database and afterwards
44 * rejoin the local changes. Therefore the local database will be set consistent.
42 */ 45 */
43 virtual bool reload(); 46 virtual bool reload();
44 47
45 /** 48 /** Save contacts database.
46 * save to the backend 49 * Save is more a "commit". After calling this function, all changes are public available.
50 * @return true if successful
47 */ 51 */
48 virtual bool save(); 52 virtual bool save();
49 53
50 /** 54 /**
51 * if the resource was changed externally 55 * if the resource was changed externally
56 * You should use the signal handling instead of polling possible changes !
57 * zecke: Do you implement a signal for otodoaccess ?
52 */ 58 */
53 bool wasChangedExternally()const; 59 bool wasChangedExternally()const;
54 60
@@ -59,7 +65,7 @@ public:
59 virtual List allRecords()const; 65 virtual List allRecords()const;
60 66
61 /** 67 /**
62 * queryByExample) 68 * queryByExample.
63 * @see otodoaccess, ocontactaccess 69 * @see otodoaccess, ocontactaccess
64 */ 70 */
65 virtual List queryByExample( const T& t, int querySettings ); 71 virtual List queryByExample( const T& t, int querySettings );
@@ -83,22 +89,30 @@ public:
83 89
84 /** 90 /**
85 * add T to the backend 91 * add T to the backend
92 * @param t The item to add.
93 * @return <i>true</i> if added successfully.
86 */ 94 */
87 virtual bool add( const T& t ) ; 95 virtual bool add( const T& t ) ;
88 96
89 /* only the uid matters */ 97 /* only the uid matters */
90 /** 98 /**
91 * remove T from the backend 99 * remove T from the backend
100 * @param t The item to remove
101 * @return <i>true</i> if successful.
92 */ 102 */
93 virtual bool remove( const T& t ); 103 virtual bool remove( const T& t );
94 104
95 /** 105 /**
96 * remove the OPimRecord with uid 106 * remove the OPimRecord with uid
107 * @param uid The ID of the item to remove
108 * @return <i>true</i> if successful.
97 */ 109 */
98 virtual bool remove( int uid ); 110 virtual bool remove( int uid );
99 111
100 /** 112 /**
101 * replace T from backend 113 * replace T from backend
114 * @param t The item to replace
115 * @return <i>true</i> if successful.
102 */ 116 */
103 virtual bool replace( const T& t) ; 117 virtual bool replace( const T& t) ;
104 118
@@ -142,7 +156,8 @@ bool OPimAccessTemplate<T>::load() {
142} 156}
143template <class T> 157template <class T>
144bool OPimAccessTemplate<T>::reload() { 158bool OPimAccessTemplate<T>::reload() {
145 return m_backEnd->reload(); 159 invalidateCache(); // zecke: I think this should be added (se)
160 return m_backEnd->reload();
146} 161}
147template <class T> 162template <class T>
148bool OPimAccessTemplate<T>::save() { 163bool OPimAccessTemplate<T>::save() {