xbmc
PVRGUIActionListener.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "interfaces/IActionListener.h"
12 #include "settings/lib/ISettingCallback.h"
13 
14 namespace PVR
15 {
16 
17 class CPVRManager;
18 enum class ChannelSwitchMode;
19 enum class PVREvent;
20 
22 {
23 public:
25  ~CPVRGUIActionListener() override;
26 
27  void Init(CPVRManager& mgr);
28  void Deinit(CPVRManager& mgr);
29 
30  // IActionListener implementation
31  bool OnAction(const CAction& action) override;
32 
33  // ISettingCallback implementation
34  void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
35  void OnSettingAction(const std::shared_ptr<const CSetting>& setting) override;
36 
37  void OnPVRManagerEvent(const PVREvent& event);
38 
39 private:
41  CPVRGUIActionListener& operator=(const CPVRGUIActionListener&) = delete;
42 
43  static ChannelSwitchMode GetChannelSwitchMode(int iAction);
44 };
45 
46 } // namespace PVR
Definition: ContextMenuManager.h:24
Definition: ISettingCallback.h:16
Definition: PVRGUIActionListener.h:21
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: IActionListener.h:13
Definition: PVRManager.h:92
void OnSettingAction(const std::shared_ptr< const CSetting > &setting) override
The given setting has been activated.
Definition: PVRGUIActionListener.cpp:353
void OnSettingChanged(const std::shared_ptr< const CSetting > &setting) override
The value of the given setting has changed.
Definition: PVRGUIActionListener.cpp:316