kodi
Webinterface.h
1 /*
2  * Copyright (C) 2015-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/Addon.h"
12 
13 #define WEBINTERFACE_DEFAULT_ENTRY_POINT "index.html"
14 
15 namespace ADDON
16 {
17  typedef enum WebinterfaceType
18  {
19  WebinterfaceTypeStatic = 0,
20  WebinterfaceTypeWsgi
21  } WebinterfaceType;
22 
23  class CWebinterface : public CAddon
24  {
25  public:
26  explicit CWebinterface(const AddonInfoPtr& addonInfo);
27 
28  WebinterfaceType GetType() const { return m_type; }
29  const std::string& EntryPoint() const { return m_entryPoint; }
30 
31  std::string GetEntryPoint(const std::string &path) const;
32  std::string GetBaseLocation() const;
33 
34  private:
35  WebinterfaceType m_type = WebinterfaceTypeStatic;
36  std::string m_entryPoint;
37  };
38 }
Definition: Webinterface.h:23
Definition: Addon.cpp:39
Definition: Addon.h:34