summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.h
Side-by-side diff
Diffstat (limited to 'kabc/addressbook.h') (more/less context) (show 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
@@ -181,169 +181,170 @@ class AddressBook : public QObject
Insert an Addressee object into address book. If an object with the same
unique id already exists in the address book it it replaced by the new
one. If not the new object is appended to the address book.
*/
void insertAddressee( const Addressee &, bool setRev = true, bool takeResource = false);
/**
Removes entry from the address book.
*/
void removeAddressee( const Addressee & );
/**
This is like @ref removeAddressee() just above, with the difference that
the first element is a iterator, returned by @ref begin().
*/
void removeAddressee( const Iterator & );
/**
Find the specified entry in address book. Returns end(), if the entry
couldn't be found.
*/
Iterator find( const Addressee & );
/**
Find the entry specified by an unique id. Returns an empty Addressee
object, if the address book does not contain an entry with this id.
*/
Addressee findByUid( const QString & );
/**
Returns a list of all addressees in the address book. This list can
be sorted with @ref KABC::AddresseeList for example.
*/
Addressee::List allAddressees();
/**
Find all entries with the specified name in the address book. Returns
an empty list, if no entries could be found.
*/
Addressee::List findByName( const QString & );
/**
Find all entries with the specified email address in the address book.
Returns an empty list, if no entries could be found.
*/
Addressee::List findByEmail( const QString & );
/**
Find all entries wich have the specified category in the address book.
Returns an empty list, if no entries could be found.
*/
Addressee::List findByCategory( const QString & );
/**
Return a string identifying this addressbook.
*/
virtual QString identifier();
/**
Used for debug output.
*/
void dump() const;
void emitAddressBookLocked() { emit addressBookLocked( this ); }
void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); }
void emitAddressBookChanged() { emit addressBookChanged( this ); }
/**
Return list of all Fields known to the address book which are associated
with the given field category.
*/
Field::List fields( int category = Field::All );
/**
Add custom field to address book.
@param label User visible label of the field.
@param category Ored list of field categories.
@param key Identifier used as key for reading and writing the field.
@param app String used as application key for reading and writing
the field.
*/
bool addCustomField( const QString &label, int category = Field::All,
const QString &key = QString::null,
const QString &app = QString::null );
/**
Add address book resource.
*/
bool addResource( Resource * );
/**
Remove address book resource.
*/
+ void removeResources();
bool removeResource( Resource * );
/**
Return pointer list of all resources.
*/
QPtrList<Resource> resources();
/**
Set the @p ErrorHandler, that is used by @ref error() to
provide gui-independend error messages.
*/
void setErrorHandler( ErrorHandler * );
/**
Shows gui independend error messages.
*/
void error( const QString& );
/**
Query all resources to clean up their lock files
*/
void cleanUp();
// sync stuff
//Addressee::List getExternLastSyncAddressees();
void resetTempSyncStat();
QStringList uidList();
void removeSyncAddressees( bool removeDeleted = false );
void mergeAB( AddressBook *aBook, const QString& profile, bool isSubset );
Addressee findByExternUid( const QString& uid , const QString& profile );
bool containsExternalUid( const QString& uid );
void preExternSync( AddressBook* aBook, const QString& csd, bool isSubset );
void postExternSync( AddressBook* aBook, const QString& csd , bool setID );
signals:
/**
Emitted, when the address book has changed on disk.
*/
void addressBookChanged( AddressBook * );
/**
Emitted, when the address book has been locked for writing.
*/
void addressBookLocked( AddressBook * );
/**
Emitted, when the address book has been unlocked.
*/
void addressBookUnlocked( AddressBook * );
protected:
void deleteRemovedAddressees();
void setStandardResource( Resource * );
Resource *standardResource();
KRES::Manager<Resource> *resourceManager();
void init(const QString &config, const QString &family);
private:
//US QPtrList<Resource> mDummy; // Remove in KDE 4
struct AddressBookData;
AddressBookData *d;
bool blockLSEchange;
};
QDataStream &operator<<( QDataStream &, const AddressBook & );
QDataStream &operator>>( QDataStream &, AddressBook & );
}
#endif