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

#include <FileExtensionProvider.h>

Public Member Functions

 CFileExtensionProvider (ADDON::CAddonMgr &addonManager)
 
 ~CFileExtensionProvider ()
 
std::string GetPictureExtensions () const
 Returns a list of picture extensions.
 
std::string GetMusicExtensions () const
 Returns a list of music extensions.
 
std::string GetVideoExtensions () const
 Returns a list of video extensions.
 
std::string GetSubtitleExtensions () const
 Returns a list of subtitle extensions.
 
std::string GetDiscStubExtensions () const
 Returns a list of disc stub extensions.
 
std::string GetArchiveExtensions () const
 Returns a list of archive extensions with a single dot (eg. .zip)
 
std::string GetCompoundArchiveExtensions () const
 Returns a list of archive extensions with a multiple dots (eg. .tar.gz)
 
std::string GetFileFolderExtensions () const
 Returns a file folder extensions.
 
bool EncodedHostName (const std::string &protocol) const
 Returns whether a url protocol from add-ons use encoded hostnames.
 
void RegisterGameExtensions (const std::set< std::string > &extensions)
 Register game extensions.
 
void UnregisterGameExtensions (const std::set< std::string > &extensions)
 Unregister game extensions.
 
std::string GetGameExtensions () const
 Returns a pipe-separated list of game extensions.
 

Static Public Member Functions

static bool CanOperateExtension (const std::string &path)
 Returns true if related provider can operate related file.
 

Constructor & Destructor Documentation

◆ CFileExtensionProvider()

CFileExtensionProvider::CFileExtensionProvider ( ADDON::CAddonMgr addonManager)

◆ ~CFileExtensionProvider()

CFileExtensionProvider::~CFileExtensionProvider ( )

Member Function Documentation

◆ CanOperateExtension()

bool CFileExtensionProvider::CanOperateExtension ( const std::string &  path)
static

Returns true if related provider can operate related file.

Note
Thought for cases e.g. by ISO, where can be a video or also a SACD.
Todo:
Improve this function to support all cases and not only audio decoder.

We expect that other addons can support the file, and return true if list empty.

Todo:
Check addons can also be types in conflict with Kodi's supported parts!
Warning
This part is really big ugly at the moment and as soon as possible add about other addons where works with extensions!!! Due to GetFileFolderExtensions() call from outside place before here, becomes it usable in this way, as there limited to AudioDecoder and VFS addons.

Check all found addons about support of asked file.

If no file extensions present, mark it as not supported.

◆ EncodedHostName()

bool CFileExtensionProvider::EncodedHostName ( const std::string &  protocol) const

Returns whether a url protocol from add-ons use encoded hostnames.

◆ GetArchiveExtensions()

std::string CFileExtensionProvider::GetArchiveExtensions ( ) const

Returns a list of archive extensions with a single dot (eg. .zip)

◆ GetCompoundArchiveExtensions()

std::string CFileExtensionProvider::GetCompoundArchiveExtensions ( ) const

Returns a list of archive extensions with a multiple dots (eg. .tar.gz)

◆ GetDiscStubExtensions()

std::string CFileExtensionProvider::GetDiscStubExtensions ( ) const

Returns a list of disc stub extensions.

◆ GetFileFolderExtensions()

std::string CFileExtensionProvider::GetFileFolderExtensions ( ) const

Returns a file folder extensions.

◆ GetGameExtensions()

std::string CFileExtensionProvider::GetGameExtensions ( ) const

Returns a pipe-separated list of game extensions.

◆ GetMusicExtensions()

std::string CFileExtensionProvider::GetMusicExtensions ( ) const

Returns a list of music extensions.

◆ GetPictureExtensions()

std::string CFileExtensionProvider::GetPictureExtensions ( ) const

Returns a list of picture extensions.

◆ GetSubtitleExtensions()

std::string CFileExtensionProvider::GetSubtitleExtensions ( ) const

Returns a list of subtitle extensions.

◆ GetVideoExtensions()

std::string CFileExtensionProvider::GetVideoExtensions ( ) const

Returns a list of video extensions.

◆ RegisterGameExtensions()

void CFileExtensionProvider::RegisterGameExtensions ( const std::set< std::string > &  extensions)

Register game extensions.

◆ UnregisterGameExtensions()

void CFileExtensionProvider::UnregisterGameExtensions ( const std::set< std::string > &  extensions)

Unregister game extensions.


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