• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
itemserializer_p.h
1 /*
2  Copyright (c) 2007 Till Adam <adam@kde.org>
3  Copyright (c) 2007 Volker Krause <vkrause@kde.org>
4 
5  This library is free software; you can redistribute it and/or modify it
6  under the terms of the GNU Library General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or (at your
8  option) any later version.
9 
10  This library is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13  License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to the
17  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  02110-1301, USA.
19 */
20 
21 #ifndef AKONADI_ITEM_SERIALIZER_P_H
22 #define AKONADI_ITEM_SERIALIZER_P_H
23 
24 #include <QtCore/QByteArray>
25 #include <QtCore/QSet>
26 
27 #include "akonadiprivate_export.h"
28 
29 #include "itemserializerplugin.h"
30 
31 #include <memory>
32 
33 class QIODevice;
34 
35 namespace Akonadi {
36 
37 class Item;
38 
43 class AKONADI_TESTS_EXPORT ItemSerializer
44 {
45  public:
47  static void deserialize( Item& item, const QByteArray& label, const QByteArray& data, int version, bool external );
49  static void deserialize( Item& item, const QByteArray& label, QIODevice& data, int version );
51  static void serialize( const Item& item, const QByteArray& label, QByteArray& data, int &version );
53  static void serialize( const Item& item, const QByteArray& label, QIODevice& data, int &version );
54 
60  static void apply( Item& item, const Item &other );
61 
65  static QSet<QByteArray> parts( const Item &item );
66 
72  static QSet<QByteArray> availableParts( const Item &item );
73 
82  static Item convert( const Item & item, int metaTypeId );
83 };
84 
89 class DefaultItemSerializerPlugin : public QObject, public ItemSerializerPlugin
90 {
91  Q_OBJECT
92  Q_INTERFACES( Akonadi::ItemSerializerPlugin )
93  public:
94  DefaultItemSerializerPlugin();
95 
96  bool deserialize( Item&, const QByteArray&, QIODevice&, int );
97  void serialize( const Item&, const QByteArray&, QIODevice&, int& );
98 };
99 
104 class StdStringItemSerializerPlugin : public QObject, public ItemSerializerPlugin
105 {
106  Q_OBJECT
107  Q_INTERFACES( Akonadi::ItemSerializerPlugin )
108 public:
109  StdStringItemSerializerPlugin();
110 
111  bool deserialize( Item&, const QByteArray&, QIODevice&, int );
112  void serialize( const Item&, const QByteArray&, QIODevice&, int& );
113 };
114 
115 }
116 
117 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:38 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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