2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "utils/GlobalsHandling.h"
18 class CBinaryAddonManager
;
19 class CBinaryAddonCache
;
21 class CServiceAddonManager
;
22 class CRepositoryUpdater
;
25 namespace ANNOUNCEMENT
27 class CAnnouncementManager
;
30 namespace MEDIA_DETECT
32 class CDetectDVDMedia
;
42 class CPlayListPlayer
;
49 class CApplicationMessenger
;
55 class CComponentContainer
;
56 class CContextMenuManager
;
60 class IApplicationComponent
;
61 class CFavouritesService
;
63 class CFileExtensionProvider
;
66 class CRenderSystemBase
;
68 class CWeatherManager
;
69 class CPlayerCoreFactory
;
70 class CDatabaseManager
;
73 class CAppInboundProtocol
;
74 class CSettingsComponent
;
75 class CDecoderFilterManager
;
82 class CSlideShowDelegator
;
93 class CExtsMimeSupportList
;
98 class CControllerManager
;
104 class CKeyboardLayoutManager
;
105 } // namespace KEYBOARD
109 class CGUIGameRenderManager
;
113 namespace PERIPHERALS
120 class ISpeechRecognition
;
129 static std::shared_ptr
<CAppParams
> GetAppParams();
130 static void RegisterAppParams(const std::shared_ptr
<CAppParams
>& appParams
);
131 static void UnregisterAppParams();
133 static CLog
& GetLogging();
134 static void CreateLogging();
135 static bool IsLoggingUp();
136 static void DestroyLogging();
138 static std::shared_ptr
<ANNOUNCEMENT::CAnnouncementManager
> GetAnnouncementManager();
139 static void RegisterAnnouncementManager(
140 std::shared_ptr
<ANNOUNCEMENT::CAnnouncementManager
> announcementManager
);
141 static void UnregisterAnnouncementManager();
143 static ADDON::CAddonMgr
& GetAddonMgr();
144 static ADDON::CBinaryAddonManager
& GetBinaryAddonManager();
145 static ADDON::CBinaryAddonCache
& GetBinaryAddonCache();
146 static KODI::ADDONS::CExtsMimeSupportList
& GetExtsMimeSupportList();
147 static ADDON::CVFSAddonCache
& GetVFSAddonCache();
148 static XBPython
& GetXBPython();
149 static WSDiscovery::IWSDiscovery
& GetWSDiscovery();
150 static MEDIA_DETECT::CDetectDVDMedia
& GetDetectDVDMedia();
151 static PVR::CPVRManager
& GetPVRManager();
152 static CContextMenuManager
& GetContextMenuManager();
153 static CDataCacheCore
& GetDataCacheCore();
154 static CPlatform
& GetPlatform();
155 static PLAYLIST::CPlayListPlayer
& GetPlaylistPlayer();
156 static CSlideShowDelegator
& GetSlideShowDelegator();
157 static KODI::GAME::CControllerManager
& GetGameControllerManager();
158 static KODI::GAME::CGameServices
& GetGameServices();
159 static KODI::RETRO::CGUIGameRenderManager
& GetGameRenderManager();
160 static PERIPHERALS::CPeripherals
& GetPeripherals();
161 static CFavouritesService
& GetFavouritesService();
162 static ADDON::CServiceAddonManager
& GetServiceAddons();
163 static ADDON::CRepositoryUpdater
& GetRepositoryUpdater();
164 static CInputManager
& GetInputManager();
165 static CFileExtensionProvider
& GetFileExtensionProvider();
166 static bool IsAddonInterfaceUp();
167 static bool IsServiceManagerUp();
168 static CNetworkBase
& GetNetwork();
169 static CPowerManager
& GetPowerManager();
170 static CWeatherManager
& GetWeatherManager();
171 static CPlayerCoreFactory
& GetPlayerCoreFactory();
172 static CDatabaseManager
& GetDatabaseManager();
173 static CEventLog
* GetEventLog();
174 static CMediaManager
& GetMediaManager();
175 static CComponentContainer
<IApplicationComponent
>& GetAppComponents();
177 static CGUIComponent
* GetGUI();
178 static void RegisterGUI(CGUIComponent
* gui
);
179 static void UnregisterGUI();
181 static void RegisterSettingsComponent(const std::shared_ptr
<CSettingsComponent
>& settings
);
182 static void UnregisterSettingsComponent();
183 static std::shared_ptr
<CSettingsComponent
> GetSettingsComponent();
185 static void RegisterWinSystem(CWinSystemBase
* winsystem
);
186 static void UnregisterWinSystem();
187 static CWinSystemBase
* GetWinSystem();
188 static CRenderSystemBase
* GetRenderSystem();
190 static IAE
* GetActiveAE();
191 static void RegisterAE(IAE
* ae
);
192 static void UnregisterAE();
194 static std::shared_ptr
<CAppInboundProtocol
> GetAppPort();
195 static void RegisterAppPort(std::shared_ptr
<CAppInboundProtocol
> port
);
196 static void UnregisterAppPort();
198 static void RegisterDecoderFilterManager(CDecoderFilterManager
* manager
);
199 static CDecoderFilterManager
* GetDecoderFilterManager();
201 static std::shared_ptr
<CCPUInfo
> GetCPUInfo();
202 static void RegisterCPUInfo(std::shared_ptr
<CCPUInfo
> cpuInfo
);
203 static void UnregisterCPUInfo();
205 static void RegisterTextureCache(const std::shared_ptr
<CTextureCache
>& cache
);
206 static void UnregisterTextureCache();
207 static std::shared_ptr
<CTextureCache
> GetTextureCache();
209 static void RegisterJobManager(const std::shared_ptr
<CJobManager
>& jobManager
);
210 static void UnregisterJobManager();
211 static std::shared_ptr
<CJobManager
> GetJobManager();
213 static void RegisterAppMessenger(
214 const std::shared_ptr
<KODI::MESSAGING::CApplicationMessenger
>& appMessenger
);
215 static void UnregisterAppMessenger();
216 static std::shared_ptr
<KODI::MESSAGING::CApplicationMessenger
> GetAppMessenger();
218 static void RegisterKeyboardLayoutManager(
219 const std::shared_ptr
<KODI::KEYBOARD::CKeyboardLayoutManager
>& keyboardLayoutManager
);
220 static void UnregisterKeyboardLayoutManager();
221 static std::shared_ptr
<KODI::KEYBOARD::CKeyboardLayoutManager
> GetKeyboardLayoutManager();
223 static void RegisterSpeechRecognition(
224 const std::shared_ptr
<speech::ISpeechRecognition
>& speechRecognition
);
225 static void UnregisterSpeechRecognition();
226 static std::shared_ptr
<speech::ISpeechRecognition
> GetSpeechRecognition();
229 std::shared_ptr
<CAppParams
> m_appParams
;
230 std::unique_ptr
<CLog
> m_logging
;
231 std::shared_ptr
<ANNOUNCEMENT::CAnnouncementManager
> m_pAnnouncementManager
;
232 CGUIComponent
* m_pGUI
= nullptr;
233 CWinSystemBase
* m_pWinSystem
= nullptr;
234 IAE
* m_pActiveAE
= nullptr;
235 std::shared_ptr
<CAppInboundProtocol
> m_pAppPort
;
236 std::shared_ptr
<CSettingsComponent
> m_pSettingsComponent
;
237 CDecoderFilterManager
* m_decoderFilterManager
= nullptr;
238 std::shared_ptr
<CCPUInfo
> m_cpuInfo
;
239 std::shared_ptr
<CTextureCache
> m_textureCache
;
240 std::shared_ptr
<CJobManager
> m_jobManager
;
241 std::shared_ptr
<KODI::MESSAGING::CApplicationMessenger
> m_appMessenger
;
242 std::shared_ptr
<KODI::KEYBOARD::CKeyboardLayoutManager
> m_keyboardLayoutManager
;
243 std::shared_ptr
<speech::ISpeechRecognition
> m_speechRecognition
;
244 std::shared_ptr
<CSlideShowDelegator
> m_slideshowDelegator
;
247 XBMC_GLOBAL_REF(CServiceBroker
, g_serviceBroker
);
248 #define g_serviceBroker XBMC_GLOBAL_USE(CServiceBroker)