kodi
LIRC.h
1 /*
2  * Copyright (C) 2007-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 "threads/CriticalSection.h"
12 #include "threads/Thread.h"
13 
14 #include <chrono>
15 #include <memory>
16 #include <string>
17 
18 namespace KODI
19 {
20 namespace KEYMAP
21 {
22 class CIRTranslator;
23 } // namespace KEYMAP
24 } // namespace KODI
25 
26 class CLirc : CThread
27 {
28 public:
29  CLirc();
30  ~CLirc() override;
31  void Start();
32 
33 protected:
34  void Process() override;
35  void ProcessCode(char *buf);
36  bool CheckDaemon();
37 
38  int m_fd = -1;
39  std::chrono::time_point<std::chrono::steady_clock> m_firstClickTime;
40  CCriticalSection m_critSection;
41  std::unique_ptr<KODI::KEYMAP::CIRTranslator> m_irTranslator;
42  int m_profileId;
43 };
Definition: Thread.h:44
Definition: AudioDecoder.h:18
Definition: LIRC.h:26