File indexing completed on 2024-12-29 04:51:00

0001 /*
0002    SPDX-FileCopyrightText: 2017-2021 Volker Krause <vkrause@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <KItinerary/ExtractorDocumentProcessor>
0010 
0011 #include <QString>
0012 
0013 namespace KItinerary {
0014 
0015 /** Dummy node to delegate to an external extractor process. */
0016 class ExternalProcessor : public ExtractorDocumentProcessor
0017 {
0018 public:
0019     ExternalProcessor();
0020     ~ExternalProcessor();
0021 
0022     bool canHandleData(const QByteArray &encodedData, QStringView fileName) const override;
0023     ExtractorDocumentNode createNodeFromData(const QByteArray &encodedData) const override;
0024     void preExtract(ExtractorDocumentNode &node, const ExtractorEngine *engine) const override;
0025 
0026 private:
0027     QString m_externalExtractor;
0028 };
0029 
0030 }
0031