KItinerary::ExtractorDocumentNodeFactory

Search for usage in LXR

KItinerary::ExtractorDocumentNodeFactory Class Reference

#include <extractordocumentnodefactory.h>

Public Member Functions

ExtractorDocumentNode createNode (const QByteArray &data, QStringView fileName={}, QStringView mimeType={}) const
 
ExtractorDocumentNode createNode (const QVariant &decodedData, QStringView mimeType) const
 
void registerProcessor (std::unique_ptr< ExtractorDocumentProcessor > &&processor, QStringView canonicalMimeType, std::initializer_list< QStringView > aliasMimeTypes={})
 
void setUseSeparateProcess (bool separateProcess)
 

Detailed Description

Instantiates KItinerary::ExtractorDocumentNode instances using the type-specific document processor.

Definition at line 26 of file extractordocumentnodefactory.h.

Constructor & Destructor Documentation

◆ ExtractorDocumentNodeFactory()

ExtractorDocumentNodeFactory::ExtractorDocumentNodeFactory ( )
explicit

Definition at line 150 of file extractordocumentnodefactory.cpp.

Member Function Documentation

◆ createNode() [1/2]

ExtractorDocumentNode ExtractorDocumentNodeFactory::createNode ( const QByteArray & data,
QStringView fileName = {},
QStringView mimeType = {} ) const

Create a new document node from data.

Parameters
fileNameOptional hint for MIME-type auto-detection.
mimeTypeMIME type of data if known, auto-detected otherwise.

Definition at line 159 of file extractordocumentnodefactory.cpp.

◆ createNode() [2/2]

ExtractorDocumentNode ExtractorDocumentNodeFactory::createNode ( const QVariant & decodedData,
QStringView mimeType ) const

Create a node for an already decoded content object.

Definition at line 231 of file extractordocumentnodefactory.cpp.

◆ registerProcessor()

void ExtractorDocumentNodeFactory::registerProcessor ( std::unique_ptr< ExtractorDocumentProcessor > && processor,
QStringView canonicalMimeType,
std::initializer_list< QStringView > aliasMimeTypes = {} )

Register a new document processor.

Definition at line 248 of file extractordocumentnodefactory.cpp.

◆ setUseSeparateProcess()

void ExtractorDocumentNodeFactory::setUseSeparateProcess ( bool separateProcess)

Perform extraction of "risky" content such as PDF files in a separate process.

This is safer as it isolates the using application from crashes/hangs due to corrupt files. It is however slower, and not available on all platforms. This is off by default.

Definition at line 254 of file extractordocumentnodefactory.cpp.


The documentation for this class was generated from the following files:
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

KDE's Doxygen guidelines are available online.