• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.11.3 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 
61  static void apply( Item& item, const Item &other );
62 
66  static QSet<QByteArray> parts( const Item &item );
67 
73  static QSet<QByteArray> availableParts( const Item &item );
74 
83  static Item convert( const Item & item, int metaTypeId );
84 };
85 
90 class DefaultItemSerializerPlugin : public QObject, public ItemSerializerPlugin
91 {
92  Q_OBJECT
93  Q_INTERFACES( Akonadi::ItemSerializerPlugin )
94  public:
95  DefaultItemSerializerPlugin();
96 
97  bool deserialize( Item&, const QByteArray&, QIODevice&, int );
98  void serialize( const Item&, const QByteArray&, QIODevice&, int& );
99 };
100 
105 class StdStringItemSerializerPlugin : public QObject, public ItemSerializerPlugin
106 {
107  Q_OBJECT
108  Q_INTERFACES( Akonadi::ItemSerializerPlugin )
109 public:
110  StdStringItemSerializerPlugin();
111 
112  bool deserialize( Item&, const QByteArray&, QIODevice&, int );
113  void serialize( const Item&, const QByteArray&, QIODevice&, int& );
114 };
115 
116 }
117 
118 #endif
Akonadi::ItemSerializer
Definition: itemserializer_p.h:43
Akonadi::StdStringItemSerializerPlugin
Definition: itemserializer_p.h:105
Akonadi::StdStringItemSerializerPlugin::deserialize
bool deserialize(Item &, const QByteArray &, QIODevice &, int)
Converts serialized item data provided in data into payload for item.
Definition: itemserializer.cpp:59
Akonadi::DefaultItemSerializerPlugin::deserialize
bool deserialize(Item &, const QByteArray &, QIODevice &, int)
Converts serialized item data provided in data into payload for item.
Definition: itemserializer.cpp:43
Akonadi::DefaultItemSerializerPlugin::serialize
void serialize(const Item &, const QByteArray &, QIODevice &, int &)
Convert the payload object provided in item into its serialzed form into data.
Definition: itemserializer.cpp:52
Akonadi::StdStringItemSerializerPlugin::serialize
void serialize(const Item &, const QByteArray &, QIODevice &, int &)
Convert the payload object provided in item into its serialzed form into data.
Definition: itemserializer.cpp:72
Akonadi::DefaultItemSerializerPlugin
Definition: itemserializer_p.h:90
Akonadi::ItemSerializerPlugin
The base class for item type serializer plugins.
Definition: itemserializerplugin.h:120
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:18 by doxygen 1.8.5 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.11.3 API Reference

Skip menu "kdepimlibs-4.11.3 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