2 * Copyright (C) 2012-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.
23 class CAdvancedSettings
;
25 class CFileExtensionProvider
28 CFileExtensionProvider(ADDON::CAddonMgr
& addonManager
);
29 ~CFileExtensionProvider();
32 * @brief Returns a list of picture extensions
34 std::string
GetPictureExtensions() const;
37 * @brief Returns a list of music extensions
39 std::string
GetMusicExtensions() const;
42 * @brief Returns a list of video extensions
44 std::string
GetVideoExtensions() const;
47 * @brief Returns a list of subtitle extensions
49 std::string
GetSubtitleExtensions() const;
52 * @brief Returns a list of disc stub extensions
54 std::string
GetDiscStubExtensions() const;
57 * @brief Returns a file folder extensions
59 std::string
GetFileFolderExtensions() const;
62 * @brief Returns whether a url protocol from add-ons use encoded hostnames
64 bool EncodedHostName(const std::string
& protocol
) const;
67 * @brief Returns true if related provider can operate related file
69 * @note Thought for cases e.g. by ISO, where can be a video or also a SACD.
71 bool CanOperateExtension(const std::string
& path
) const;
74 std::string
GetAddonExtensions(ADDON::AddonType type
) const;
75 std::string
GetAddonFileFolderExtensions(ADDON::AddonType type
) const;
76 void SetAddonExtensions();
77 void SetAddonExtensions(ADDON::AddonType type
);
79 void OnAddonEvent(const ADDON::AddonEvent
& event
);
81 // Construction properties
82 std::shared_ptr
<CAdvancedSettings
> m_advancedSettings
;
83 ADDON::CAddonMgr
&m_addonManager
;
85 // File extension properties
86 std::map
<ADDON::AddonType
, std::string
> m_addonExtensions
;
87 std::map
<ADDON::AddonType
, std::string
> m_addonFileFolderExtensions
;
89 // Protocols from add-ons with encoded host names
90 std::vector
<std::string
> m_encoded
;