Debian Codegraph @

src/Addon.h

raw
1 /*
2 * Copyright (c) 2023~now Palo Kisa <[email protected]>
3 *
4 * This Program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
7 * any later version.
8 *
9 * This Program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this addon; see the file COPYING. If not, write to
16 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17 * http://www.gnu.org/copyleft/gpl.html
18 *
19 */
20
21 #pragma once
22
23 #include "kodi/AddonBase.h"
24
25 namespace sledovanitvcz
26 {
27 class ATTR_DLL_LOCAL Addon : public kodi::addon::CAddonBase
28 {
29 public:
30 Addon() = default;
31
32 virtual ADDON_STATUS Create() override;
33 virtual ADDON_STATUS SetSetting(const std::string & settingName, const kodi::addon::CSettingValue & settingValue) override;
34 virtual ADDON_STATUS CreateInstance(const kodi::addon::IInstanceInfo & instance, KODI_ADDON_INSTANCE_HDL & hdl) override;
35 virtual void DestroyInstance(const kodi::addon::IInstanceInfo & instance, const KODI_ADDON_INSTANCE_HDL hdl) override;
36
37 private:
38 static void TryMigrate(const kodi::addon::IInstanceInfo & instance);
39 };
40
41 } //namespace sledovanitvcz