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

◆ createNode() [1/2]

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

Create a new document node from data.

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

Definition at line 157 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 226 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 243 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 249 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 Thu Feb 15 2024 03:56:49 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.