xbmc
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for KODI::ADDONS::CExtsMimeSupportList:
Collaboration graph
[legend]

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  FilterSelect { FilterSelect::all, FilterSelect::hasTags, FilterSelect::hasTracks }
 Filter selection values. More...
 

Public Member Functions

 CExtsMimeSupportList (ADDON::CAddonMgr &addonMgr)
 
std::vector< SupportValuesGetSupportedAddonInfos (FilterSelect select)
 Get list of all by audiodecoder supported parts. More...
 
bool IsExtensionSupported (const std::string &ext)
 To query the desired file extension is supported in it. More...
 
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. More...
 
bool IsMimetypeSupported (const std::string &mimetype)
 To query the desired file mimetype is supported in it. More...
 
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. More...
 
std::vector< KODI::ADDONS::AddonSupportEntryGetSupportedExtsAndMimeTypes (const std::string &addonId) override
 To give all file extensions and MIME types supported by the addon. More...
 

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

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

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