akonadi
itemserializer.cpp
44 bool DefaultItemSerializerPlugin::deserialize(Item &item, const QByteArray &label, QIODevice &data, int)
54 void DefaultItemSerializerPlugin::serialize(const Item &item, const QByteArray &label, QIODevice &data, int &)
61 bool StdStringItemSerializerPlugin::deserialize(Item &item, const QByteArray &label, QIODevice &data, int)
75 void StdStringItemSerializerPlugin::serialize(const Item &item, const QByteArray &label, QIODevice &data, int &)
84 void ItemSerializer::deserialize(Item &item, const QByteArray &label, const QByteArray &data, int version, bool external)
106 void ItemSerializer::deserialize(Item &item, const QByteArray &label, QIODevice &data, int version)
108 if (!TypePluginLoader::defaultPluginForMimeType(item.mimeType())->deserialize(item, label, data, version)) {
116 void ItemSerializer::serialize(const Item &item, const QByteArray &label, QByteArray &data, int &version)
127 void ItemSerializer::serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version)
132 ItemSerializerPlugin *plugin = TypePluginLoader::pluginForMimeTypeAndClass(item.mimeType(), item.availablePayloadMetaTypeIds());
142 ItemSerializerPlugin *plugin = TypePluginLoader::pluginForMimeTypeAndClass(item.mimeType(), item.availablePayloadMetaTypeIds());
169 return TypePluginLoader::pluginForMimeTypeAndClass(item.mimeType(), item.availablePayloadMetaTypeIds())->parts(item);
177 ItemSerializerPlugin *plugin = TypePluginLoader::pluginForMimeTypeAndClass(item.mimeType(), item.availablePayloadMetaTypeIds());
193 // kDebug() << "asked to convert a" << item.mimeType() << "item to format" << ( mtid ? QMetaType::typeName( mtid ) : "<legacy>" );
199 if (ItemSerializerPlugin *const plugin = TypePluginLoader::pluginForMimeTypeAndClass(item.mimeType(), QVector<int>(1, mtid), TypePluginLoader::NoDefault)) {
virtual qint64 size() const
virtual bool seek(qint64 pos)
virtual QSet< QByteArray > availableParts(const Item &item) const
Returns the parts available in the item item.
Definition: itemserializerplugin.cpp:52
QString errorString() const
void setData(const QByteArray &data)
QByteArray fromRawData(const char *data, int size)
QString fromUtf8(const char *str, int size)
QByteArray readAll()
virtual bool open(QFlags< QIODevice::OpenModeFlag > flags)
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
virtual void close()
virtual void apply(Item &item, const Item &other)
Merges the payload parts in other into item.
Definition: itemserializerplugin.cpp:61
virtual void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version)=0
Convert the payload object provided in item into its serialzed form into data.
The extended base class for item type serializer plugins.
Definition: itemserializerplugin.h:193
virtual void close()
void setBuffer(QByteArray *byteArray)
char * data()
qint64 write(const char *data, qint64 maxSize)
The base class for item type serializer plugins.
Definition: itemserializerplugin.h:119
int size() const
virtual bool seek(qint64 pos)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.