[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / addons / Resource.h
blobd426c85f1d0f35e6392955d5abc0773a6fee3887
1 /*
2 * Copyright (C) 2014-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 "addons/Addon.h"
12 #include "utils/URIUtils.h"
14 #include <memory>
16 namespace ADDON
19 class CResource : public CAddon
21 public:
22 ~CResource() override = default;
24 virtual bool IsAllowed(const std::string &file) const = 0;
26 virtual std::string GetFullPath(const std::string &filePath) const
28 return URIUtils::AddFileToFolder(GetResourcePath(), filePath);
31 protected:
32 explicit CResource(const AddonInfoPtr& addonInfo, AddonType addonType)
33 : CAddon(addonInfo, addonType)
37 std::string GetResourcePath() const
39 return URIUtils::AddFileToFolder(Path(), "resources");