KABC::ResourceDir Class Reference

Inheritance diagram for KABC::ResourceDir:

KABC::Resource List of all members.

Detailed Description

Definition at line 41 of file resourcedir.h.


Public Member Functions

 ResourceDir (const KConfig *)
 ResourceDir (const QString &path, const QString &type="vcard")
 ~ResourceDir ()
virtual void writeConfig (KConfig *)
virtual bool doOpen ()
virtual void doClose ()
virtual TicketrequestSaveTicket ()
virtual void releaseSaveTicket (Ticket *)
virtual bool load ()
virtual bool asyncLoad ()
virtual bool save (Ticket *ticket)
virtual bool asyncSave (Ticket *ticket)
void setPath (const QString &)
QString path () const
void setFormat (const QString &format)
QString format () const
virtual void removeAddressee (const Addressee &addr)

Protected Slots

void pathChanged ()

Protected Member Functions

void init (const QString &path, const QString &format)

Member Function Documentation

void ResourceDir::writeConfig ( KConfig  )  [virtual]

Writes the resource specific config to file.

Reimplemented from KABC::Resource.

Definition at line 103 of file resourcedir.cpp.

Ticket * ResourceDir::requestSaveTicket (  )  [virtual]

Request a ticket, you have to pass through save() to allow locking.

The resource has to create its locks in this function.

Implements KABC::Resource.

Definition at line 115 of file resourcedir.cpp.

void ResourceDir::releaseSaveTicket ( Ticket  )  [virtual]

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.

Implements KABC::Resource.

Definition at line 136 of file resourcedir.cpp.

bool ResourceDir::load (  )  [virtual]

Loads all addressees synchronously.

Returns:
Whether the loading was successfully.

Implements KABC::Resource.

Definition at line 171 of file resourcedir.cpp.

bool ResourceDir::asyncLoad (  )  [virtual]

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.

Returns:
Whether the synchronous part of loading was successfully.

Reimplemented from KABC::Resource.

Definition at line 200 of file resourcedir.cpp.

bool ResourceDir::save ( Ticket ticket  )  [virtual]

Saves all addressees synchronously.

Parameters:
ticket You have to release the ticket later with releaseSaveTicket() explicitely.
Returns:
Whether the saving was successfully.

Implements KABC::Resource.

Definition at line 214 of file resourcedir.cpp.

bool ResourceDir::asyncSave ( Ticket ticket  )  [virtual]

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.

Parameters:
ticket You have to release the ticket later with releaseSaveTicket() explicitely.
Returns:
Whether the saving was successfully.

Reimplemented from KABC::Resource.

Definition at line 246 of file resourcedir.cpp.

void ResourceDir::setPath ( const QString  ) 

Set path to be used for saving.

Definition at line 258 of file resourcedir.cpp.

QString ResourceDir::path (  )  const

Return path used for loading and saving the address book.

Definition at line 269 of file resourcedir.cpp.

void ResourceDir::setFormat ( const QString format  ) 

Set the format by name.

Definition at line 274 of file resourcedir.cpp.

QString ResourceDir::format (  )  const

Returns the format name.

Definition at line 285 of file resourcedir.cpp.

void ResourceDir::removeAddressee ( const Addressee addr  )  [virtual]

Remove a addressee from its source.

This method is mainly called by KABC::AddressBook.

Reimplemented from KABC::Resource.

Definition at line 304 of file resourcedir.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys