kodi
ApplicationActionListeners.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 "application/IApplicationComponent.h"
12 
13 #include <vector>
14 
15 class CAction;
16 class CApplication;
17 class CCriticalSection;
18 
19 namespace KODI
20 {
21 namespace ACTION
22 {
23 class IActionListener;
24 } // namespace ACTION
25 } // namespace KODI
26 
31 {
32  friend class CApplication;
33 
34 public:
35  CApplicationActionListeners(CCriticalSection& sect);
36 
41  void RegisterActionListener(KODI::ACTION::IActionListener* listener);
46  void UnregisterActionListener(KODI::ACTION::IActionListener* listener);
47 
48 protected:
54  bool NotifyActionListeners(const CAction& action) const;
55 
56  std::vector<KODI::ACTION::IActionListener*> m_actionListeners;
57 
58  CCriticalSection& m_critSection;
59 };
Class handling application support for action listeners.
Definition: ApplicationActionListeners.h:30
Definition: Application.h:82
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: AudioDecoder.h:18
Base class for application components.
Definition: IApplicationComponent.h:12
Interface defining methods to handle GUI actions.
Definition: IActionListener.h:22