21 #ifndef KABC_ADDRESSBOOK_H
22 #define KABC_ADDRESSBOOK_H
25 #include <tqptrlist.h>
27 #include <tderesources/manager.h>
29 #include "addressee.h"
48 friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &,
AddressBook & );
72 bool operator==(
const Iterator &it );
73 bool operator!=(
const Iterator &it );
102 struct ConstIteratorData;
103 ConstIteratorData *d;
136 Ticket *requestSaveTicket( Resource *resource = 0 );
142 void releaseSaveTicket(
Ticket *ticket );
167 bool save(
Ticket *ticket );
176 bool asyncSave(
Ticket *ticket );
215 void insertAddressee(
const Addressee &addr );
222 void removeAddressee(
const Addressee &addr );
230 void removeAddressee(
const Iterator &it );
247 Addressee findByUid(
const TQString &uid );
252 Addressee::List allAddressees();
260 Addressee::List findByName(
const TQString &name );
268 Addressee::List findByEmail(
const TQString &email );
276 Addressee::List findByCategory(
const TQString &category );
282 virtual TQString identifier();
288 Field::List fields(
int category = Field::All );
299 bool addCustomField(
const TQString &label,
int category = Field::All,
300 const TQString &key = TQString::null,
301 const TQString &app = TQString::null );
309 bool addResource( Resource *resource );
317 bool removeResource( Resource *resource );
322 TQPtrList<Resource> resources();
337 void error(
const TQString &msg );
342 void cleanUp() TDE_DEPRECATED;
352 void emitAddressBookLocked() { emit addressBookLocked(
this ); }
353 void emitAddressBookUnlocked() { emit addressBookUnlocked(
this ); }
354 void emitAddressBookChanged() { emit addressBookChanged(
this ); }
362 bool loadingHasFinished()
const;
409 void resourceLoadingFinished( Resource* );
410 void resourceSavingFinished( Resource* );
411 void resourceLoadingError( Resource*,
const TQString& );
412 void resourceSavingError( Resource*,
const TQString& );
415 void deleteRemovedAddressees();
416 void setStandardResource( Resource* );
417 Resource *standardResource();
418 KRES::Manager<Resource> *resourceManager();
421 TQPtrList<Resource> mDummy;
422 struct AddressBookData;
427 KABC_EXPORT TQDataStream &operator>>( TQDataStream &,
AddressBook & );
Address Book Const Iterator.
void addressBookUnlocked(AddressBook *addressBook)
Emitted when one of the resources has been unlocked.
void loadingFinished(Resource *resource)
Emitted when the asynchronous loading of one resource has finished after calling asyncLoad().
void savingFinished(Resource *resource)
Emitted when the asynchronous saving of one resource has finished after calling asyncSave().
void addressBookLocked(AddressBook *addressBook)
Emitted when one of the resources has been locked for writing.
void addressBookChanged(AddressBook *addressBook)
Emitted when one of the resources discovered a change in its backend or the asynchronous loading of a...
Abstract class that provides displaying of error messages.
Standard KDE address book.
Helper class for handling coordinated save of address books.
kdbgstream & operator<<(const TQValueList< T > &list)
static data, shared by ALL addressee objects