KABC::Resource Class Reference
Inheritance diagram for KABC::Resource:

Signals | |
void | loadingFinished (Resource *resource) |
void | loadingError (Resource *resource, const QString &msg) |
void | savingFinished (Resource *resource) |
void | savingError (Resource *resource, const QString &msg) |
Public Member Functions | |
Resource (const KConfig *config) | |
virtual | ~Resource () |
virtual ConstIterator | begin () const |
virtual Iterator | begin () |
virtual ConstIterator | end () const |
virtual Iterator | end () |
AddressBook * | addressBook () |
virtual void | writeConfig (KConfig *config) |
virtual Ticket * | requestSaveTicket ()=0 |
virtual void | releaseSaveTicket (Ticket *)=0 |
virtual bool | load ()=0 |
virtual bool | asyncLoad () |
virtual void | insertAddressee (const Addressee &) |
virtual void | removeAddressee (const Addressee &addr) |
virtual bool | save (Ticket *ticket)=0 |
virtual bool | asyncSave (Ticket *ticket) |
virtual Addressee | findByUid (const QString &uid) |
virtual Addressee::List | findByName (const QString &name) |
virtual Addressee::List | findByEmail (const QString &email) |
virtual Addressee::List | findByCategory (const QString &category) |
virtual void | clear () |
void | setAddressBook (AddressBook *) |
Protected Member Functions | |
Ticket * | createTicket (Resource *) |
Protected Attributes | |
Addressee::Map | mAddrMap |
Classes | |
class | ConstIterator |
Resource Const Iterator. More... | |
class | Iterator |
Resource Iterator. More... |
Detailed Description
Definition at line 55 of file resource.h.
Constructor & Destructor Documentation
|
Constructor.
|
|
Destructor.
|
Member Function Documentation
|
Returns an iterator pointing to the first addressee in the resource. This iterator equals end() if the resource is empty. Referenced by KABC::ResourceSql::save(), KABC::ResourceEvolution::save(), KABC::VCardFormatPlugin::saveAll(), and KABC::BinaryFormat::saveAll(). |
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. |
|
Returns an iterator pointing to the last addressee in the resource. This iterator equals begin() if the resource is empty. Referenced by KABC::ResourceSql::save(), KABC::ResourceEvolution::save(), KABC::VCardFormatPlugin::saveAll(), and KABC::BinaryFormat::saveAll(). |
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. |
|
|
Writes the resource specific config to file.
Reimplemented in KABC::ResourceDir, KABC::ResourceFile, KABC::ResourceLDAPKIO, and KABC::ResourceNet. Referenced by KABC::ResourceDir::writeConfig(). |
|
Request a ticket, you have to pass through save() to allow locking. The resource has to create its locks in this function. Implemented in KABC::ResourceDir, KABC::ResourceEvolution, KABC::ResourceFile, KABC::ResourceLDAPKIO, KABC::ResourceNet, and KABC::ResourceSql. |
|
Releases the ticket previousely requested with requestSaveTicket(). The resource has to remove its locks in this function. This function is also responsible for deleting the ticket. Implemented in KABC::ResourceDir, KABC::ResourceFile, KABC::ResourceLDAPKIO, and KABC::ResourceNet. |
|
Loads all addressees synchronously.
Implemented in KABC::ResourceDir, KABC::ResourceEvolution, KABC::ResourceFile, KABC::ResourceLDAPKIO, KABC::ResourceNet, and KABC::ResourceSql. |
|
Loads all addressees asyncronously. You have to make sure that either the loadingFinished() or loadingError() signal is emitted from within this function. The default implementation simply calls the synchronous load.
Reimplemented in KABC::ResourceDir, KABC::ResourceFile, KABC::ResourceLDAPKIO, and KABC::ResourceNet. |
|
Insert an addressee into the resource.
Referenced by KABC::VCardFormatPlugin::loadAll(), and KABC::BinaryFormat::loadAll(). |
|
Removes an addressee from resource.
Reimplemented in KABC::ResourceDir, KABC::ResourceEvolution, KABC::ResourceFile, and KABC::ResourceLDAPKIO. |
|
Saves all addressees synchronously.
Implemented in KABC::ResourceDir, KABC::ResourceEvolution, KABC::ResourceFile, KABC::ResourceLDAPKIO, KABC::ResourceNet, and KABC::ResourceSql. |
|
Saves all addressees asynchronously. You have to make sure that either the savingFinished() or savingError() signal is emitted from within this function. The default implementation simply calls the synchronous save.
Reimplemented in KABC::ResourceDir, KABC::ResourceFile, KABC::ResourceLDAPKIO, and KABC::ResourceNet. |
|
Searches an addressee with the specified unique identifier.
|
|
Searches all addressees which match the specified name.
|
|
Searches all addressees which match the specified email address.
|
|
Searches all addressees which belongs to the specified category.
|
|
Removes all addressees from the resource.
Referenced by KABC::ResourceDir::pathChanged(). |
|
This signal is emitted when the resource has finished the loading of all addressees from the backend to the internal cache.
Referenced by KABC::ResourceDir::asyncLoad(). |
|
This signal is emitted when an error occured during loading the addressees from the backend to the internal cache.
Referenced by KABC::ResourceDir::asyncLoad(). |
|
This signal is emitted when the resource has finished the saving of all addressees from the internal cache to the backend.
Referenced by KABC::ResourceDir::asyncSave(). |
|
This signal is emitted when an error occured during saving the addressees from the internal cache to the backend.
Referenced by KABC::ResourceDir::asyncSave(). |
The documentation for this class was generated from the following file: