• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • Kopete
  • XmlContactStorage
Public Member Functions | Protected Member Functions | List of all members
Kopete::XmlContactStorage Class Reference

#include <xmlcontactstorage.h>

Inheritance diagram for Kopete::XmlContactStorage:
Inheritance graph
[legend]

Public Member Functions

 XmlContactStorage ()
 
 XmlContactStorage (const QString &fileName)
 
 ~XmlContactStorage ()
 
virtual QString errorMessage () const
 
virtual bool isBusy () const
 
virtual bool isValid () const
 
virtual void load ()
 
virtual void save ()
 
- Public Member Functions inherited from Kopete::ContactListStorage
 ContactListStorage ()
 
virtual ~ContactListStorage ()
 
MetaContact::List contacts () const
 
Group::List groups () const
 

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)
 
uint readVersion (QDomElement &rootElement) const
 
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
 
bool updateFrom10to11 (QDomElement &rootElement) const
 
bool updateFrom11to12 (QDomElement &rootElement) const
 
- Protected Member Functions inherited from Kopete::ContactListStorage
void addGroup (Kopete::Group *group)
 
void addMetaContact (Kopete::MetaContact *metaContact)
 
Kopete::Group * findGroup (const QString &displayName, int type=Kopete::Group::Normal)
 
Kopete::Group * group (unsigned int groupId) const
 

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.

Author
Matt Rogers mattr.nosp@m.@kde.nosp@m..org
Michaƫl Larouche larou.nosp@m.che@.nosp@m.kde.o.nosp@m.rg

Definition at line 39 of file xmlcontactstorage.h.

Constructor & Destructor Documentation

Kopete::XmlContactStorage::XmlContactStorage ( )

Definition at line 80 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
fileNameXML filename to load.

Definition at line 85 of file xmlcontactstorage.cpp.

Kopete::XmlContactStorage::~XmlContactStorage ( )

Definition at line 91 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 101 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 106 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 96 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 111 of file xmlcontactstorage.cpp.

bool Kopete::XmlContactStorage::parseContactListElement ( Kopete::ContactListElement *  contactListElement,
const QDomElement &  element 
)
protected

Definition at line 589 of file xmlcontactstorage.cpp.

bool Kopete::XmlContactStorage::parseGroup ( Kopete::Group *  group,
const QDomElement &  element 
)
protected

Definition at line 498 of file xmlcontactstorage.cpp.

bool Kopete::XmlContactStorage::parseMetaContact ( Kopete::MetaContact *  metaContact,
const QDomElement &  element 
)
protected

Definition at line 292 of file xmlcontactstorage.cpp.

uint Kopete::XmlContactStorage::readVersion ( QDomElement &  rootElement) const
protected

Definition at line 993 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 225 of file xmlcontactstorage.cpp.

const QList< QDomElement > Kopete::XmlContactStorage::storeContactListElement ( Kopete::ContactListElement *  contactListElement) const
protected

Definition at line 790 of file xmlcontactstorage.cpp.

const QDomElement Kopete::XmlContactStorage::storeGroup ( Kopete::Group *  group) const
protected

Definition at line 749 of file xmlcontactstorage.cpp.

const QDomElement Kopete::XmlContactStorage::storeMetaContact ( Kopete::MetaContact *  metaContact,
bool  minimal = false 
) const
protected

Definition at line 666 of file xmlcontactstorage.cpp.

bool Kopete::XmlContactStorage::updateFrom10to11 ( QDomElement &  rootElement) const
protected

Definition at line 891 of file xmlcontactstorage.cpp.

bool Kopete::XmlContactStorage::updateFrom11to12 ( QDomElement &  rootElement) const
protected

Definition at line 914 of file xmlcontactstorage.cpp.


The documentation for this class was generated from the following files:
  • xmlcontactstorage.h
  • xmlcontactstorage.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal