Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::ADDONS::CExtsMimeSupportList Class Reference

Class to manage all available and activated add-ons and to release their types to the outside for selection. More...

#include <ExtsMimeSupportList.h>

Inheritance diagram for KODI::ADDONS::CExtsMimeSupportList:
KODI::ADDONS::IAddonSupportList

Classes

struct  SupportValue
 Structure to store information about supported part. More...
 
struct  SupportValues
 Structure to store available data for related addon. More...
 

Public Types

enum class  FilterSelect { all , hasTags , hasTracks }
 Filter selection values. More...
 

Public Member Functions

 CExtsMimeSupportList (ADDON::CAddonMgr &addonMgr)
 
 ~CExtsMimeSupportList ()
 
std::vector< SupportValuesGetSupportedAddonInfos (FilterSelect select)
 Get list of all by audiodecoder supported parts.
 
bool IsExtensionSupported (const std::string &ext)
 To query the desired file extension is supported in it.
 
std::vector< std::pair< ADDON::AddonType, std::shared_ptr< ADDON::CAddonInfo > > > GetExtensionSupportedAddonInfos (const std::string &ext, FilterSelect select)
 To get a list of all compatible audio decoder add-ons for the file extension.
 
bool IsMimetypeSupported (const std::string &mimetype)
 To query the desired file mimetype is supported in it.
 
std::vector< std::pair< ADDON::AddonType, std::shared_ptr< ADDON::CAddonInfo > > > GetMimetypeSupportedAddonInfos (const std::string &mimetype, FilterSelect select)
 To get a list of all compatible audio decoder add-ons for the mimetype.
 
std::vector< KODI::ADDONS::AddonSupportEntryGetSupportedExtsAndMimeTypes (const std::string &addonId) override
 To give all file extensions and MIME types supported by the addon.
 
- Public Member Functions inherited from KODI::ADDONS::IAddonSupportList
 IAddonSupportList ()=default
 
virtual ~IAddonSupportList ()=default
 

Protected Member Functions

void Update (const std::string &id)
 
void OnEvent (const ADDON::AddonEvent &event)
 

Static Protected Member Functions

static SupportValues ScanAddonProperties (ADDON::AddonType type, const std::shared_ptr< ADDON::CAddonInfo > &addonInfo)
 

Protected Attributes

CCriticalSection m_critSection
 
std::vector< SupportValuesm_supportedList
 
ADDON::CAddonMgrm_addonMgr
 

Detailed Description

Class to manage all available and activated add-ons and to release their types to the outside for selection.

Note
It may also make sense in the future to expand this class and design it globally in Kodi so that other addons can also be managed with it (all which have mimetypes and file extensions, e.g. vfs, audioencoder).

Member Enumeration Documentation

◆ FilterSelect

Filter selection values.

Enumerator
all 

To select all available

hasTags 

To select only them where support tags

hasTracks 

Get only where support tracks within

Constructor & Destructor Documentation

◆ CExtsMimeSupportList()

CExtsMimeSupportList::CExtsMimeSupportList ( ADDON::CAddonMgr & addonMgr)

◆ ~CExtsMimeSupportList()

CExtsMimeSupportList::~CExtsMimeSupportList ( )

Member Function Documentation

◆ GetExtensionSupportedAddonInfos()

std::vector< std::pair< AddonType, std::shared_ptr< ADDON::CAddonInfo > > > CExtsMimeSupportList::GetExtensionSupportedAddonInfos ( const std::string & ext,
FilterSelect select )

To get a list of all compatible audio decoder add-ons for the file extension.

Parameters
[in]extExtension name to check
[in]selectTo filter the listed information by type
Returns
List of ADDON::CAddonInfo where support related extension

◆ GetMimetypeSupportedAddonInfos()

std::vector< std::pair< AddonType, std::shared_ptr< CAddonInfo > > > CExtsMimeSupportList::GetMimetypeSupportedAddonInfos ( const std::string & mimetype,
FilterSelect select )

To get a list of all compatible audio decoder add-ons for the mimetype.

Parameters
[in]mimetypeMimetype name to check
[in]selectTo filter the listed information by type
Returns
List of ADDON::CAddonInfo where support related mimetype

◆ GetSupportedAddonInfos()

std::vector< CExtsMimeSupportList::SupportValues > CExtsMimeSupportList::GetSupportedAddonInfos ( FilterSelect select)

Get list of all by audiodecoder supported parts.

Thought to use on planned new window about management about supported extensions and mimetypes in Kodi and to allow edit by user to enable or disable corresponding parts.

This function is also used to notify Kodi supported formats and to allow playback.

Parameters
[in]selectTo filter the listed information by type
Returns
List of the available types listed for the respective add-on

◆ GetSupportedExtsAndMimeTypes()

std::vector< AddonSupportEntry > CExtsMimeSupportList::GetSupportedExtsAndMimeTypes ( const std::string & addonId)
overridevirtual

To give all file extensions and MIME types supported by the addon.

Parameters
[in]addonIdIdentifier about wanted addon
Returns
List of all supported parts on selected addon
See also
KODI::ADDONS::IAddonSupportList

Implements KODI::ADDONS::IAddonSupportList.

◆ IsExtensionSupported()

bool CExtsMimeSupportList::IsExtensionSupported ( const std::string & ext)

To query the desired file extension is supported in it.

Parameters
[in]extExtension name to check
Returns
True if within supported, false if not

◆ IsMimetypeSupported()

bool CExtsMimeSupportList::IsMimetypeSupported ( const std::string & mimetype)

To query the desired file mimetype is supported in it.

Parameters
[in]mimetypeMimetype name to check
Returns
True if within supported, false if not

◆ OnEvent()

void CExtsMimeSupportList::OnEvent ( const ADDON::AddonEvent & event)
protected

◆ ScanAddonProperties()

CExtsMimeSupportList::SupportValues CExtsMimeSupportList::ScanAddonProperties ( ADDON::AddonType type,
const std::shared_ptr< ADDON::CAddonInfo > & addonInfo )
staticprotected

◆ Update()

void CExtsMimeSupportList::Update ( const std::string & id)
protected

Member Data Documentation

◆ m_addonMgr

ADDON::CAddonMgr& KODI::ADDONS::CExtsMimeSupportList::m_addonMgr
protected

◆ m_critSection

CCriticalSection KODI::ADDONS::CExtsMimeSupportList::m_critSection
protected

◆ m_supportedList

std::vector<SupportValues> KODI::ADDONS::CExtsMimeSupportList::m_supportedList
protected

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