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

akonadi

  • sources
  • kde-4.12
  • kdepimlibs
  • 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 
94  static void overridePluginLookup( QObject *plugin );
95 };
96 
101 class DefaultItemSerializerPlugin : public QObject, public ItemSerializerPlugin
102 {
103  Q_OBJECT
104  Q_INTERFACES( Akonadi::ItemSerializerPlugin )
105  public:
106  DefaultItemSerializerPlugin();
107 
108  bool deserialize( Item&, const QByteArray&, QIODevice&, int );
109  void serialize( const Item&, const QByteArray&, QIODevice&, int& );
110 };
111 
116 class StdStringItemSerializerPlugin : public QObject, public ItemSerializerPlugin
117 {
118  Q_OBJECT
119  Q_INTERFACES( Akonadi::ItemSerializerPlugin )
120 public:
121  StdStringItemSerializerPlugin();
122 
123  bool deserialize( Item&, const QByteArray&, QIODevice&, int );
124  void serialize( const Item&, const QByteArray&, QIODevice&, int& );
125 };
126 
127 }
128 
129 #endif
Akonadi::ItemSerializer
Definition: itemserializer_p.h:43
Akonadi::StdStringItemSerializerPlugin
Definition: itemserializer_p.h:116
Akonadi::StdStringItemSerializerPlugin::deserialize
bool deserialize(Item &, const QByteArray &, QIODevice &, int)
Converts serialized item data provided in data into payload for item.
Definition: itemserializer.cpp:62
Akonadi::DefaultItemSerializerPlugin::deserialize
bool deserialize(Item &, const QByteArray &, QIODevice &, int)
Converts serialized item data provided in data into payload for item.
Definition: itemserializer.cpp:46
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:55
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:75
Akonadi::DefaultItemSerializerPlugin
Definition: itemserializer_p.h:101
Akonadi::ItemSerializerPlugin
The base class for item type serializer plugins.
Definition: itemserializerplugin.h:119
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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