Is basically a Qt-QDataStream saved data of a KLFLibEntryList (ie. a QList<KLFLibEntry>), with some meta data.
The meta data is given in a QVariantMap, see below. The data is stored as a KLFLibEntryList. The application/x-klf-libentries
data is exactly what QDataStream will produce when sent in, in this order, a QString("KLF_LIBENTRIES")
, the properties meta data, and the library entries. The QDataStream must have its version set to "QDataStream::Qt_4_4" .
Fundamental example code:
KLFLibEntryList entries = ...; QVariantMap metaData = ...; QByteArray data; QDataStream stream(&data, QIODevice::WriteOnly); stream.setVersion(QDataStream::Qt_4_4); stream << QString("KLF_LIBENTRIES") << metaData << entries; // now data contains the exact data for the application/x-klf-libentries mimetype.
The property map is meant for including arbitrary parameters to the list (eg. originating URL, etc.). These are stored in a QVariantMap, ie a QMap<QString,QVariant>. Standard known properties are, as of now:
"Url"
(type QUrl) : originating URLThis format is internal only. Do not attempt to paste or drop this format in other places.
application/x-klf-libentries
: application/x-klf-internal-lib-move-entries
contains only the IDs of the entries (for reference for deletion for example) and the url of the open resource for identification. stream << QVariantMap(property-map) << QList<KLFLib::entryId>(entry-id-list);
property-map
contains properties relative to the mime data, such as the originating URL (in property "Url"
of type QUrl)