diff options
Diffstat (limited to 'xbmc/addons/Webinterface.h')
| -rw-r--r-- | xbmc/addons/Webinterface.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/xbmc/addons/Webinterface.h b/xbmc/addons/Webinterface.h new file mode 100644 index 0000000..0a4773f --- /dev/null +++ b/xbmc/addons/Webinterface.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2015 Team XBMC | ||
| 4 | * http://xbmc.org | ||
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with XBMC; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include "Addon.h" | ||
| 23 | |||
| 24 | #define WEBINTERFACE_DEFAULT_ENTRY_POINT "index.html" | ||
| 25 | |||
| 26 | namespace ADDON | ||
| 27 | { | ||
| 28 | typedef enum WebinterfaceType | ||
| 29 | { | ||
| 30 | WebinterfaceTypeStatic = 0, | ||
| 31 | WebinterfaceTypeWsgi | ||
| 32 | } WebinterfaceType; | ||
| 33 | |||
| 34 | class CWebinterface : public CAddon | ||
| 35 | { | ||
| 36 | public: | ||
| 37 | explicit CWebinterface(const ADDON::AddonProps &props, WebinterfaceType type = WebinterfaceTypeStatic, const std::string &entryPoint = WEBINTERFACE_DEFAULT_ENTRY_POINT); | ||
| 38 | explicit CWebinterface(const cp_extension_t *ext); | ||
| 39 | virtual ~CWebinterface(); | ||
| 40 | |||
| 41 | WebinterfaceType GetType() const { return m_type; } | ||
| 42 | const std::string& EntryPoint() const { return m_entryPoint; } | ||
| 43 | |||
| 44 | std::string GetEntryPoint(const std::string &path) const; | ||
| 45 | std::string GetBaseLocation() const; | ||
| 46 | |||
| 47 | // specializations of CAddon | ||
| 48 | virtual AddonPtr Clone() const; | ||
| 49 | |||
| 50 | private: | ||
| 51 | WebinterfaceType m_type; | ||
| 52 | std::string m_entryPoint; | ||
| 53 | }; | ||
| 54 | } | ||
