1 /*
2  *  Copyright (C) 2016-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 "input/joysticks/interfaces/IButtonSequence.h"
12 
13 #include <map>
14 #include <string>
15 #include <vector>
16 
17 namespace KODI
18 {
19 namespace JOYSTICK
20 {
21 /*!
22  * \brief Hush!!!
23  */
24 class CJoystickEasterEgg : public IButtonSequence
25 {
26 public:
27   explicit CJoystickEasterEgg(const std::string& controllerId);
28   ~CJoystickEasterEgg() override = default;
29 
30   // implementation of IButtonSequence
31   bool OnButtonPress(const FeatureName& feature) override;
32   bool IsCapturing() override;
33 
34   static void OnFinish(void);
35 
36 private:
37   // Construction parameters
38   const std::string m_controllerId;
39 
40   static const std::map<std::string, std::vector<FeatureName>> m_sequence;
41 
42   unsigned int m_state;
43 };
44 } // namespace JOYSTICK
45 } // namespace KODI
46