KItinerary
icaldocumentprocessor.cpp
32bool IcalCalendarProcessor::canHandleData(const QByteArray &encodedData, QStringView fileName) const
39ExtractorDocumentNode IcalCalendarProcessor::createNodeFromData(const QByteArray &encodedData) const
41 KCalendarCore::Calendar::Ptr calendar(new KCalendarCore::MemoryCalendar(QTimeZone::systemTimeZone()));
54void IcalCalendarProcessor::expandNode(ExtractorDocumentNode &node, const ExtractorEngine *engine) const
58 auto child = engine->documentNodeFactory()->createNode(QVariant::fromValue(event), u"internal/event");
64bool IcalEventProcessor::matches(const ExtractorFilter &filter, const ExtractorDocumentNode &node) const
70void IcalEventProcessor::expandNode(ExtractorDocumentNode &node, const ExtractorEngine *engine) const
75 auto child = engine->documentNodeFactory()->createNode(QByteArray::fromBase64(appleStructuredData.toLatin1()));
80void IcalEventProcessor::preExtract(ExtractorDocumentNode &node, [[maybe_unused]] const ExtractorEngine *engine) const
117void IcalEventProcessor::postExtract(ExtractorDocumentNode &node, const ExtractorEngine* engine) const
119 if ((engine->hints() & ExtractorEngine::ExtractGenericIcalEvents) || node.result().size() != 1 || !node.usedExtractor().isEmpty()) {
129QJSValue IcalEventProcessor::contentToScriptValue(const ExtractorDocumentNode &node, QJSEngine *engine) const
QString loadedProductId()
bool fromRawString(const Calendar::Ptr &calendar, const QByteArray &string) override
ExtractorDocumentNode createNode(const QByteArray &data, QStringView fileName={}, QStringView mimeType={}) const
Create a new document node from data.
Definition extractordocumentnodefactory.cpp:159
A node in the extracted document object tree.
Definition extractordocumentnode.h:50
void setResult(ExtractorResult &&result)
Replace the existing results by result.
Definition extractordocumentnode.cpp:160
void appendChild(ExtractorDocumentNode &child)
Add another child node.
Definition extractordocumentnode.cpp:141
void addResult(ExtractorResult &&result)
Add additional results from an extraction step.
Definition extractordocumentnode.cpp:155
QString usedExtractor() const
Extractor used for the result of this node, if any.
Definition extractordocumentnode.cpp:236
void setContent(const QVariant &content)
Set decoded content.
Definition extractordocumentnode.cpp:120
@ ExtractGenericIcalEvents
generate Event objects for generic ical events.
Definition engine/extractorengine.h:165
const ExtractorDocumentNodeFactory * documentNodeFactory() const
Factory for creating new document nodes.
Definition engine/extractorengine.cpp:172
Determines whether an extractor is applicable to a given email.
Definition extractorfilter.h:24
ExtractorDocumentNode createNodeFromData(const QByteArray &encodedData) const override
Create a document node from raw data.
Definition icaldocumentprocessor.cpp:39
bool canHandleData(const QByteArray &encodedData, QStringView fileName) const override
Fast check whether the given encoded data can possibly be processed by this instance.
Definition icaldocumentprocessor.cpp:32
void expandNode(ExtractorDocumentNode &node, const ExtractorEngine *engine) const override
Create child nodes for node, as far as that's necessary for this document type.
Definition icaldocumentprocessor.cpp:54
void expandNode(ExtractorDocumentNode &node, const ExtractorEngine *engine) const override
Create child nodes for node, as far as that's necessary for this document type.
Definition icaldocumentprocessor.cpp:70
bool matches(const ExtractorFilter &filter, const ExtractorDocumentNode &node) const override
Checks whether the given filter matches node.
Definition icaldocumentprocessor.cpp:64
void preExtract(ExtractorDocumentNode &node, const ExtractorEngine *engine) const override
Called before extractors are applied to node.
Definition icaldocumentprocessor.cpp:80
void postExtract(ExtractorDocumentNode &node, const ExtractorEngine *engine) const override
Called after extractors have been applied to node.
Definition icaldocumentprocessor.cpp:117
QJSValue contentToScriptValue(const ExtractorDocumentNode &node, QJSEngine *engine) const override
Create a QJSValue for the node content.
Definition icaldocumentprocessor.cpp:129
bool startsWithIgnoreSpace(const QByteArray &data, const char *pattern)
Same as QByteArray::startsWith, but ignoring leading whitespaces.
Definition stringutil.cpp:195
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
QByteArray fromBase64(const QByteArray &base64, Base64Options options)
QJSValue toScriptValue(const T &value)
QJsonValue at(qsizetype i) const const
bool isEmpty() const const
qsizetype size() const const
QJsonArray array() const const
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
bool isEmpty() const const
bool endsWith(QChar ch) const const
CaseInsensitive
LocalTime
QTimeZone systemTimeZone()
QVariant fromValue(T &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.