Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CMime Class Reference

#include <Mime.h>

Public Types

enum  EFileType {
  FileTypeUnknown = 0 , FileTypeHtml , FileTypeXml , FileTypePlainText ,
  FileTypeZip , FileTypeGZip , FileTypeRar , FileTypeBmp ,
  FileTypeGif , FileTypePng , FileTypeJpeg
}
 

Static Public Member Functions

static std::string GetMimeType (const std::string &extension)
 
static std::string GetMimeType (const CFileItem &item)
 
static std::string GetMimeType (const CURL &url, bool lookup=true)
 
static EFileType GetFileTypeFromMime (const std::string &mimeType)
 
static EFileType GetFileTypeFromContent (const std::string &fileContent)
 

Member Enumeration Documentation

◆ EFileType

Enumerator
FileTypeUnknown 
FileTypeHtml 
FileTypeXml 
FileTypePlainText 
FileTypeZip 
FileTypeGZip 
FileTypeRar 
FileTypeBmp 
FileTypeGif 
FileTypePng 
FileTypeJpeg 

Member Function Documentation

◆ GetFileTypeFromContent()

CMime::EFileType CMime::GetFileTypeFromContent ( const std::string & fileContent)
static
Todo
add detection for text types
Todo
add detection for other types if required

◆ GetFileTypeFromMime()

CMime::EFileType CMime::GetFileTypeFromMime ( const std::string & mimeType)
static

◆ GetMimeType() [1/3]

std::string CMime::GetMimeType ( const CFileItem & item)
static

◆ GetMimeType() [2/3]

std::string CMime::GetMimeType ( const CURL & url,
bool lookup = true )
static

◆ GetMimeType() [3/3]

std::string CMime::GetMimeType ( const std::string & extension)
static

The documentation for this class was generated from the following files: