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 | |||
@@ -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 | } |
143 | template <class T> | 157 | template <class T> |
144 | bool OPimAccessTemplate<T>::reload() { | 158 | bool 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 | } |
147 | template <class T> | 162 | template <class T> |
148 | bool OPimAccessTemplate<T>::save() { | 163 | bool OPimAccessTemplate<T>::save() { |