Merge pull request #26264 from the-black-eagle/mka_end_durations
[xbmc.git] / xbmc / addons / IAddonSupportCheck.h
blob463afab8a108549817f0a845bbe04a921e6dc289
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>
13 namespace KODI
15 namespace ADDONS
18 /*!
19 * @brief Parent class to ask addons for support.
21 * This one can be used as a parent on the respective Kodi-sided addon class,
22 * this makes it easier to query for the desired support without using the
23 * class's own function definition.
25 class IAddonSupportCheck
27 public:
28 IAddonSupportCheck() = default;
29 virtual ~IAddonSupportCheck() = default;
31 /*!
32 * @brief Function to query the respective add-ons used for the support of
33 * the desired file.
35 * @param[in] filename File which is queried for addon support
36 * @return True if addon supports the desired file, false if not
38 * @note Is set here with true as default and not with "= 0" in order to have
39 * class expandable and perhaps to be able to insert other query functions in
40 * the future.
42 virtual bool SupportsFile(const std::string& filename) { return true; }
45 } /* namespace ADDONS */
46 } /* namespace KODI */