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.

Member Function Documentation

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 151 of file extractordocumentnodefactory.cpp.

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

Create a node for an already decoded content object.

Definition at line 220 of file extractordocumentnodefactory.cpp.

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

Register a new document processor.

Definition at line 237 of file extractordocumentnodefactory.cpp.

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 243 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-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:06:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.