kopete/libkopete
Kopete::XmlContactStorage Class Reference
#include <xmlcontactstorage.h>

Detailed Description
XML storage for contact list elements.This contact list storage is provided for backwards compatibility with the "old" contact list which was saved as a XML document.
Definition at line 39 of file xmlcontactstorage.h.
Public Member Functions | |
| virtual QString | errorMessage () const |
| virtual bool | isBusy () const |
| virtual bool | isValid () const |
| virtual void | load () |
| virtual void | save () |
| XmlContactStorage (const QString &fileName) | |
| XmlContactStorage () | |
| ~XmlContactStorage () | |
Protected Member Functions | |
| bool | parseContactListElement (Kopete::ContactListElement *contactListElement, const QDomElement &element) |
| bool | parseGroup (Kopete::Group *group, const QDomElement &element) |
| bool | parseMetaContact (Kopete::MetaContact *metaContact, const QDomElement &element) |
| const QList< QDomElement > | storeContactListElement (Kopete::ContactListElement *contactListElement) const |
| const QDomElement | storeGroup (Kopete::Group *group) const |
| const QDomElement | storeMetaContact (Kopete::MetaContact *metaContact, bool minimal=false) const |
Constructor & Destructor Documentation
| Kopete::XmlContactStorage::XmlContactStorage | ( | ) |
Definition at line 78 of file xmlcontactstorage.cpp.
| Kopete::XmlContactStorage::XmlContactStorage | ( | const QString & | fileName | ) | [explicit] |
Create a new XML storage using the given filename.
This contructor mostly used for unittests.
- Parameters:
-
fileName XML filename to load.
Definition at line 83 of file xmlcontactstorage.cpp.
| Kopete::XmlContactStorage::~XmlContactStorage | ( | ) |
Definition at line 89 of file xmlcontactstorage.cpp.
Member Function Documentation
| QString Kopete::XmlContactStorage::errorMessage | ( | ) | const [virtual] |
Get a nice error message.
Use this method to find out why an operation of the ContactListStorage failed. The resulting error message is already translated.
Derived ContactListStorage must implement this method.
- Returns:
- Translated error message
Implements Kopete::ContactListStorage.
Definition at line 99 of file xmlcontactstorage.cpp.
| bool Kopete::XmlContactStorage::isBusy | ( | ) | const [virtual] |
Check if the current ContactListStorage is busy.
Derived ContactListStorage must implement this method.
- Returns:
- true if this ContactListStorage is busy.
Implements Kopete::ContactListStorage.
Definition at line 104 of file xmlcontactstorage.cpp.
| bool Kopete::XmlContactStorage::isValid | ( | ) | const [virtual] |
Check if the current ContactListStorage.
Call this method to verify if the loading of the storage went without problems.
Kopete::ContactListStorage *storage = new Kopete::XmlContactStorage; storage->load(); if( !storage->isValid() ) { kDebug() << "Contact list storage failed. Reason: " << storage->errorMessage(); }
Derived ContactListStorage must implement this method.
- Returns:
- true if this ContactListStorage is valid.
Implements Kopete::ContactListStorage.
Definition at line 94 of file xmlcontactstorage.cpp.
| void Kopete::XmlContactStorage::load | ( | ) | [virtual] |
Load the contact list.
Derived ContactListStorage must implement this method.
Implements Kopete::ContactListStorage.
Definition at line 109 of file xmlcontactstorage.cpp.
| bool Kopete::XmlContactStorage::parseContactListElement | ( | Kopete::ContactListElement * | contactListElement, | |
| const QDomElement & | element | |||
| ) | [protected] |
Definition at line 576 of file xmlcontactstorage.cpp.
| bool Kopete::XmlContactStorage::parseGroup | ( | Kopete::Group * | group, | |
| const QDomElement & | element | |||
| ) | [protected] |
Definition at line 492 of file xmlcontactstorage.cpp.
| bool Kopete::XmlContactStorage::parseMetaContact | ( | Kopete::MetaContact * | metaContact, | |
| const QDomElement & | element | |||
| ) | [protected] |
Definition at line 281 of file xmlcontactstorage.cpp.
| void Kopete::XmlContactStorage::save | ( | ) | [virtual] |
Save the contact list.
Derived ContactListStorage must implement this method.
Implements Kopete::ContactListStorage.
Definition at line 216 of file xmlcontactstorage.cpp.
| const QList< QDomElement > Kopete::XmlContactStorage::storeContactListElement | ( | Kopete::ContactListElement * | contactListElement | ) | const [protected] |
Definition at line 758 of file xmlcontactstorage.cpp.
| const QDomElement Kopete::XmlContactStorage::storeGroup | ( | Kopete::Group * | group | ) | const [protected] |
Definition at line 721 of file xmlcontactstorage.cpp.
| const QDomElement Kopete::XmlContactStorage::storeMetaContact | ( | Kopete::MetaContact * | metaContact, | |
| bool | minimal = false | |||
| ) | const [protected] |
Definition at line 639 of file xmlcontactstorage.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference