[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / ServiceManager.h
blob2896166c23b0b0331fefa34ba8a2c29ae7979513
1 /*
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.
7 */
9 #pragma once
11 #include "platform/Platform.h"
13 #include <memory>
15 namespace ADDON
17 class CAddonMgr;
18 class CBinaryAddonManager;
19 class CBinaryAddonCache;
20 class CVFSAddonCache;
21 class CServiceAddonManager;
22 class CRepositoryUpdater;
23 } // namespace ADDON
25 namespace PVR
27 class CPVRManager;
30 namespace KODI::PLAYLIST
32 class CPlayListPlayer;
35 class CContextMenuManager;
36 #ifdef HAS_PYTHON
37 class XBPython;
38 #endif
39 #if defined(HAS_FILESYSTEM_SMB)
40 namespace WSDiscovery
42 class IWSDiscovery;
44 #endif
45 class CDataCacheCore;
46 class CFavouritesService;
47 class CNetworkBase;
48 class CWinSystemBase;
49 class CPowerManager;
50 class CWeatherManager;
51 class CSlideShowDelegator;
53 namespace KODI
55 namespace ADDONS
57 class CExtsMimeSupportList;
60 namespace GAME
62 class CControllerManager;
63 class CGameServices;
64 } // namespace GAME
66 namespace RETRO
68 class CGUIGameRenderManager;
70 } // namespace KODI
72 namespace MEDIA_DETECT
74 class CDetectDVDMedia;
77 namespace PERIPHERALS
79 class CPeripherals;
82 class CInputManager;
83 class CFileExtensionProvider;
84 class CPlayerCoreFactory;
85 class CDatabaseManager;
86 class CProfileManager;
87 class CEventLog;
88 class CMediaManager;
90 class CServiceManager
92 public:
93 CServiceManager();
94 ~CServiceManager();
96 bool InitForTesting();
97 bool InitStageOne();
98 bool InitStageTwo(const std::string& profilesUserDataFolder);
99 bool InitStageThree(const std::shared_ptr<CProfileManager>& profileManager);
100 void DeinitTesting();
101 void DeinitStageThree();
102 void DeinitStageTwo();
103 void DeinitStageOne();
105 ADDON::CAddonMgr& GetAddonMgr();
106 ADDON::CBinaryAddonManager& GetBinaryAddonManager();
107 ADDON::CBinaryAddonCache& GetBinaryAddonCache();
108 KODI::ADDONS::CExtsMimeSupportList& GetExtsMimeSupportList();
109 ADDON::CVFSAddonCache& GetVFSAddonCache();
110 ADDON::CServiceAddonManager& GetServiceAddons();
111 ADDON::CRepositoryUpdater& GetRepositoryUpdater();
112 CNetworkBase& GetNetwork();
113 #ifdef HAS_PYTHON
114 XBPython& GetXBPython();
115 #endif
116 #if defined(HAS_FILESYSTEM_SMB)
117 WSDiscovery::IWSDiscovery& GetWSDiscovery();
118 #endif
119 PVR::CPVRManager& GetPVRManager();
120 CContextMenuManager& GetContextMenuManager();
121 CDataCacheCore& GetDataCacheCore();
122 /**\brief Get the platform object. This is save to be called after Init1() was called
124 CPlatform& GetPlatform();
125 KODI::GAME::CControllerManager& GetGameControllerManager();
126 KODI::GAME::CGameServices& GetGameServices();
127 KODI::RETRO::CGUIGameRenderManager& GetGameRenderManager();
128 PERIPHERALS::CPeripherals& GetPeripherals();
130 KODI::PLAYLIST::CPlayListPlayer& GetPlaylistPlayer();
131 CSlideShowDelegator& GetSlideShowDelegator();
132 int init_level = 0;
134 CFavouritesService& GetFavouritesService();
135 CInputManager& GetInputManager();
136 CFileExtensionProvider& GetFileExtensionProvider();
138 CPowerManager& GetPowerManager();
140 CWeatherManager& GetWeatherManager();
142 CPlayerCoreFactory& GetPlayerCoreFactory();
144 CDatabaseManager& GetDatabaseManager();
146 CMediaManager& GetMediaManager();
148 #if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
149 MEDIA_DETECT::CDetectDVDMedia& GetDetectDVDMedia();
150 #endif
152 protected:
153 std::unique_ptr<ADDON::CAddonMgr> m_addonMgr;
154 std::unique_ptr<ADDON::CBinaryAddonManager> m_binaryAddonManager;
155 std::unique_ptr<ADDON::CBinaryAddonCache> m_binaryAddonCache;
156 std::unique_ptr<KODI::ADDONS::CExtsMimeSupportList> m_extsMimeSupportList;
157 std::unique_ptr<ADDON::CVFSAddonCache> m_vfsAddonCache;
158 std::unique_ptr<ADDON::CServiceAddonManager> m_serviceAddons;
159 std::unique_ptr<ADDON::CRepositoryUpdater> m_repositoryUpdater;
160 #if defined(HAS_FILESYSTEM_SMB)
161 std::unique_ptr<WSDiscovery::IWSDiscovery> m_WSDiscovery;
162 #endif
163 #ifdef HAS_PYTHON
164 std::unique_ptr<XBPython> m_XBPython;
165 #endif
166 std::unique_ptr<PVR::CPVRManager> m_PVRManager;
167 std::unique_ptr<CContextMenuManager> m_contextMenuManager;
168 std::unique_ptr<CDataCacheCore> m_dataCacheCore;
169 std::unique_ptr<CPlatform> m_Platform;
170 std::unique_ptr<KODI::PLAYLIST::CPlayListPlayer> m_playlistPlayer;
171 std::unique_ptr<KODI::GAME::CControllerManager> m_gameControllerManager;
172 std::unique_ptr<KODI::GAME::CGameServices> m_gameServices;
173 std::unique_ptr<KODI::RETRO::CGUIGameRenderManager> m_gameRenderManager;
174 std::unique_ptr<PERIPHERALS::CPeripherals> m_peripherals;
175 std::unique_ptr<CFavouritesService> m_favouritesService;
176 std::unique_ptr<CInputManager> m_inputManager;
177 std::unique_ptr<CFileExtensionProvider> m_fileExtensionProvider;
178 std::unique_ptr<CNetworkBase> m_network;
179 std::unique_ptr<CPowerManager> m_powerManager;
180 std::unique_ptr<CWeatherManager> m_weatherManager;
181 std::unique_ptr<CPlayerCoreFactory> m_playerCoreFactory;
182 std::unique_ptr<CDatabaseManager> m_databaseManager;
183 std::unique_ptr<CMediaManager> m_mediaManager;
184 #if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
185 std::unique_ptr<MEDIA_DETECT::CDetectDVDMedia> m_DetectDVDType;
186 #endif
187 std::unique_ptr<CSlideShowDelegator> m_slideShowDelegator;