KABC::ResourceFile Class Reference
This resource allows access to a local file. More...
#include <resourcefile.h>
Collaboration diagram for KABC::ResourceFile:

| Public Member Functions | |
| ResourceFile (const KConfig *cfg) | |
| ResourceFile (const QString &fileName, const QString &formatName="vcard") | |
| ~ResourceFile () | |
| virtual void | writeConfig (KConfig *cfg) | 
| virtual bool | doOpen () | 
| virtual void | doClose () | 
| virtual Ticket * | requestSaveTicket () | 
| virtual void | releaseSaveTicket (Ticket *) | 
| virtual bool | load () | 
| virtual bool | asyncLoad () | 
| virtual bool | save (Ticket *ticket) | 
| virtual bool | asyncSave (Ticket *ticket) | 
| void | setFileName (const QString &) | 
| QString | fileName () const | 
| void | setFormat (const QString &name) | 
| QString | format () const | 
| virtual void | removeAddressee (const Addressee &addr) | 
| Protected Slots | |
| void | fileChanged () | 
| Protected Member Functions | |
| void | init (const QString &fileName, const QString &format) | 
| bool | lock (const QString &fileName) | 
| void | unlock (const QString &fileName) | 
Detailed Description
This resource allows access to a local file.
Definition at line 48 of file resourcefile.h.
Constructor & Destructor Documentation
| 
 | 
| Constructor. 
 
 Definition at line 49 of file resourcefile.cpp. References fileName(). | 
| 
 | ||||||||||||
| Construct file resource on file 
 
 Definition at line 66 of file resourcefile.cpp. | 
| 
 | 
| Destructor. 
 Definition at line 95 of file resourcefile.cpp. | 
Member Function Documentation
| 
 | 
| Writes the config back. 
 Definition at line 101 of file resourcefile.cpp. References KConfigBase::writeEntry(), and KConfigBase::writePathEntry(). | 
| 
 | 
| Tries to open the file and checks for the proper format. This method should be called before load(). Definition at line 140 of file resourcefile.cpp. References KABC::FormatPlugin::checkFormat(), QFile::close(), QFile::exists(), QFile::open(), and QFile::size(). | 
| 
 | 
| Closes the file again. 
 Definition at line 167 of file resourcefile.cpp. | 
| 
 | 
| Requests a save ticket, that is used by save(). 
 Definition at line 109 of file resourcefile.cpp. References endl(), KABC::Lock::error(), kdDebug(), and KABC::Lock::lock(). | 
| 
 | 
| Loads all addressees from file to the address book. Returns true if all addressees could be loaded otherwise false. Definition at line 171 of file resourcefile.cpp. References endl(), kdDebug(), KABC::FormatPlugin::loadAll(), and QFile::open(). | 
| 
 | 
| Saves all addresses from address book to file. Returns true if all addressees could be saved otherwise false. 
 
 Definition at line 211 of file resourcefile.cpp. References KSaveFile::backupFile(), KSaveFile::close(), endl(), KSaveFile::file(), kdDebug(), QString::number(), KABC::FormatPlugin::saveAll(), and KSaveFile::status(). | 
| 
 | 
| Set name of file to be used for saving. 
 Definition at line 258 of file resourcefile.cpp. | 
| 
 | 
| Return name of file used for loading and saving the address book. 
 Definition at line 270 of file resourcefile.cpp. Referenced by ResourceFile(). | 
| 
 | 
| Sets a new format by name. 
 Definition at line 275 of file resourcefile.cpp. References KABC::FormatFactory::format(). | 
| 
 | 
| Returns the format name. 
 Definition at line 284 of file resourcefile.cpp. | 
| 
 | 
| Remove a addressee from its source. This method is mainly called by KABC::AddressBook. Definition at line 303 of file resourcefile.cpp. References locateLocal(), QFile::remove(), and KABC::Addressee::uid(). | 
The documentation for this class was generated from the following files:

