Torc  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
torcmime.h
Go to the documentation of this file.
1 #ifndef TORCMIME_H
2 #define TORCMIME_H
3 
4 // Qt
5 #include <QIODevice>
6 #include <QString>
7 #include <QUrl>
8 
9 class TorcMime
10 {
11  public:
12  static QString MimeTypeForData (const QByteArray &Data);
13  static QString MimeTypeForData (QIODevice *Device);
14  static QString MimeTypeForFileNameAndData (const QString &FileName, QIODevice *Device);
15  static QString MimeTypeForFileNameAndData (const QString &FileName, const QByteArray &Data);
16  static QString MimeTypeForName (const QString &Name);
17  static QString MimeTypeForUrl (const QUrl &Url);
18  static QStringList MimeTypeForFileName (const QString &FileName);
19  static QStringList ExtensionsForType (const QString &Type);
20 };
21 
22 #endif // TORCMIME_H
static QStringList MimeTypeForFileName(const QString &FileName)
Return a list of possible MIME types for the file named Name.
Definition: torcmime.cpp:85
static QString MimeTypeForFileNameAndData(const QString &FileName, QIODevice *Device)
Return a MIME type for the media described by FileName and Device.
Definition: torcmime.cpp:55
static QString MimeTypeForData(const QByteArray &Data)
Return a MIME type for the media described by Data.
Definition: torcmime.cpp:41
static QString MimeTypeForUrl(const QUrl &Url)
Return a MIME type for the media pointed to by Url.
Definition: torcmime.cpp:79
static QStringList ExtensionsForType(const QString &Type)
Returns a list of known file extensions for a given top level MIME type.
Definition: torcmime.cpp:101
A wrapper around QMimeDatabase().
Definition: torcmime.h:9
static QString MimeTypeForName(const QString &Name)
Return a MIME type for the file named Name.
Definition: torcmime.cpp:73