2 * Copyright (C) 2012-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.
20 class CPVRClientMenuHook
23 CPVRClientMenuHook() = delete;
24 virtual ~CPVRClientMenuHook() = default;
26 CPVRClientMenuHook(const std::string
& addonId
, const PVR_MENUHOOK
& hook
);
28 bool operator ==(const CPVRClientMenuHook
& right
) const;
30 bool IsAllHook() const;
31 bool IsChannelHook() const;
32 bool IsTimerHook() const;
33 bool IsEpgHook() const;
34 bool IsRecordingHook() const;
35 bool IsDeletedRecordingHook() const;
36 bool IsSettingsHook() const;
38 const std::string
& GetAddonId() const { return m_addonId
; }
39 unsigned int GetId() const;
40 unsigned int GetLabelId() const;
41 std::string
GetLabel() const;
44 std::string m_addonId
;
45 std::shared_ptr
<PVR_MENUHOOK
> m_hook
;
48 class CPVRClientMenuHooks
51 CPVRClientMenuHooks() = default;
52 virtual ~CPVRClientMenuHooks() = default;
54 explicit CPVRClientMenuHooks(const std::string
& addonId
) : m_addonId(addonId
) {}
56 void AddHook(const PVR_MENUHOOK
& addonHook
);
59 std::vector
<CPVRClientMenuHook
> GetChannelHooks() const;
60 std::vector
<CPVRClientMenuHook
> GetTimerHooks() const;
61 std::vector
<CPVRClientMenuHook
> GetEpgHooks() const;
62 std::vector
<CPVRClientMenuHook
> GetRecordingHooks() const;
63 std::vector
<CPVRClientMenuHook
> GetDeletedRecordingHooks() const;
64 std::vector
<CPVRClientMenuHook
> GetSettingsHooks() const;
67 std::vector
<CPVRClientMenuHook
> GetHooks(
68 const std::function
<bool(const CPVRClientMenuHook
& hook
)>& function
) const;
70 std::string m_addonId
;
71 std::unique_ptr
<std::vector
<CPVRClientMenuHook
>> m_hooks
;