kodi
FontResource.h
1 /*
2  * Copyright (C) 2014-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "addons/Resource.h"
12 
13 #include <memory>
14 
15 namespace ADDON
16 {
17 class CFontResource : public CResource
18 {
19 public:
20  explicit CFontResource(const AddonInfoPtr& addonInfo);
21 
23  bool IsAllowed(const std::string& file) const override { return true; }
24 
29  bool GetFont(const std::string& file, std::string& path) const;
30 
32  void OnPostInstall(bool update, bool modal) override;
33 };
34 
35 }
void OnPostInstall(bool update, bool modal) override
Callback executed after installation.
Definition: FontResource.cpp:28
Definition: FontResource.h:17
bool IsAllowed(const std::string &file) const override
Check whether file is allowed or not (no filters here).
Definition: FontResource.h:23
bool GetFont(const std::string &file, std::string &path) const
Get the font path if given font file is served by the add-on.
Definition: FontResource.cpp:39
Definition: Resource.h:19
Definition: Addon.cpp:39