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

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
  • contactlist
xmlcontactstorage.h
Go to the documentation of this file.
1 /*
2  Kopete Contact List XML Storage Class
3 
4  Copyright 2006 by Matt Rogers <mattr@kde.org>
5  Copyright 2006 by MichaĆ«l Larouche <larouche@kde.org>
6  Copyright 2006 by Roman Jarosz <kedgedev@centrum.cz>
7 
8  Kopete 2002-2006 by the Kopete developers <kopete-devel@kde.org>
9 
10  *************************************************************************
11  * *
12  * This library is free software; you can redistribute it and/or *
13  * modify it under the terms of the GNU Lesser General Public *
14  * License as published by the Free Software Foundation; either *
15  * version 2 of the License, or (at your option) any later version. *
16  * *
17  *************************************************************************
18 */
19 
20 #ifndef KOPETEXMLCONTACTSTORAGE_H
21 #define KOPETEXMLCONTACTSTORAGE_H
22 
23 #include <kopetecontactliststorage.h>
24 #include <kopete_export.h>
25 class QDomElement;
26 
27 namespace Kopete
28 {
29 
39 class KOPETE_EXPORT XmlContactStorage : public ContactListStorage
40 {
41 public:
42  XmlContactStorage();
49  explicit XmlContactStorage(const QString &fileName);
50  ~XmlContactStorage();
51 
52  virtual bool isValid() const;
53  virtual QString errorMessage() const;
54  virtual bool isBusy() const;
55  virtual void load();
56  virtual void save();
57 
58 protected:
59  bool parseMetaContact( Kopete::MetaContact *metaContact, const QDomElement &element );
60  bool parseGroup( Kopete::Group *group, const QDomElement &element );
61  bool parseContactListElement( Kopete::ContactListElement *contactListElement, const QDomElement &element );
62 
63  const QDomElement storeMetaContact( Kopete::MetaContact *metaContact, bool minimal = false ) const;
64  const QDomElement storeGroup( Kopete::Group *group ) const;
65  const QList<QDomElement> storeContactListElement( Kopete::ContactListElement *contactListElement ) const;
66 
67  bool updateFrom10to11( QDomElement &rootElement ) const;
68  bool updateFrom11to12( QDomElement &rootElement ) const;
69 
70  uint readVersion( QDomElement &rootElement ) const;
71 
72 private:
76  void convertContactList( const QString &fileName, uint fromVersion, uint toVersion );
77 
78  QString sourceToString( Kopete::MetaContact::PropertySource source ) const;
79  Kopete::MetaContact::PropertySource stringToSource( const QString &name ) const;
80 
81  void checkGroupIds();
82 
83  class Private;
84  Private* d;
85 };
86 
87 }
88 
89 #endif
90 
91 //kate: indent-mode cstyle; indent-width 4; indent-spaces on; replace-tabs on;
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::MetaContact::PropertySource
PropertySource
Enumeration of possible sources for a property (which may be photos, see setPhotoSource() for instanc...
Definition: kopetemetacontact.h:75
kopetecontactliststorage.h
Kopete::ContactListElement
Definition: kopetecontactlistelement.h:46
kopete_export.h
QString
QList
Kopete::Group
Class which represents the Group.
Definition: kopetegroup.h:44
Kopete::MetaContact
Definition: kopetemetacontact.h:54
Kopete::XmlContactStorage
XML storage for contact list elements.
Definition: xmlcontactstorage.h:39
Kopete::ContactListStorage
Provide a storage for Kopete Contact List.
Definition: kopetecontactliststorage.h:34
QDomElement
name
const char * name
Definition: kopeteonlinestatus.cpp:104
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 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