kabc Library API Documentation

KABC::ResourceSql Class Reference

Inheritance diagram for KABC::ResourceSql:

Inheritance graph
[legend]
Collaboration diagram for KABC::ResourceSql:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ResourceSql (AddressBook *ab, const QString &user, const QString &password, const QString &db, const QString &host)
 ResourceSql (AddressBook *ab, const KConfig *)
bool open ()
void close ()
TicketrequestSaveTicket ()
bool load ()
bool save (Ticket *)
QString identifier () const

Detailed Description

Definition at line 33 of file resourcesql.h.


Member Function Documentation

Ticket * ResourceSql::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 71 of file resourcesql.cpp.

References KABC::Resource::addressBook(), endl(), and kdDebug().

bool ResourceSql::load  )  [virtual]
 

Loads all addressees synchronously.

Returns:
Whether the loading was successfully.

Implements KABC::Resource.

Definition at line 113 of file resourcesql.cpp.

References KABC::Resource::addressBook(), KABC::AddressBook::insertAddressee(), QSqlQuery::next(), KABC::Address::setCountry(), KABC::Address::setExtended(), KABC::Address::setLabel(), KABC::Address::setLocality(), KABC::Address::setPostalCode(), KABC::Address::setPostOfficeBox(), KABC::Address::setRegion(), KABC::Address::setStreet(), KABC::Address::setType(), and QSqlQuery::value().

bool ResourceSql::save 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 210 of file resourcesql.cpp.

References KABC::Resource::addressBook(), QValueList::begin(), KABC::Resource::begin(), QValueList::ConstIterator(), QValueList::end(), KABC::Resource::end(), QSqlQuery::exec(), QString::mid(), QSqlQuery::next(), QString::number(), QString::right(), and QSqlQuery::value().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kabc Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Jul 20 14:07:44 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003