summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.h
authorulf69 <ulf69>2004-08-02 18:33:07 (UTC)
committer ulf69 <ulf69>2004-08-02 18:33:07 (UTC)
commit60a6886f06be31ec690df34dc8e3b8931c2d3bd7 (patch) (side-by-side diff)
treec4c7c15cfd3753a3342806a11fb8f5c20bb4f923 /kabc/addressbook.h
parent863c4c3678e59ef125c08c00e9532ded5b540f67 (diff)
downloadkdepimpi-60a6886f06be31ec690df34dc8e3b8931c2d3bd7.zip
kdepimpi-60a6886f06be31ec690df34dc8e3b8931c2d3bd7.tar.gz
kdepimpi-60a6886f06be31ec690df34dc8e3b8931c2d3bd7.tar.bz2
added support for syncable resources
Diffstat (limited to 'kabc/addressbook.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index 3a8e028..f89d7da 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -41,13 +41,13 @@ namespace KABC {
class ErrorHandler;
class Resource;
class Ticket;
/**
@short Address Book
-
+
This class provides access to a collection of address book entries.
*/
class AddressBook : public QObject
{
Q_OBJECT
@@ -55,13 +55,13 @@ class AddressBook : public QObject
friend QDataStream &operator>>( QDataStream &, AddressBook & );
friend class StdAddressBook;
public:
/**
@short Address Book Iterator
-
+
This class provides an iterator for address book entries.
*/
class Iterator
{
public:
Iterator();
@@ -82,22 +82,22 @@ class AddressBook : public QObject
struct IteratorData;
IteratorData *d;
};
/**
@short Address Book Const Iterator
-
+
This class provides a const iterator for address book entries.
*/
class ConstIterator
{
public:
ConstIterator();
ConstIterator( const ConstIterator & );
~ConstIterator();
-
+
ConstIterator &operator=( const ConstIterator & );
const Addressee &operator*() const;
const Addressee* operator->() const;
ConstIterator &operator++();
ConstIterator &operator++(int);
ConstIterator &operator--();
@@ -105,41 +105,42 @@ class AddressBook : public QObject
bool operator==( const ConstIterator &it );
bool operator!=( const ConstIterator &it );
struct ConstIteratorData;
ConstIteratorData *d;
};
-
+
/**
Constructs a address book object.
-
+
@param format File format class.
*/
AddressBook();
AddressBook( const QString &config );
+ AddressBook( const QString &config, const QString &family );
virtual ~AddressBook();
/**
Requests a ticket for saving the addressbook. Calling this function locks
the addressbook for all other processes. If the address book is already
locked the function returns 0. You need the returned @ref Ticket object
for calling the @ref save() function.
-
+
@see save()
*/
Ticket *requestSaveTicket( Resource *resource=0 );
-
+
/**
Load address book from file.
*/
bool load();
/**
Save address book. The address book is saved to the file, the Ticket
object has been requested for by @ref requestSaveTicket().
-
+
@param ticket a ticket object returned by @ref requestSaveTicket()
*/
bool save( Ticket *ticket );
/**
Returns a iterator for first entry of address book.
@@ -162,13 +163,13 @@ class AddressBook : public QObject
ConstIterator end() const;
/**
Removes all entries from address book.
*/
void clear();
-
+
/**
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 & );
@@ -240,24 +241,24 @@ class AddressBook : public QObject
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 * );
/**
@@ -305,18 +306,17 @@ class AddressBook : public QObject
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
-//US optimization
- void init(const QString &config);
-
struct AddressBookData;
AddressBookData *d;
};
QDataStream &operator<<( QDataStream &, const AddressBook & );