KIO::MetaInfoJob

#include <metainfojob.h>

Inheritance diagram for KIO::MetaInfoJob:

Signals

void failed (const KFileItem &item)
 
void gotMetaInfo (const KFileItem &item)
 
- Signals inherited from KIO::Job
void canceled (KJob *job)
 
void connected (KIO::Job *job)
 

Public Member Functions

 MetaInfoJob (const KFileItemList &items, KFileMetaInfo::WhatFlags w=KFileMetaInfo::Everything, int iocost=3, int cpucost=6, const QStringList &requiredfields=QStringList(), const QStringList &requestedfields=QStringList())
 
void removeItem (const KFileItem &item)
 
- Public Member Functions inherited from KIO::Job
void addMetaData (const QString &key, const QString &value)
 
void addMetaData (const QMap< QString, QString > &values)
 
QStringList detailedErrorStrings (const QUrl *reqUrl=nullptr, int method=-1) const
 
QString errorString () const override
 
void mergeMetaData (const QMap< QString, QString > &values)
 
MetaData metaData () const
 
MetaData outgoingMetaData () const
 
JobparentJob () const
 
QString queryMetaData (const QString &key)
 
void setMetaData (const KIO::MetaData &metaData)
 
void setParentJob (Job *parentJob)
 
void setUiDelegateExtension (JobUiDelegateExtension *extension)
 
KJobUiDelegateui () const
 
JobUiDelegateExtensionuiDelegateExtension () const
 

Protected Slots

void slotResult (KJob *job) override
 

Protected Member Functions

void getMetaInfo ()
 
- Protected Member Functions inherited from KIO::Job
bool addSubjob (KJob *job) override
 
bool doKill () override
 
bool doResume () override
 
bool doSuspend () override
 
bool removeSubjob (KJob *job) override
 

Detailed Description

MetaInfoJob is a KIO Job to retrieve meta information from files.

KIO Job to retrieve meta information from files.

Deprecated:
use Nepomuk or Strigi Note: this job doesn't even work as before, KFileItem::setMetaInfo doesn't exist anymore.

Definition at line 40 of file metainfojob.h.

Constructor & Destructor Documentation

MetaInfoJob::MetaInfoJob ( const KFileItemList items,
KFileMetaInfo::WhatFlags  w = KFileMetaInfo::Everything,
int  iocost = 3,
int  cpucost = 6,
const QStringList requiredfields = QStringList(),
const QStringList requestedfields = QStringList() 
)
explicit

Creates a new MetaInfoJob.

Parameters
itemsA list of KFileItems to get the metainfo for
wFlags which serve as a preset which can be customized with other parameters.
iocostThe allowed cost in terms of io to retrieve the metainfo. The approximate maximum number of bytes to be read is 10^iocost. Negative values mean that there is no limit on the cost. 0 means that no fields other than the required fields will be retrieved. The default value of 3 means about 1024 bytes per file may be read. This is merely a suggestion and not a hard limit.
cpucostThe allowed cost in terms of cpu to determine the information in the fields. The number mean the amount of instructions allowed is 10^cpucost and is a suggestion only. The default value of 6 means that about a million instructions (10^6) are allowed. This is useful for expensive fields like md5 or thumbnails.
requiredfieldsThe names of fields or groups of fields that should be retrieved regardless of cost.
requestedfieldsThe names of fields or groups of fields that should be retrieved first.

Definition at line 42 of file metainfojob.cpp.

Member Function Documentation

void KIO::MetaInfoJob::failed ( const KFileItem item)
signal

Emitted when metainfo for item could not be extracted, either because a plugin for its MIME type does not exist, or because something went wrong.

Parameters
itemthe KFileItem of the file that failed
void KIO::MetaInfoJob::gotMetaInfo ( const KFileItem item)
signal

Emitted when the meta info for item has been successfully retrieved.

Parameters
itemthe KFileItem describing the fetched item
void MetaInfoJob::removeItem ( const KFileItem item)

Removes an item from metainfo extraction.

Parameters
itemthe item that should be removed from the queue

Definition at line 75 of file metainfojob.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Jul 14 2020 22:58:43 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.