summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.h
authorzautrix <zautrix>2004-10-29 14:01:58 (UTC)
committer zautrix <zautrix>2004-10-29 14:01:58 (UTC)
commit102cc4a711e303372efea9797623ee2d9f27f63c (patch) (unidiff)
tree32e56b436e52b5b1bab701839a24fc175288d57c /kabc/addressbook.h
parent8c55eb6afe84ef69bb284d384a0c9f1ef1484ad8 (diff)
downloadkdepimpi-102cc4a711e303372efea9797623ee2d9f27f63c.zip
kdepimpi-102cc4a711e303372efea9797623ee2d9f27f63c.tar.gz
kdepimpi-102cc4a711e303372efea9797623ee2d9f27f63c.tar.bz2
removed debug output
Diffstat (limited to 'kabc/addressbook.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index 75f8b51..2351add 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -149,201 +149,202 @@ class AddressBook : public QObject
149 void export2File( QString fileName ); 149 void export2File( QString fileName );
150 bool export2PhoneFormat( QStringList uids ,QString fileName ); 150 bool export2PhoneFormat( QStringList uids ,QString fileName );
151 int importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false ); 151 int importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false );
152 void setUntagged( bool setNonSyncTagged = false ); 152 void setUntagged( bool setNonSyncTagged = false );
153 void removeUntagged(); 153 void removeUntagged();
154 void findNewExtIds( QString fileName, QString currentSyncDevice ); 154 void findNewExtIds( QString fileName, QString currentSyncDevice );
155 /** 155 /**
156 Returns a iterator for first entry of address book. 156 Returns a iterator for first entry of address book.
157 */ 157 */
158 Iterator begin(); 158 Iterator begin();
159 159
160 /** 160 /**
161 Returns a const iterator for first entry of address book. 161 Returns a const iterator for first entry of address book.
162 */ 162 */
163 ConstIterator begin() const; 163 ConstIterator begin() const;
164 164
165 /** 165 /**
166 Returns a iterator for first entry of address book. 166 Returns a iterator for first entry of address book.
167 */ 167 */
168 Iterator end(); 168 Iterator end();
169 169
170 /** 170 /**
171 Returns a const iterator for first entry of address book. 171 Returns a const iterator for first entry of address book.
172 */ 172 */
173 ConstIterator end() const; 173 ConstIterator end() const;
174 174
175 /** 175 /**
176 Removes all entries from address book. 176 Removes all entries from address book.
177 */ 177 */
178 void clear(); 178 void clear();
179 179
180 /** 180 /**
181 Insert an Addressee object into address book. If an object with the same 181 Insert an Addressee object into address book. If an object with the same
182 unique id already exists in the address book it it replaced by the new 182 unique id already exists in the address book it it replaced by the new
183 one. If not the new object is appended to the address book. 183 one. If not the new object is appended to the address book.
184 */ 184 */
185 void insertAddressee( const Addressee &, bool setRev = true, bool takeResource = false); 185 void insertAddressee( const Addressee &, bool setRev = true, bool takeResource = false);
186 186
187 /** 187 /**
188 Removes entry from the address book. 188 Removes entry from the address book.
189 */ 189 */
190 void removeAddressee( const Addressee & ); 190 void removeAddressee( const Addressee & );
191 191
192 /** 192 /**
193 This is like @ref removeAddressee() just above, with the difference that 193 This is like @ref removeAddressee() just above, with the difference that
194 the first element is a iterator, returned by @ref begin(). 194 the first element is a iterator, returned by @ref begin().
195 */ 195 */
196 void removeAddressee( const Iterator & ); 196 void removeAddressee( const Iterator & );
197 197
198 /** 198 /**
199 Find the specified entry in address book. Returns end(), if the entry 199 Find the specified entry in address book. Returns end(), if the entry
200 couldn't be found. 200 couldn't be found.
201 */ 201 */
202 Iterator find( const Addressee & ); 202 Iterator find( const Addressee & );
203 203
204 /** 204 /**
205 Find the entry specified by an unique id. Returns an empty Addressee 205 Find the entry specified by an unique id. Returns an empty Addressee
206 object, if the address book does not contain an entry with this id. 206 object, if the address book does not contain an entry with this id.
207 */ 207 */
208 Addressee findByUid( const QString & ); 208 Addressee findByUid( const QString & );
209 209
210 210
211 /** 211 /**
212 Returns a list of all addressees in the address book. This list can 212 Returns a list of all addressees in the address book. This list can
213 be sorted with @ref KABC::AddresseeList for example. 213 be sorted with @ref KABC::AddresseeList for example.
214 */ 214 */
215 Addressee::List allAddressees(); 215 Addressee::List allAddressees();
216 216
217 /** 217 /**
218 Find all entries with the specified name in the address book. Returns 218 Find all entries with the specified name in the address book. Returns
219 an empty list, if no entries could be found. 219 an empty list, if no entries could be found.
220 */ 220 */
221 Addressee::List findByName( const QString & ); 221 Addressee::List findByName( const QString & );
222 222
223 /** 223 /**
224 Find all entries with the specified email address in the address book. 224 Find all entries with the specified email address in the address book.
225 Returns an empty list, if no entries could be found. 225 Returns an empty list, if no entries could be found.
226 */ 226 */
227 Addressee::List findByEmail( const QString & ); 227 Addressee::List findByEmail( const QString & );
228 228
229 /** 229 /**
230 Find all entries wich have the specified category in the address book. 230 Find all entries wich have the specified category in the address book.
231 Returns an empty list, if no entries could be found. 231 Returns an empty list, if no entries could be found.
232 */ 232 */
233 Addressee::List findByCategory( const QString & ); 233 Addressee::List findByCategory( const QString & );
234 234
235 /** 235 /**
236 Return a string identifying this addressbook. 236 Return a string identifying this addressbook.
237 */ 237 */
238 virtual QString identifier(); 238 virtual QString identifier();
239 239
240 /** 240 /**
241 Used for debug output. 241 Used for debug output.
242 */ 242 */
243 void dump() const; 243 void dump() const;
244 244
245 void emitAddressBookLocked() { emit addressBookLocked( this ); } 245 void emitAddressBookLocked() { emit addressBookLocked( this ); }
246 void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); } 246 void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); }
247 void emitAddressBookChanged() { emit addressBookChanged( this ); } 247 void emitAddressBookChanged() { emit addressBookChanged( this ); }
248 248
249 /** 249 /**
250 Return list of all Fields known to the address book which are associated 250 Return list of all Fields known to the address book which are associated
251 with the given field category. 251 with the given field category.
252 */ 252 */
253 Field::List fields( int category = Field::All ); 253 Field::List fields( int category = Field::All );
254 254
255 /** 255 /**
256 Add custom field to address book. 256 Add custom field to address book.
257 257
258 @param label User visible label of the field. 258 @param label User visible label of the field.
259 @param category Ored list of field categories. 259 @param category Ored list of field categories.
260 @param key Identifier used as key for reading and writing the field. 260 @param key Identifier used as key for reading and writing the field.
261 @param app String used as application key for reading and writing 261 @param app String used as application key for reading and writing
262 the field. 262 the field.
263 */ 263 */
264 bool addCustomField( const QString &label, int category = Field::All, 264 bool addCustomField( const QString &label, int category = Field::All,
265 const QString &key = QString::null, 265 const QString &key = QString::null,
266 const QString &app = QString::null ); 266 const QString &app = QString::null );
267 267
268 268
269 /** 269 /**
270 Add address book resource. 270 Add address book resource.
271 */ 271 */
272 bool addResource( Resource * ); 272 bool addResource( Resource * );
273 273
274 /** 274 /**
275 Remove address book resource. 275 Remove address book resource.
276 */ 276 */
277 void removeResources();
277 bool removeResource( Resource * ); 278 bool removeResource( Resource * );
278 279
279 /** 280 /**
280 Return pointer list of all resources. 281 Return pointer list of all resources.
281 */ 282 */
282 QPtrList<Resource> resources(); 283 QPtrList<Resource> resources();
283 284
284 /** 285 /**
285 Set the @p ErrorHandler, that is used by @ref error() to 286 Set the @p ErrorHandler, that is used by @ref error() to
286 provide gui-independend error messages. 287 provide gui-independend error messages.
287 */ 288 */
288 void setErrorHandler( ErrorHandler * ); 289 void setErrorHandler( ErrorHandler * );
289 290
290 /** 291 /**
291 Shows gui independend error messages. 292 Shows gui independend error messages.
292 */ 293 */
293 void error( const QString& ); 294 void error( const QString& );
294 295
295 /** 296 /**
296 Query all resources to clean up their lock files 297 Query all resources to clean up their lock files
297 */ 298 */
298 void cleanUp(); 299 void cleanUp();
299 300
300 // sync stuff 301 // sync stuff
301 //Addressee::List getExternLastSyncAddressees(); 302 //Addressee::List getExternLastSyncAddressees();
302 void resetTempSyncStat(); 303 void resetTempSyncStat();
303 QStringList uidList(); 304 QStringList uidList();
304 void removeSyncAddressees( bool removeDeleted = false ); 305 void removeSyncAddressees( bool removeDeleted = false );
305 void mergeAB( AddressBook *aBook, const QString& profile, bool isSubset ); 306 void mergeAB( AddressBook *aBook, const QString& profile, bool isSubset );
306 Addressee findByExternUid( const QString& uid , const QString& profile ); 307 Addressee findByExternUid( const QString& uid , const QString& profile );
307 bool containsExternalUid( const QString& uid ); 308 bool containsExternalUid( const QString& uid );
308 309
309 void preExternSync( AddressBook* aBook, const QString& csd, bool isSubset ); 310 void preExternSync( AddressBook* aBook, const QString& csd, bool isSubset );
310 void postExternSync( AddressBook* aBook, const QString& csd , bool setID ); 311 void postExternSync( AddressBook* aBook, const QString& csd , bool setID );
311 signals: 312 signals:
312 /** 313 /**
313 Emitted, when the address book has changed on disk. 314 Emitted, when the address book has changed on disk.
314 */ 315 */
315 void addressBookChanged( AddressBook * ); 316 void addressBookChanged( AddressBook * );
316 317
317 /** 318 /**
318 Emitted, when the address book has been locked for writing. 319 Emitted, when the address book has been locked for writing.
319 */ 320 */
320 void addressBookLocked( AddressBook * ); 321 void addressBookLocked( AddressBook * );
321 322
322 /** 323 /**
323 Emitted, when the address book has been unlocked. 324 Emitted, when the address book has been unlocked.
324 */ 325 */
325 void addressBookUnlocked( AddressBook * ); 326 void addressBookUnlocked( AddressBook * );
326 327
327 protected: 328 protected:
328 void deleteRemovedAddressees(); 329 void deleteRemovedAddressees();
329 void setStandardResource( Resource * ); 330 void setStandardResource( Resource * );
330 Resource *standardResource(); 331 Resource *standardResource();
331 KRES::Manager<Resource> *resourceManager(); 332 KRES::Manager<Resource> *resourceManager();
332 333
333 void init(const QString &config, const QString &family); 334 void init(const QString &config, const QString &family);
334 335
335 private: 336 private:
336//US QPtrList<Resource> mDummy; // Remove in KDE 4 337//US QPtrList<Resource> mDummy; // Remove in KDE 4
337 338
338 339
339 struct AddressBookData; 340 struct AddressBookData;
340 AddressBookData *d; 341 AddressBookData *d;
341 bool blockLSEchange; 342 bool blockLSEchange;
342}; 343};
343 344
344QDataStream &operator<<( QDataStream &, const AddressBook & ); 345QDataStream &operator<<( QDataStream &, const AddressBook & );
345QDataStream &operator>>( QDataStream &, AddressBook & ); 346QDataStream &operator>>( QDataStream &, AddressBook & );
346 347
347} 348}
348 349
349#endif 350#endif