diff options
author | Alwin Esch <alwin.esch@web.de> | 2016-12-06 11:47:58 +0100 |
---|---|---|
committer | Alwin Esch <alwin.esch@web.de> | 2016-12-17 09:19:53 +0100 |
commit | d983ccb713616e65e592ad108f2e94e8f22294ee (patch) | |
tree | 57e0e65c527e1107f73a0463e47c84de75957c1e | |
parent | 8eb8fdb2d295ac07b5da2af0689b3ac1489fb0c4 (diff) |
[addons] remove TheDll template from CAddonDll
28 files changed, 73 insertions, 213 deletions
diff --git a/Kodi.xcodeproj/project.pbxproj b/Kodi.xcodeproj/project.pbxproj index 58ca664765..745bddd539 100644 --- a/Kodi.xcodeproj/project.pbxproj +++ b/Kodi.xcodeproj/project.pbxproj @@ -2918,11 +2918,7 @@ 6890C21A1DDBDC7400F8F362 /* IXmlDeserializable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IXmlDeserializable.h; sourceTree = "<group>"; }; 6890C21B1DDBDCA200F8F362 /* GameResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameResource.cpp; sourceTree = "<group>"; }; 6890C21C1DDBDCA200F8F362 /* GameResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameResource.h; sourceTree = "<group>"; }; - 6890C21F1DDBDCB000F8F362 /* DllGameClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllGameClient.h; sourceTree = "<group>"; }; - 6890C2201DDBDCB700F8F362 /* DllAudioDSP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllAudioDSP.h; sourceTree = "<group>"; }; 6890C2211DDBDCBC00F8F362 /* DllLibCPluff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllLibCPluff.h; sourceTree = "<group>"; }; - 6890C2221DDBDCC900F8F362 /* DllPeripheral.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllPeripheral.h; sourceTree = "<group>"; }; - 6890C2231DDBDCCE00F8F362 /* DllPVRClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllPVRClient.h; sourceTree = "<group>"; }; 6890C2251DDBDCF500F8F362 /* AddonCallbacksGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddonCallbacksGame.cpp; path = addons/interfaces/Game/AddonCallbacksGame.cpp; sourceTree = "<group>"; }; 6890C2261DDBDCF500F8F362 /* AddonCallbacksGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddonCallbacksGame.h; path = addons/interfaces/Game/AddonCallbacksGame.h; sourceTree = "<group>"; }; 6890C22A1DDBDD0900F8F362 /* kodi_game_dll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = kodi_game_dll.h; path = "kodi-addon-dev-kit/include/kodi/kodi_game_dll.h"; sourceTree = "<group>"; }; @@ -5388,11 +5384,7 @@ 9A2FAD681C972BE10049652A /* ContextMenus.cpp */, 9A2FAD691C972BE10049652A /* ContextMenus.h */, 18B49FF61152BFA5001AF8A6 /* DllAddon.h */, - 6890C2201DDBDCB700F8F362 /* DllAudioDSP.h */, - 6890C21F1DDBDCB000F8F362 /* DllGameClient.h */, 6890C2211DDBDCBC00F8F362 /* DllLibCPluff.h */, - 6890C2221DDBDCC900F8F362 /* DllPeripheral.h */, - 6890C2231DDBDCCE00F8F362 /* DllPVRClient.h */, DF209C101DB2A0C200515D1F /* FilesystemInstaller.cpp */, DF209C111DB2A0C300515D1F /* FilesystemInstaller.h */, 6890C21B1DDBDCA200F8F362 /* GameResource.cpp */, diff --git a/xbmc/addons/AddonDll.h b/xbmc/addons/AddonDll.h index ad646b03f9..b458d1180f 100644 --- a/xbmc/addons/AddonDll.h +++ b/xbmc/addons/AddonDll.h @@ -41,14 +41,14 @@ namespace ADDON { - template<class TheDll, typename TheStruct> + template<typename TheStruct> class CAddonDll : public CAddon { public: CAddonDll(AddonProps props); //FIXME: does shallow pointer copy. no copy assignment op - CAddonDll(const CAddonDll<TheDll, TheStruct> &rhs); + CAddonDll(const CAddonDll<TheStruct> &rhs); virtual ~CAddonDll(); virtual ADDON_STATUS GetStatus(); @@ -74,7 +74,7 @@ namespace ADDON std::string m_parentLib; private: - TheDll* m_pDll; + DllAddon* m_pDll; bool m_initialized; bool LoadDll(); bool m_needsavedsettings; @@ -88,8 +88,8 @@ namespace ADDON static void AddOnOpenOwnSettings(void *userData, bool bReload); }; -template<class TheDll, typename TheStruct> -CAddonDll<TheDll, TheStruct>::CAddonDll(AddonProps props) +template<typename TheStruct> +CAddonDll<TheStruct>::CAddonDll(AddonProps props) : CAddon(std::move(props)), m_bIsChild(false) { @@ -101,8 +101,8 @@ CAddonDll<TheDll, TheStruct>::CAddonDll(AddonProps props) m_parentLib.clear(); } -template<class TheDll, typename TheStruct> -CAddonDll<TheDll, TheStruct>::CAddonDll(const CAddonDll<TheDll, TheStruct> &rhs) +template<typename TheStruct> +CAddonDll<TheStruct>::CAddonDll(const CAddonDll<TheStruct> &rhs) : CAddon(rhs), m_bIsChild(true) { @@ -114,15 +114,15 @@ CAddonDll<TheDll, TheStruct>::CAddonDll(const CAddonDll<TheDll, TheStruct> &rhs) m_parentLib = rhs.m_parentLib; } -template<class TheDll, typename TheStruct> -CAddonDll<TheDll, TheStruct>::~CAddonDll() +template<typename TheStruct> +CAddonDll<TheStruct>::~CAddonDll() { if (m_initialized) Destroy(); } -template<class TheDll, typename TheStruct> -bool CAddonDll<TheDll, TheStruct>::LoadDll() +template<typename TheStruct> +bool CAddonDll<TheStruct>::LoadDll() { if (m_pDll) return true; @@ -203,7 +203,7 @@ bool CAddonDll<TheDll, TheStruct>::LoadDll() } /* Load the Dll */ - m_pDll = new TheDll; + m_pDll = new DllAddon; m_pDll->SetFile(strFileName); m_pDll->EnableDelayedUnload(false); if (!m_pDll->Load()) @@ -236,8 +236,8 @@ bool CAddonDll<TheDll, TheStruct>::LoadDll() return false; } -template<class TheDll, typename TheStruct> -ADDON_STATUS CAddonDll<TheDll, TheStruct>::Create(void* info) +template<typename TheStruct> +ADDON_STATUS CAddonDll<TheStruct>::Create(void* info) { /* ensure that a previous instance is destroyed */ Destroy(); @@ -293,8 +293,8 @@ ADDON_STATUS CAddonDll<TheDll, TheStruct>::Create(void* info) return status; } -template<class TheDll, typename TheStruct> -void CAddonDll<TheDll, TheStruct>::Stop() +template<typename TheStruct> +void CAddonDll<TheStruct>::Stop() { /* Inform dll to stop all activities */ try @@ -329,8 +329,8 @@ void CAddonDll<TheDll, TheStruct>::Stop() } } -template<class TheDll, typename TheStruct> -void CAddonDll<TheDll, TheStruct>::Destroy() +template<typename TheStruct> +void CAddonDll<TheStruct>::Destroy() { /* Unload library file */ try @@ -360,14 +360,14 @@ void CAddonDll<TheDll, TheStruct>::Destroy() m_initialized = false; } -template<class TheDll, typename TheStruct> -bool CAddonDll<TheDll, TheStruct>::DllLoaded(void) const +template<typename TheStruct> +bool CAddonDll<TheStruct>::DllLoaded(void) const { return m_pDll != NULL; } -template<class TheDll, typename TheStruct> -ADDON_STATUS CAddonDll<TheDll, TheStruct>::GetStatus() +template<typename TheStruct> +ADDON_STATUS CAddonDll<TheStruct>::GetStatus() { try { @@ -380,8 +380,8 @@ ADDON_STATUS CAddonDll<TheDll, TheStruct>::GetStatus() return ADDON_STATUS_UNKNOWN; } -template<class TheDll, typename TheStruct> -bool CAddonDll<TheDll, TheStruct>::LoadSettings() +template<typename TheStruct> +bool CAddonDll<TheStruct>::LoadSettings() { if (m_settingsLoaded) return true; @@ -426,8 +426,8 @@ bool CAddonDll<TheDll, TheStruct>::LoadSettings() return true; } -template<class TheDll, typename TheStruct> -TiXmlElement CAddonDll<TheDll, TheStruct>::MakeSetting(DllSetting& setting) const +template<typename TheStruct> +TiXmlElement CAddonDll<TheStruct>::MakeSetting(DllSetting& setting) const { TiXmlElement node("setting"); @@ -461,8 +461,8 @@ TiXmlElement CAddonDll<TheDll, TheStruct>::MakeSetting(DllSetting& setting) cons return node; } -template<class TheDll, typename TheStruct> -void CAddonDll<TheDll, TheStruct>::SaveSettings() +template<typename TheStruct> +void CAddonDll<TheStruct>::SaveSettings() { // must save first, as TransferSettings() reloads saved settings! CAddon::SaveSettings(); @@ -470,14 +470,14 @@ void CAddonDll<TheDll, TheStruct>::SaveSettings() TransferSettings(); } -template<class TheDll, typename TheStruct> -std::string CAddonDll<TheDll, TheStruct>::GetSetting(const std::string& key) +template<typename TheStruct> +std::string CAddonDll<TheStruct>::GetSetting(const std::string& key) { return CAddon::GetSetting(key); } -template<class TheDll, typename TheStruct> -ADDON_STATUS CAddonDll<TheDll, TheStruct>::TransferSettings() +template<typename TheStruct> +ADDON_STATUS CAddonDll<TheStruct>::TransferSettings() { bool restart = false; ADDON_STATUS reportStatus = ADDON_STATUS_OK; @@ -569,8 +569,8 @@ ADDON_STATUS CAddonDll<TheDll, TheStruct>::TransferSettings() return ADDON_STATUS_OK; } -template<class TheDll, typename TheStruct> -void CAddonDll<TheDll, TheStruct>::HandleException(std::exception &e, const char* context) +template<typename TheStruct> +void CAddonDll<TheStruct>::HandleException(std::exception &e, const char* context) { m_initialized = false; m_pDll->Unload(); diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp index 4e3277648f..a8dc8b4e0d 100644 --- a/xbmc/addons/AddonManager.cpp +++ b/xbmc/addons/AddonManager.cpp @@ -36,7 +36,6 @@ #include "ContextMenuAddon.h" #include "ContextMenuManager.h" #include "cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSP.h" -#include "DllAudioDSP.h" #include "DllLibCPluff.h" #include "events/AddonManagementEvent.h" #include "events/EventLog.h" diff --git a/xbmc/addons/AudioDecoder.cpp b/xbmc/addons/AudioDecoder.cpp index 6bf0055ea2..0935d896bc 100644 --- a/xbmc/addons/AudioDecoder.cpp +++ b/xbmc/addons/AudioDecoder.cpp @@ -53,7 +53,7 @@ CAudioDecoder::~CAudioDecoder() bool CAudioDecoder::Create() { - return CAddonDll<DllAudioDecoder, AudioDecoder>::Create(&m_info) == ADDON_STATUS_OK; + return CAddonDll<AudioDecoder>::Create(&m_info) == ADDON_STATUS_OK; } bool CAudioDecoder::Init(const CFileItem& file, unsigned int filecache) diff --git a/xbmc/addons/AudioDecoder.h b/xbmc/addons/AudioDecoder.h index 9c88e5a84d..6136838b41 100644 --- a/xbmc/addons/AudioDecoder.h +++ b/xbmc/addons/AudioDecoder.h @@ -30,11 +30,9 @@ namespace MUSIC_INFO class EmbeddedArt; } -typedef DllAddon<AudioDecoder> DllAudioDecoder; namespace ADDON { - typedef CAddonDll<DllAudioDecoder, - AudioDecoder> AudioDecoderDll; + typedef CAddonDll<AudioDecoder> AudioDecoderDll; class CAudioDecoder : public AudioDecoderDll, public ICodec, diff --git a/xbmc/addons/AudioEncoder.cpp b/xbmc/addons/AudioEncoder.cpp index b02db2a703..ffeb06fc8d 100644 --- a/xbmc/addons/AudioEncoder.cpp +++ b/xbmc/addons/AudioEncoder.cpp @@ -34,7 +34,7 @@ CAudioEncoder::CAudioEncoder(AddonProps props, std::string _extension) bool CAudioEncoder::Create() { - return CAddonDll<DllAudioEncoder, AudioEncoder>::Create(&m_info) == ADDON_STATUS_OK; + return CAddonDll<AudioEncoder>::Create(&m_info) == ADDON_STATUS_OK; } bool CAudioEncoder::Init(audioenc_callbacks &callbacks) diff --git a/xbmc/addons/AudioEncoder.h b/xbmc/addons/AudioEncoder.h index 2f33a83c95..06a91e7550 100644 --- a/xbmc/addons/AudioEncoder.h +++ b/xbmc/addons/AudioEncoder.h @@ -22,11 +22,9 @@ #include "addons/kodi-addon-dev-kit/include/kodi/xbmc_audioenc_types.h" #include "cdrip/IEncoder.h" -typedef DllAddon<AudioEncoder> DllAudioEncoder; namespace ADDON { - typedef CAddonDll<DllAudioEncoder, - AudioEncoder> AudioEncoderDll; + typedef CAddonDll<AudioEncoder> AudioEncoderDll; class CAudioEncoder : public AudioEncoderDll, public IEncoder { diff --git a/xbmc/addons/CMakeLists.txt b/xbmc/addons/CMakeLists.txt index 927d05db77..c583533b38 100644 --- a/xbmc/addons/CMakeLists.txt +++ b/xbmc/addons/CMakeLists.txt @@ -48,9 +48,7 @@ set(HEADERS Addon.h ContextMenuAddon.h ContextMenus.h DllAddon.h - DllAudioDSP.h DllLibCPluff.h - DllPVRClient.h FilesystemInstaller.h GameResource.h GUIDialogAddonInfo.h diff --git a/xbmc/addons/DllAddon.h b/xbmc/addons/DllAddon.h index 4180038cc0..24ab37a2ec 100644 --- a/xbmc/addons/DllAddon.h +++ b/xbmc/addons/DllAddon.h @@ -22,12 +22,11 @@ #include "DynamicDll.h" #include "addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h" -template <typename TheStruct> class DllAddonInterface { public: virtual ~DllAddonInterface() {} - virtual void GetAddon(TheStruct* pAddon) =0; + virtual void GetAddon(void* pAddon) =0; virtual ADDON_STATUS Create(void *cb, void *info) =0; virtual void Stop() =0; virtual void Destroy() =0; @@ -38,8 +37,7 @@ public: virtual ADDON_STATUS SetSetting(const char *settingName, const void *settingValue) =0; }; -template <typename TheStruct> -class DllAddon : public DllDynamic, public DllAddonInterface<TheStruct> +class DllAddon : public DllDynamic, public DllAddonInterface { public: DECLARE_DLL_WRAPPER_TEMPLATE(DllAddon) @@ -51,7 +49,7 @@ public: DEFINE_METHOD1(unsigned int, GetSettings, (ADDON_StructSetting ***p1)) DEFINE_METHOD0(void, FreeSettings) DEFINE_METHOD2(ADDON_STATUS, SetSetting, (const char *p1, const void *p2)) - DEFINE_METHOD1(void, GetAddon, (TheStruct* p1)) + DEFINE_METHOD1(void, GetAddon, (void* p1)) BEGIN_METHOD_RESOLVE() RESOLVE_METHOD_RENAME(get_addon,GetAddon) RESOLVE_METHOD_RENAME(ADDON_Create, Create) diff --git a/xbmc/addons/DllAudioDSP.h b/xbmc/addons/DllAudioDSP.h deleted file mode 100644 index c57d380bb3..0000000000 --- a/xbmc/addons/DllAudioDSP.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once -/* - * Copyright (C) 2012-2015 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -#include "DllAddon.h" -#include "addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_types.h" - -class DllAudioDSP : public DllAddon<AudioDSP> -{ - // this is populated via Macro calls in DllAddon.h -}; - diff --git a/xbmc/addons/DllGameClient.h b/xbmc/addons/DllGameClient.h deleted file mode 100644 index e32806fec8..0000000000 --- a/xbmc/addons/DllGameClient.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2012-2016 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ -#pragma once - -#include "DllAddon.h" -#include "addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h" - -class DllGameClient : public DllAddon<GameClient> -{ - // this is populated via macro calls in DllAddon.h -}; - diff --git a/xbmc/addons/DllPVRClient.h b/xbmc/addons/DllPVRClient.h deleted file mode 100644 index 3bd6dc96aa..0000000000 --- a/xbmc/addons/DllPVRClient.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once -/* - * Copyright (C) 2012-2013 Team XBMC - * http://xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -#include "DllAddon.h" -#include "addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h" - -class DllPVRClient : public DllAddon<PVRClient> -{ - // this is populated via Macro calls in DllAddon.h -}; - diff --git a/xbmc/addons/DllPeripheral.h b/xbmc/addons/DllPeripheral.h deleted file mode 100644 index 95fb2fac51..0000000000 --- a/xbmc/addons/DllPeripheral.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2014-2016 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ -#pragma once - -#include "DllAddon.h" -#include "addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_types.h" - -class DllPeripheral : public DllAddon<PeripheralAddon> -{ - // this is populated via Macro calls in DllAddon.h -}; diff --git a/xbmc/addons/InputStream.cpp b/xbmc/addons/InputStream.cpp index 00031b9720..88697efff3 100644 --- a/xbmc/addons/InputStream.cpp +++ b/xbmc/addons/InputStream.cpp @@ -72,7 +72,7 @@ CInputStream::CInputStream(const AddonProps& props, bool CInputStream::Create() { - return CAddonDll<DllInputStream, InputStreamAddonFunctions>::Create(&m_info) == ADDON_STATUS_OK; + return CAddonDll<InputStreamAddonFunctions>::Create(&m_info) == ADDON_STATUS_OK; } bool CInputStream::CheckAPIVersion() @@ -111,7 +111,7 @@ void CInputStream::CheckConfig() void CInputStream::UpdateConfig() { std::string pathList; - ADDON_STATUS status = CAddonDll<DllInputStream, InputStreamAddonFunctions>::Create(&m_info); + ADDON_STATUS status = CAddonDll<InputStreamAddonFunctions>::Create(&m_info); if (status != ADDON_STATUS_PERMANENT_FAILURE) { diff --git a/xbmc/addons/InputStream.h b/xbmc/addons/InputStream.h index 573b548ba4..934817b267 100644 --- a/xbmc/addons/InputStream.h +++ b/xbmc/addons/InputStream.h @@ -25,13 +25,11 @@ #include <vector> #include <map> -typedef DllAddon<InputStreamAddonFunctions> DllInputStream; - class CDemuxStream; namespace ADDON { - typedef CAddonDll<DllInputStream, InputStreamAddonFunctions> InputStreamDll; + typedef CAddonDll<InputStreamAddonFunctions> InputStreamDll; class CInputStream : public InputStreamDll { diff --git a/xbmc/addons/PVRClient.cpp b/xbmc/addons/PVRClient.cpp index 104c0ec943..8976cd81aa 100644 --- a/xbmc/addons/PVRClient.cpp +++ b/xbmc/addons/PVRClient.cpp @@ -63,7 +63,7 @@ std::unique_ptr<CPVRClient> CPVRClient::FromExtension(AddonProps props, const cp } CPVRClient::CPVRClient(AddonProps props) - : CAddonDll<DllPVRClient, PVRClient>(std::move(props)), + : CAddonDll<PVRClient>(std::move(props)), m_apiVersion("0.0.0"), m_bAvahiServiceAdded(false) { @@ -72,7 +72,7 @@ CPVRClient::CPVRClient(AddonProps props) CPVRClient::CPVRClient(AddonProps props, const std::string& strAvahiType, const std::string& strAvahiIpSetting, const std::string& strAvahiPortSetting) - : CAddonDll<DllPVRClient, PVRClient>(std::move(props)), + : CAddonDll<PVRClient>(std::move(props)), m_strAvahiType(strAvahiType), m_strAvahiIpSetting(strAvahiIpSetting), m_strAvahiPortSetting(strAvahiPortSetting), @@ -165,7 +165,7 @@ ADDON_STATUS CPVRClient::Create(int iClientId) /* initialise the add-on */ bool bReadyToUse(false); CLog::Log(LOGDEBUG, "PVR - %s - creating PVR add-on instance '%s'", __FUNCTION__, Name().c_str()); - if ((status = CAddonDll<DllPVRClient, PVRClient>::Create(&m_info)) == ADDON_STATUS_OK) + if ((status = CAddonDll<PVRClient>::Create(&m_info)) == ADDON_STATUS_OK) bReadyToUse = GetAddonProperties(); m_bReadyToUse = bReadyToUse; @@ -174,7 +174,7 @@ ADDON_STATUS CPVRClient::Create(int iClientId) bool CPVRClient::DllLoaded(void) const { - return CAddonDll<DllPVRClient, PVRClient>::DllLoaded(); + return CAddonDll<PVRClient>::DllLoaded(); } void CPVRClient::Destroy(void) @@ -187,7 +187,7 @@ void CPVRClient::Destroy(void) CLog::Log(LOGDEBUG, "PVR - %s - destroying PVR add-on '%s'", __FUNCTION__, GetFriendlyName().c_str()); /* destroy the add-on */ - CAddonDll<DllPVRClient, PVRClient>::Destroy(); + CAddonDll<PVRClient>::Destroy(); /* reset all properties to defaults */ ResetProperties(); diff --git a/xbmc/addons/PVRClient.h b/xbmc/addons/PVRClient.h index 6f781965d4..8585a16e78 100644 --- a/xbmc/addons/PVRClient.h +++ b/xbmc/addons/PVRClient.h @@ -26,7 +26,7 @@ #include "addons/Addon.h" #include "addons/AddonDll.h" -#include "addons/DllPVRClient.h" +#include "addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h" #include "network/ZeroconfBrowser.h" #include "pvr/channels/PVRChannel.h" @@ -60,7 +60,7 @@ namespace PVR * * Also translates XBMC's C++ structures to the addon's C structures. */ - class CPVRClient : public ADDON::CAddonDll<DllPVRClient, PVRClient> + class CPVRClient : public ADDON::CAddonDll<PVRClient> { public: static std::unique_ptr<CPVRClient> FromExtension(ADDON::AddonProps props, const cp_extension_t* ext); diff --git a/xbmc/addons/ScreenSaver.cpp b/xbmc/addons/ScreenSaver.cpp index 86cd3dffe3..39e05f9bde 100644 --- a/xbmc/addons/ScreenSaver.cpp +++ b/xbmc/addons/ScreenSaver.cpp @@ -34,7 +34,7 @@ namespace ADDON { CScreenSaver::CScreenSaver(const char *addonID) - : ADDON::CAddonDll<DllScreenSaver, ScreenSaver>(AddonProps(addonID, ADDON_UNKNOWN)) + : ADDON::CAddonDll<ScreenSaver>(AddonProps(addonID, ADDON_UNKNOWN)) { memset(&m_info, 0, sizeof(m_info)); } @@ -74,7 +74,7 @@ bool CScreenSaver::CreateScreenSaver() m_info.presets = strdup(CSpecialProtocol::TranslatePath(Path()).c_str()); m_info.profile = strdup(CSpecialProtocol::TranslatePath(Profile()).c_str()); - if (CAddonDll<DllScreenSaver, ScreenSaver>::Create(&m_info) == ADDON_STATUS_OK) + if (CAddonDll<ScreenSaver>::Create(&m_info) == ADDON_STATUS_OK) return true; return false; @@ -122,7 +122,7 @@ void CScreenSaver::Destroy() m_info.profile = nullptr; } - CAddonDll<DllScreenSaver, ScreenSaver>::Destroy(); + CAddonDll<ScreenSaver>::Destroy(); } } /*namespace ADDON*/ diff --git a/xbmc/addons/ScreenSaver.h b/xbmc/addons/ScreenSaver.h index 7cbdd7080f..76014f2deb 100644 --- a/xbmc/addons/ScreenSaver.h +++ b/xbmc/addons/ScreenSaver.h @@ -22,15 +22,13 @@ #include "AddonDll.h" #include "addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_types.h" -typedef DllAddon<ScreenSaver> DllScreenSaver; - namespace ADDON { -class CScreenSaver : public ADDON::CAddonDll<DllScreenSaver, ScreenSaver> +class CScreenSaver : public ADDON::CAddonDll<ScreenSaver> { public: - explicit CScreenSaver(AddonProps props) : CAddonDll<DllScreenSaver, ScreenSaver>(std::move(props)) {}; + explicit CScreenSaver(AddonProps props) : CAddonDll<ScreenSaver>(std::move(props)) {}; explicit CScreenSaver(const char *addonID); virtual ~CScreenSaver() {} diff --git a/xbmc/addons/Visualisation.cpp b/xbmc/addons/Visualisation.cpp index d2aa1e8652..8a6614c67e 100644 --- a/xbmc/addons/Visualisation.cpp +++ b/xbmc/addons/Visualisation.cpp @@ -65,7 +65,7 @@ void CAudioBuffer::Set(const float* psBuffer, int iSize) } CVisualisation::CVisualisation(AddonProps props) - : CAddonDll<DllVisualisation, Visualisation>(std::move(props)) + : CAddonDll<Visualisation>(std::move(props)) { memset(&m_info, 0, sizeof(m_info)); } @@ -88,7 +88,7 @@ bool CVisualisation::Create(int x, int y, int w, int h, void *device) m_info.profile = strdup(CSpecialProtocol::TranslatePath(Profile()).c_str()); m_info.submodule = NULL; - if (CAddonDll<DllVisualisation, Visualisation>::Create(&m_info) == ADDON_STATUS_OK) + if (CAddonDll<Visualisation>::Create(&m_info) == ADDON_STATUS_OK) { // Start the visualisation std::string strFile = URIUtils::GetFileName(g_application.CurrentFile()); @@ -148,7 +148,7 @@ void CVisualisation::Stop() CAEFactory::UnregisterAudioCallback(this); if (Initialized()) { - CAddonDll<DllVisualisation, Visualisation>::Stop(); + CAddonDll<Visualisation>::Stop(); } } @@ -404,7 +404,7 @@ void CVisualisation::Destroy() m_info.submodule = nullptr; } - CAddonDll<DllVisualisation, Visualisation>::Destroy(); + CAddonDll<Visualisation>::Destroy(); } unsigned CVisualisation::GetPreset() diff --git a/xbmc/addons/Visualisation.h b/xbmc/addons/Visualisation.h index e01df38cd6..1677e84b07 100644 --- a/xbmc/addons/Visualisation.h +++ b/xbmc/addons/Visualisation.h @@ -36,8 +36,6 @@ class CCriticalSection; -typedef DllAddon<Visualisation> DllVisualisation; - class CAudioBuffer { public: @@ -53,7 +51,7 @@ private: namespace ADDON { - class CVisualisation : public CAddonDll<DllVisualisation, Visualisation> + class CVisualisation : public CAddonDll<Visualisation> , public IAudioCallback , public IRenderingCallback { diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPAddon.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPAddon.cpp index e2b431d086..3ea88c8c83 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPAddon.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPAddon.cpp @@ -34,7 +34,7 @@ using namespace ActiveAE; #define DEFAULT_INFO_STRING_VALUE "unknown" CActiveAEDSPAddon::CActiveAEDSPAddon(AddonProps props) : - CAddonDll<DllAudioDSP, AudioDSP>(std::move(props)), + CAddonDll<AudioDSP>(std::move(props)), m_apiVersion("0.0.0") { ResetProperties(); @@ -120,7 +120,7 @@ ADDON_STATUS CActiveAEDSPAddon::Create(int iClientId) /* initialise the add-on */ bool bReadyToUse(false); CLog::Log(LOGDEBUG, "ActiveAE DSP - %s - creating audio dsp add-on instance '%s'", __FUNCTION__, Name().c_str()); - if ((status = CAddonDll<DllAudioDSP, AudioDSP>::Create(&m_info)) == ADDON_STATUS_OK) + if ((status = CAddonDll<AudioDSP>::Create(&m_info)) == ADDON_STATUS_OK) bReadyToUse = GetAddonProperties(); m_bReadyToUse = bReadyToUse; @@ -130,7 +130,7 @@ ADDON_STATUS CActiveAEDSPAddon::Create(int iClientId) bool CActiveAEDSPAddon::DllLoaded(void) const { - return CAddonDll<DllAudioDSP, AudioDSP>::DllLoaded(); + return CAddonDll<AudioDSP>::DllLoaded(); } void CActiveAEDSPAddon::Destroy(void) @@ -143,7 +143,7 @@ void CActiveAEDSPAddon::Destroy(void) CLog::Log(LOGDEBUG, "ActiveAE DSP - %s - destroying audio dsp add-on '%s'", __FUNCTION__, GetFriendlyName().c_str()); /* destroy the add-on */ - CAddonDll<DllAudioDSP, AudioDSP>::Destroy(); + CAddonDll<AudioDSP>::Destroy(); /* reset all properties to defaults */ ResetProperties(); diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPAddon.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPAddon.h index 241a275136..7960209cd8 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPAddon.h +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPAddon.h @@ -25,7 +25,7 @@ #include "addons/Addon.h" #include "addons/AddonDll.h" -#include "addons/DllAudioDSP.h" +#include "addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_types.h" namespace ActiveAE { @@ -41,7 +41,7 @@ namespace ActiveAE * * Also translates KODI's C++ structures to the addon's C structures. */ - class CActiveAEDSPAddon : public ADDON::CAddonDll<DllAudioDSP, AudioDSP> + class CActiveAEDSPAddon : public ADDON::CAddonDll<AudioDSP> { public: explicit CActiveAEDSPAddon(ADDON::AddonProps props); diff --git a/xbmc/games/addons/GameClient.cpp b/xbmc/games/addons/GameClient.cpp index f5e84d30d7..34ea4edcc9 100644 --- a/xbmc/games/addons/GameClient.cpp +++ b/xbmc/games/addons/GameClient.cpp @@ -116,7 +116,7 @@ std::unique_ptr<CGameClient> CGameClient::FromExtension(ADDON::AddonProps props, } CGameClient::CGameClient(ADDON::AddonProps props) : - CAddonDll<DllGameClient, GameClient>(std::move(props)), + CAddonDll<GameClient>(std::move(props)), m_apiVersion("0.0.0"), m_libraryProps(this, m_info), m_bSupportsVFS(false), diff --git a/xbmc/games/addons/GameClient.h b/xbmc/games/addons/GameClient.h index cb6ffdedb5..bc7da7ce70 100644 --- a/xbmc/games/addons/GameClient.h +++ b/xbmc/games/addons/GameClient.h @@ -22,7 +22,6 @@ #include "GameClientProperties.h" #include "GameClientTiming.h" #include "addons/AddonDll.h" -#include "addons/DllGameClient.h" #include "addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h" #include "games/controllers/ControllerTypes.h" #include "games/GameTypes.h" @@ -53,7 +52,7 @@ class IGameVideoCallback; * \ingroup games * \brief Interface between Kodi and Game add-ons. */ -class CGameClient : public ADDON::CAddonDll<DllGameClient, GameClient> +class CGameClient : public ADDON::CAddonDll<GameClient> { public: static std::unique_ptr<CGameClient> FromExtension(ADDON::AddonProps props, const cp_extension_t* ext); diff --git a/xbmc/peripherals/addons/PeripheralAddon.cpp b/xbmc/peripherals/addons/PeripheralAddon.cpp index 196c53adc8..44e3258d07 100644 --- a/xbmc/peripherals/addons/PeripheralAddon.cpp +++ b/xbmc/peripherals/addons/PeripheralAddon.cpp @@ -66,7 +66,7 @@ std::unique_ptr<CPeripheralAddon> CPeripheralAddon::FromExtension(ADDON::AddonPr } CPeripheralAddon::CPeripheralAddon(ADDON::AddonProps props, bool bProvidesJoysticks, bool bProvidesButtonMaps) : - CAddonDll<DllPeripheral, PeripheralAddon>(std::move(props)), + CAddonDll<PeripheralAddon>(std::move(props)), m_apiVersion("0.0.0"), m_bProvidesJoysticks(bProvidesJoysticks), m_bProvidesButtonMaps(bProvidesButtonMaps) @@ -133,7 +133,7 @@ ADDON_STATUS CPeripheralAddon::CreateAddon(void) // Initialise the add-on CLog::Log(LOGDEBUG, "PERIPHERAL - %s - creating peripheral add-on instance '%s'", __FUNCTION__, Name().c_str()); - ADDON_STATUS status = CAddonDll<DllPeripheral, PeripheralAddon>::Create(&m_info); + ADDON_STATUS status = CAddonDll<PeripheralAddon>::Create(&m_info); if (status == ADDON_STATUS_OK) { if (!GetAddonProperties()) diff --git a/xbmc/peripherals/addons/PeripheralAddon.h b/xbmc/peripherals/addons/PeripheralAddon.h index d57d52cfbe..a82fe883ab 100644 --- a/xbmc/peripherals/addons/PeripheralAddon.h +++ b/xbmc/peripherals/addons/PeripheralAddon.h @@ -20,7 +20,6 @@ #pragma once #include "addons/AddonDll.h" -#include "addons/DllPeripheral.h" #include "addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_types.h" #include "addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_utils.hpp" #include "input/joysticks/JoystickTypes.h" @@ -45,7 +44,7 @@ namespace PERIPHERALS typedef std::vector<ADDON::DriverPrimitive> PrimitiveVector; typedef std::map<JOYSTICK::FeatureName, ADDON::JoystickFeature> FeatureMap; - class CPeripheralAddon : public ADDON::CAddonDll<DllPeripheral, PeripheralAddon> + class CPeripheralAddon : public ADDON::CAddonDll<PeripheralAddon> { public: static std::unique_ptr<CPeripheralAddon> FromExtension(ADDON::AddonProps props, const cp_extension_t* ext); diff --git a/xbmc/settings/AudioDSPSettings.h b/xbmc/settings/AudioDSPSettings.h index f0b534fb0e..79acbf9c71 100644 --- a/xbmc/settings/AudioDSPSettings.h +++ b/xbmc/settings/AudioDSPSettings.h @@ -23,7 +23,7 @@ #pragma once -#include "addons/DllAudioDSP.h" +#include "addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_types.h" #include "cores/AudioEngine/Utils/AEAudioFormat.h" class CAudioSettings |