[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / addons / AddonStatusHandler.h
blob0002f1f9d279ebfab4358a4166fa8440d6939653
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 "addons/IAddon.h"
12 #include "addons/kodi-dev-kit/include/kodi/c-api/addon_base.h"
13 #include "threads/CriticalSection.h"
14 #include "threads/Thread.h"
16 namespace ADDON
18 /**
19 * Class - CAddonStatusHandler
20 * Used to inform the user about occurred errors and
21 * changes inside Add-on's, and ask him what to do.
22 * It can executed in the same thread as the calling
23 * function or in a separate thread.
25 class CAddonStatusHandler : private CThread
27 public:
28 CAddonStatusHandler(const std::string& addonID,
29 AddonInstanceId instanceId,
30 ADDON_STATUS status,
31 bool sameThread = true);
32 ~CAddonStatusHandler() override;
34 /* Thread handling */
35 void Process() override;
36 void OnStartup() override;
37 void OnExit() override;
39 private:
40 static CCriticalSection m_critSection;
41 const uint32_t m_instanceId;
42 AddonPtr m_addon;
43 ADDON_STATUS m_status = ADDON_STATUS_UNKNOWN;