Merge pull request #24470 from fuzzard/release_20.3
[xbmc.git] / xbmc / addons / IAddonSupportList.h
blob0390a4cce6e43762a746349b61efae30eab45f18
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include <string>
12 #include <vector>
14 namespace KODI
16 namespace ADDONS
19 /*!
20 * @brief To identify related type about entry
22 enum class AddonSupportType
24 /* To set if type relates to a file extension */
25 Extension,
27 /* Used if relates to a Internet Media Type (MIME-Type) */
28 Mimetype
31 /*!
32 * @brief Information structure with which a supported format of an addon can
33 * be stored.
35 struct AddonSupportEntry
37 /* Type what this is about */
38 AddonSupportType m_type;
40 /* The name used for processing */
41 std::string m_name;
43 /* User-friendly description of the name type stored here. */
44 std::string m_description;
46 /* Path to use own icon about. */
47 std::string m_icon;
50 /*!
51 * @brief Parent class to manage all available mimetypes and file extensions of
52 * the respective add-on and its types.
54 * This class should be integrated in the respective add-on type manager and in
55 * order to get an overview of all that are intended for file processing.
57 * @todo Extend this class with database usage and support to activate /
58 * deactivate the respective formats and thus to override add-ons if several
59 * support the same.
61 class IAddonSupportList
63 public:
64 IAddonSupportList() = default;
65 virtual ~IAddonSupportList() = default;
67 /*!
68 * @brief To give all file extensions and MIME types supported by the addon.
70 * @param[in] addonId Identifier about wanted addon
71 * @return List of all supported parts on selected addon
73 virtual std::vector<AddonSupportEntry> GetSupportedExtsAndMimeTypes(
74 const std::string& addonId) = 0;
77 } /* namespace ADDONS */
78 } /* namespace KODI */