KDECore
kmimemagicrule.cpp
Go to the documentation of this file.
45 static bool testMatches(QIODevice* device, qint64 deviceSize, QByteArray& availableData, const QList<KMimeMagicMatch>& matches, const QString& mimeType)
102 bool KMimeMagicRule::match(QIODevice* device, qint64 deviceSize, QByteArray& availableData) const
107 bool KMimeMagicMatch::match(QIODevice* device, qint64 deviceSize, QByteArray& availableData, const QString& mimeType) const
116 // Example: m_data="ABC", m_rangeLength=3 -> we need 3+3-1=5 bytes (ABCxx,xABCx,xxABC would match)
158 // kDebug() << "Matched readData=" << readData << "with m_data=" << m_data << "so this is" << mimeType;
int indexIn(const QByteArray &ba, int from) const
virtual bool seek(qint64 pos)
#define mask
bool isEmpty() const
QByteArray fromRawData(const char *data, int size)
bool match(QIODevice *device, qint64 deviceSize, QByteArray &availableData) const
Definition: kmimemagicrule.cpp:102
void resize(int size)
int indexOf(char ch, int from) const
bool isEmpty() const
const char * constData() const
qint64 read(char *data, qint64 maxSize)
bool match(QIODevice *device, qint64 deviceSize, QByteArray &availableData, const QString &mimeType) const
Definition: kmimemagicrule.cpp:107
static bool testMatches(QIODevice *device, qint64 deviceSize, QByteArray &availableData, const QList< KMimeMagicMatch > &matches, const QString &mimeType)
Definition: kmimemagicrule.cpp:45
iterator end()
char * data()
int size() const
Definition: kmimemagicrule_p.h:31
iterator begin()
static int indexOf(const QByteArray &that, const QByteArray &ba)
Definition: kmimemagicrule.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.