| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KABC::ResourceIMAP Class Reference

This class implements a KAddressBook resource that keeps its addresses in an IMAP folder in KMail (or other conforming email clients). More...

`#include <resourceimap.h>`

Collaboration diagram for KABC::ResourceIMAP:

[legend]
List of all members.

## Public Member Functions
| ResourceIMAP (AddressBook *ab)
| Constructor.
virtual | ~ResourceIMAP ()
| Destructor.
virtual bool | open ()
| Open the resource and returns if it was successfully.
virtual void | close ()
| Close the resource and returns if it was successfully.
virtual Ticket * | requestSaveTicket ()
| Request a ticket, you have to pass through save() to allow locking.
virtual bool | load ()
| Load all addressees to the addressbook.
virtual bool | save (Ticket *ticket)
| Save all addressees to the addressbook.
virtual QString | identifier () const
| Returns a unique identifier.
virtual void | cleanUp ()
| This method is called by an error handler if the application crashed.

## Detailed Description

This class implements a KAddressBook resource that keeps its addresses in an IMAP folder in KMail (or other conforming email clients).

Definition at line 37 of file resourceimap.h.

## Constructor & Destructor Documentation

ResourceIMAP::ResourceIMAP | ( | AddressBook * | ab | ) |

| Constructor. Definition at line 42 of file resourceimap.cpp. References KABC::FormatFactory::format().

ResourceIMAP::~ResourceIMAP | ( |  | ) | `[virtual]`

| Destructor. Definition at line 49 of file resourceimap.cpp.

## Member Function Documentation

bool ResourceIMAP::open | ( |  | ) | `[virtual]`

| Open the resource and returns if it was successfully. Definition at line 54 of file resourceimap.cpp.

void ResourceIMAP::close | ( |  | ) | `[virtual]`

| Close the resource and returns if it was successfully. Definition at line 60 of file resourceimap.cpp.

Ticket * ResourceIMAP::requestSaveTicket | ( |  | ) | `[virtual]`

| Request a ticket, you have to pass through save() to allow locking. Definition at line 65 of file resourceimap.cpp.

bool ResourceIMAP::load | ( |  | ) | `[virtual]`

| Load all addressees to the addressbook. Definition at line 86 of file resourceimap.cpp. References KABC::FormatPlugin::loadAll(), KTempFile::name(), QFile::open(), and KTempFile::unlink().

bool ResourceIMAP::save | ( | Ticket * | ticket | ) | `[virtual]`

  | Save all addressees to the addressbook. Parameters:
  ticket | The ticket you get by requestSaveTicket()
Definition at line 127 of file resourceimap.cpp. References KTempFile::close(), KTempFile::file(), KTempFile::name(), KABC::FormatPlugin::saveAll(), and KTempFile::unlink().

QString ResourceIMAP::identifier | ( |  | ) | const`[virtual]`

| Returns a unique identifier. Definition at line 173 of file resourceimap.cpp.

void ResourceIMAP::cleanUp | ( |  | ) | `[virtual]`

| This method is called by an error handler if the application crashed. Definition at line 178 of file resourceimap.cpp.

The documentation for this class was generated from the following files:

- resourceimap.h
- resourceimap.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:48 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001