.TH "KABC::ResourceFile" kde3 "11 Jun 2005" "Version Version 3.4.1" "kabc Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KABC::ResourceFile \- This resource allows access to a local file.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <resourcefile.h>\fP
.PP
Inherits KABC::Resource.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBResourceFile\fP (const \fBKConfig\fP *cfg)"
.br
.ti -1c
.RI "\fBResourceFile\fP (const \fBQString\fP &fileName, const \fBQString\fP &formatName='vcard')"
.br
.ti -1c
.RI "\fB~ResourceFile\fP ()"
.br
.ti -1c
.RI "virtual void \fBwriteConfig\fP (\fBKConfig\fP *cfg)"
.br
.ti -1c
.RI "virtual bool \fBdoOpen\fP ()"
.br
.ti -1c
.RI "virtual void \fBdoClose\fP ()"
.br
.ti -1c
.RI "virtual \fBTicket\fP * \fBrequestSaveTicket\fP ()"
.br
.ti -1c
.RI "virtual void \fBreleaseSaveTicket\fP (\fBTicket\fP *)"
.br
.ti -1c
.RI "virtual bool \fBload\fP ()"
.br
.ti -1c
.RI "virtual bool \fBasyncLoad\fP ()"
.br
.ti -1c
.RI "virtual bool \fBsave\fP (\fBTicket\fP *ticket)"
.br
.ti -1c
.RI "virtual bool \fBasyncSave\fP (\fBTicket\fP *ticket)"
.br
.ti -1c
.RI "void \fBsetFileName\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBfileName\fP () const "
.br
.ti -1c
.RI "void \fBsetFormat\fP (const \fBQString\fP &name)"
.br
.ti -1c
.RI "\fBQString\fP \fBformat\fP () const "
.br
.ti -1c
.RI "virtual void \fBremoveAddressee\fP (const \fBAddressee\fP &addr)"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBfileChanged\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBinit\fP (const \fBQString\fP &fileName, const \fBQString\fP &format)"
.br
.ti -1c
.RI "bool \fBlock\fP (const \fBQString\fP &fileName)"
.br
.ti -1c
.RI "void \fBunlock\fP (const \fBQString\fP &fileName)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This resource allows access to a local file. 
.PP
Definition at line 48 of file resourcefile.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KABC::ResourceFile::ResourceFile (const \fBKConfig\fP * cfg)"
.PP
Constructor. 
.PP
\fBParameters:\fP
.RS 4
\fIcfg\fP The config object where custom resource settings are stored. 
.RE
.PP

.SS "KABC::ResourceFile::ResourceFile (const \fBQString\fP & fileName, const \fBQString\fP & formatName = \fC'vcard'\fP)"
.PP
Construct file resource on file 
.PD 0

.IP "\(bu" 2
fileName using format 
.IP "\(bu" 2
formatName. 
.PP

.PP
.SS "KABC::ResourceFile::~\fBResourceFile\fP ()"
.PP
Destructor. 
.PP
.SH "Member Function Documentation"
.PP 
.SS "virtual void KABC::ResourceFile::writeConfig (\fBKConfig\fP * cfg)\fC [virtual]\fP"
.PP
Writes the config back. 
.PP
.SS "virtual bool KABC::ResourceFile::doOpen ()\fC [virtual]\fP"
.PP
Tries to open the file and checks for the proper format. 
.PP
This method should be called before \fBload()\fP. 
.SS "virtual void KABC::ResourceFile::doClose ()\fC [virtual]\fP"
.PP
Closes the file again. 
.PP
.SS "virtual \fBTicket\fP* KABC::ResourceFile::requestSaveTicket ()\fC [virtual]\fP"
.PP
Requests a save ticket, that is used by \fBsave()\fP. 
.PP
.SS "virtual bool KABC::ResourceFile::load ()\fC [virtual]\fP"
.PP
Loads all addressees from file to the address book. 
.PP
Returns true if all addressees could be loaded otherwise false. 
.SS "virtual bool KABC::ResourceFile::save (\fBTicket\fP * ticket)\fC [virtual]\fP"
.PP
Saves all addresses from address book to file. 
.PP
Returns true if all addressees could be saved otherwise false.
.PP
\fBParameters:\fP
.RS 4
\fIticket\fP The ticket returned by \fBrequestSaveTicket()\fP 
.RE
.PP

.SS "void KABC::ResourceFile::setFileName (const \fBQString\fP &)"
.PP
Set name of file to be used for saving. 
.PP
.SS "\fBQString\fP KABC::ResourceFile::fileName () const"
.PP
Return name of file used for loading and saving the address book. 
.PP
.SS "void KABC::ResourceFile::setFormat (const \fBQString\fP & name)"
.PP
Sets a new format by name. 
.PP
.SS "\fBQString\fP KABC::ResourceFile::format () const"
.PP
Returns the format name. 
.PP
.SS "virtual void KABC::ResourceFile::removeAddressee (const \fBAddressee\fP & addr)\fC [virtual]\fP"
.PP
Remove a addressee from its source. 
.PP
This method is mainly called by \fBKABC::AddressBook\fP. 

.SH "Author"
.PP 
Generated automatically by Doxygen for kabc Library from the source code.
