[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / pvr / PVRContextMenus.h
blob357db17063f385963185d4ab6142b6e5d0a59f06
1 /*
2 * Copyright (C) 2016-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 "utils/EventStream.h"
13 #include <memory>
14 #include <vector>
16 class IContextMenuItem;
18 namespace PVR
20 enum class PVRContextMenuEventAction
22 ADD_ITEM,
23 REMOVE_ITEM
26 struct PVRContextMenuEvent
28 PVRContextMenuEvent(const PVRContextMenuEventAction& a,
29 const std::shared_ptr<IContextMenuItem>& i)
30 : action(a), item(i)
34 PVRContextMenuEventAction action;
35 std::shared_ptr<IContextMenuItem> item;
38 class CPVRClientMenuHook;
40 class CPVRContextMenuManager
42 public:
43 static CPVRContextMenuManager& GetInstance();
45 std::vector<std::shared_ptr<IContextMenuItem>> GetMenuItems() const { return m_items; }
47 void AddMenuHook(const CPVRClientMenuHook& hook);
48 void RemoveMenuHook(const CPVRClientMenuHook& hook);
50 /*!
51 * @brief Query the events available for CEventStream
53 CEventStream<PVRContextMenuEvent>& Events() { return m_events; }
55 private:
56 CPVRContextMenuManager();
57 CPVRContextMenuManager(const CPVRContextMenuManager&) = delete;
58 CPVRContextMenuManager const& operator=(CPVRContextMenuManager const&) = delete;
59 virtual ~CPVRContextMenuManager() = default;
61 std::vector<std::shared_ptr<IContextMenuItem>> m_items;
62 CEventSource<PVRContextMenuEvent> m_events;
65 } // namespace PVR