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.
11 #include "application/IApplicationComponent.h"
17 class CCriticalSection
;
23 class IActionListener
;
28 * \brief Class handling application support for action listeners.
30 class CApplicationActionListeners
: public IApplicationComponent
32 friend class CApplication
;
35 CApplicationActionListeners(CCriticalSection
& sect
);
38 \brief Register an action listener.
39 \param listener The listener to register
41 void RegisterActionListener(KODI::ACTION::IActionListener
* listener
);
43 \brief Unregister an action listener.
44 \param listener The listener to unregister
46 void UnregisterActionListener(KODI::ACTION::IActionListener
* listener
);
50 \brief Delegates the action to all registered action handlers.
51 \param action The action
52 \return true, if the action was taken by one of the action listener.
54 bool NotifyActionListeners(const CAction
& action
) const;
56 std::vector
<KODI::ACTION::IActionListener
*> m_actionListeners
;
58 CCriticalSection
& m_critSection
;